ffmpeg-cli-wrapper icon indicating copy to clipboard operation
ffmpeg-cli-wrapper copied to clipboard

Error: This binary 'ffmpeg' is not a supported version of ffprobe

Open Goldo02 opened this issue 3 years ago • 0 comments
trafficstars

Hello I am trying to use the library and I get the following error, how can I solve it? I've tried googling, but I can't find anything. screen

That's my code:s

import net.bramp.ffmpeg.FFmpeg;
import net.bramp.ffmpeg.FFmpegExecutor;
import net.bramp.ffmpeg.FFprobe;
import net.bramp.ffmpeg.builder.FFmpegBuilder;
import net.bramp.ffmpeg.probe.FFmpegProbeResult;

import java.io.IOException;

public class Main {
    public static void main(String argv[]) throws IOException {
        FFmpeg ffmpeg = new FFmpeg(FFmpeg.DEFAULT_PATH);
        FFprobe ffprobe = new FFprobe(FFmpeg.DEFAULT_PATH);
        String inFilename = "input.mp4";
        FFmpegProbeResult in = ffprobe.probe(inFilename);

        FFmpegBuilder builder =
                new FFmpegBuilder()
                        .setInput(inFilename) // Filename, or a FFmpegProbeResult
                        .setInput(in)
                        .overrideOutputFiles(true) // Override the output if it exists
                        .addOutput("test.mp4") // Filename for the destination
                        .setFormat("mp4") // Format is inferred from filename, or can be set
                        .setTargetSize(250_000) // Aim for a 250KB file
                        .disableSubtitle() // No subtiles
                        .setAudioChannels(1) // Mono audio
                        .setAudioCodec("aac") // using the aac codec
                        .setAudioSampleRate(48_000) // at 48KHz
                        .setAudioBitRate(32768) // at 32 kbit/s
                        .setVideoCodec("libx264") // Video using x264
                        .setVideoFrameRate(24, 1) // at 24 frames per second
                        .setVideoResolution(640, 480) // at 640x480 resolution
                        .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // Allow FFmpeg to use experimental specs
                        .done();

        FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);

        // Run a one-pass encode
        executor.createJob(builder).run();

        // Or run a two-pass encode (which is slower at the cost of better quality
        executor.createTwoPassJob(builder).run();
    }
}

Goldo02 avatar Jun 22 '22 23:06 Goldo02