ffrobe in java

Comparison of ffrobe in java 

The major issue among today’s coders is which software is better to use. The same controversy is between Java runtime to exec FFmpeg and FFmpeg wrapper written in Java. Now we will find out some of the advantages of the ffrobe in java over the Java runtime exec FFmpeg. 

 

 

Solution

Your linked “ffmpeg-wrapper” project is outdated and unmaintained. FFmpeg is a very dynamic project with frequent updates and releases.

You ought to take a look at the Xuggler project because it offers a Java API for what you need to perform and has a close relationship with FFmpeg. FFrobe appears to have undergone changes a month ago as of right now. So hopefully it will endure for some time. 

A sample of their documentation is:

 

FFmpeg ffmpeg = new FFmpeg("/path/to/ffmpeg");
FFprobe ffprobe = new FFprobe("/path/to/ffprobe");

FFmpegBuilder builder = new FFmpegBuilder()
    .setInput(in)
    .overrideOutputFiles(true)
    .addOutput("output.mp4")
        .setFormat("mp4")
        .setTargetSize(250000)

        .disableSubtitle()

        .setAudioChannels(1)
        .setAudioCodec("libfdk_aac")
        .setAudioRate(48000)
        .setAudioBitrate(32768)

        .setVideoCodec("libx264")
        .setVideoFramerate(Fraction.getFraction(24, 1))
        .setVideoResolution(640, 480)

        .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL)
        .done();

FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);
executor.createTwoPassJob(builder).run();

 

Many Java packages offer wrappers for the FFMPEG format. Unfortunately, the majority of these libraries still use obsolete versions of FFMPEG that are missing certain crucial codecs (e.g. Xuggler, humble video, JavaAV, JavaAVC, and jave). One FFMPEG wrapper is still being worked on and supports FFMPEG 4.

An alternative is to utilize an FFMPEG command line interface wrapper, like ffmpeg-cli-wrapper. You can then upgrade ffmpeg manually without needing to wait for a new wrapper library release.

 

 

Also, Read typeerror: function object is not subscribable

 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *