g.org/ffmpeg-doc.html">documentation for that program.
If on the other hand you need to programatically decide when and how you do video processing, or process only parts of files, or do transcoding live within a Java server without calling out to another process, then by all means use Xuggler and use this class as an example of how to do conversion. But please recognize you will likely need to implement code specific to your application. This class is no substitute for actually understanding the how to use the Xuggler API within your specific use-case
And if you haven't gotten the impression, please stop asking us to support ffmpeg
options like "-re" in this class. This class is only meant as a teaching-aide for the underlying Xuggler API.
Instead implement your own Java class based off of this that does real-time playback yourself. Really. Please. We'd appreciate it very much.
Now, all that said, here's how to create a main class that uses this Converter class:
public static void main(String[] args) { Converter converter = new Converter(); try { // first define options Options options = converter.defineOptions(); // And then parse them. CommandLine cmdLine = converter.parseOptions(options, args); // Finally, run the converter. converter.run(cmdLine); } catch (Exception exception) { System.err.printf("Error: %s\n", exception.getMessage()); } }
Pass "--help" to your main class as the argument to see the list of accepted options.
@author aclarke