Hello,I want to record mjpeg stream
I used the follow command and it work
ffmpeg -re -stream_loop -1 -r 1 -i 'http://@x.x.x.x/onvifsnap' -c:v libx264 -c:a aac -strict -2 -f hls -hls_time 3 -hls_list_size 10 -hls_wrap 0 output.m3u8
and I want to use javacv to implement the same function,
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(input);
grabber.setOption("re"," ");
grabber.setOption("stream_loop","-1");
grabber.setOption("r","2");
grabber.setOption("c:v", "libx264");
grabber.setOption("c:a", "aac");
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(output + ".m3u8", 1280, 720, 1);
recorder.setOption("r","2");
recorder.setOption("c:v", "libx264");
recorder.setOption("c:a", "aac");
recorder.setOption("f", "hls");
recorder.setOption("strict", "-2");
recorder.setOption("hls_time", "3");
recorder.setOption("hls_list_size", "10");
recorder.setOption("hls_wrap", "0");
but it not work, Is there any configration wrong?
If the ffmpeg program does what you need, we can use it as is from Java:
http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/org/bytedeco/ffmpeg/ffmpeg.html
Does that answer your question?
I couldn't found the org.bytedeco.ffmpeg.ffmpeg.class, which dependency contains this class
Just use javacv-platform, that includes everything.
Hello Samuel
It works, Thanks a lot!!!
Most helpful comment
Hello Samuel
It works, Thanks a lot!!!