Search code examples
javastreammediaxugglerxuggle

Xuggler could not open output url error


I've been following the simple video tutorial on youtube Xuggler. I've made sure that an existing file path is in the argument. However I still get the following error:

15:15:44.339 [main] DEBUG com.xuggle.xuggler - Could not open output url: *thefilepath (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:436)

Exception in thread "main" java.lang.IllegalArgumentException: Could not open at myproject1.MediaPlayer.main(MediaPlayer.java:23) Java Result: 1


My code is below:

public class MediaPlayer {

public static void main (String[] args) {
    if(args.length != 1)
        throw new IllegalArgumentException("no file");
    IContainer container = IContainer.make();
    System.out.println("args: " + args[0]);

    if(container.open(args[0], IContainer.Type.READ, null) < 0) {
        throw new IllegalArgumentException("Could not open");
    }

}

}


Solution

  • Cause Could be un-availability of dependency jars or version conflicts.

    Adding the following jars in the classpath worked fine for me:

    xuggle-xuggler-5.4.jar
    slf4j-api-1.6.4.jar
    logback-core-1.0.0.jar
    logback-classic-1.0.0.jar