xuggler API를 사용하여 비디오를 한 형식에서 다른 형식으로 코드 변환합니다. 결과가,Xuggler 오류 : 열 수 없습니다.
Exception in thread "main" java.lang.RuntimeException: could not open: D:\Malhar\project_works\VideoConvertter/resources/in/AV36_1.AVI
at com.xuggle.mediatool.MediaReader.open(MediaReader.java:637)
at com.xuggle.mediatool.MediaReader.readPacket(MediaReader.java:434)
at util.VideoEncoder.convertVideo(VideoEncoder.java:38)
at ConvertVideo.main(ConvertVideo.java:12)
가 다른 파일로 봤어 ..하지만 :
http://wiki.xuggle.com/MediaTool_Introduction & http://www.javacodegeeks.com/2011/02/xuggler-tutorial-transcoding-media.html
public void convertVideo(){
String sourceUrl=getResourceDirectory()+"/in/AV36_1.AVI";
String destUrl=getResourceDirectory()+"/out/output.mp4";
IMediaReader reader = ToolFactory.makeReader(sourceUrl);
// add a viewer to the reader, to see progress as the media is
// transcoded
reader.addListener(ToolFactory.makeViewer(true));
// create a writer which receives the decoded media from
// reader, encodes it and writes it out to the specified file
IMediaWriter writer = ToolFactory.makeWriter(destUrl, reader);
// add a debug listener to the writer to see media writer events
writer.addListener(ToolFactory.makeDebugListener());
////
//// // create the media writer
reader.addListener(ToolFactory.makeWriter(destUrl, reader));
// read packets from the source file, which dispatch events to the
// writer, this will continue until
while (reader.readPacket() == null)
do {} while(false);
}
에서 제공하는 예를 다음
은 열 수 없습니다 예외를 제공합니다 같은.