-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i convert this ffmpeg command line with FFmpegFrameRecorder? #307
Comments
u can add following lines recorder.setVideoCodec(org.bytedeco.javacpp.avcodec.AV_CODEC_ID_H264);
recorder.setAudioCodec(org.bytedeco.javacpp.avcodec.AV_CODEC_ID_AAC);
recorder.setVideoOption("preset", "medium");
recorder.setVideoBitrate(400000); |
I need help with similar issue. I'm trying to implement following command with FFMpegFrameRecorder. ffmpeg -i rtsp://10.0.5.1:554/live.sdp -vcodec copy ./vid.mp4 And my recorder settings like below: frameRecorder = new FFmpegFrameRecorder(fout, frameGrabber.getVideoWidth(), frameGrabber.getVideoHeight());
frameRecorder.setFormat("mp4");
frameRecorder.setFrameRate(frameRate);
// frameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
frameRecorder.setVideoCodecName("H264");
frameRecorder.setVideoQuality(0); It works when I use org.bytedeco.javacv.FrameRecorder$Exception: avcodec_open2() error -22: Could not open video codec.
at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:529)
at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:288) Also records are not smooth as expected. (Looking like some areas' pixels enlarging and marshalling neighbors pixels) Here is ffprobe output of my stream Could you give me any advice to record the stream (that I share ffprobe result) ? |
@alicanalbayrak Have you tried with the latest code from the repository (1.2-SNAPSHOT)? |
No Saudet, I did not. I tried it with javacv version 1,1. I could not build javacpp-presets 1.2-SNAPSHOT locally. Because, I'm using CentOS 7 and Flycapture SDK does not support any other linux packages except Ubuntu. Any ways, I tried to pass |
The There is no codec named If you're looking for the something equivalent to the |
JavaCV 1.4 has just been released. Is this working any better these days? |
…d()` for convenience (issue bytedeco/javacv#307)
With commit bytedeco/javacpp-presets@13ffffd the String ffmpeg = Loader.load(org.bytedeco.ffmpeg.ffmpeg.class);
ProcessBuilder pb = new ProcessBuilder(ffmpeg, "-strict", "-2", "-c:a", "aac", "-b:a", "128k", "-ar", "44100", "-r", "30", "-g", "60", "-keyint_min", "60", "-b:v", "400000", "-c:v", "libx264", "-preset", "medium", "-bufsize", "400k", "-maxrate", "400k", "-f", "flv", ...);
pb.inheritIO().start().waitFor(); Please give it a try with 1.5-SNAPSHOT before the release: http://bytedeco.org/builds/ |
The ffmpeg program is now being bundled starting with JavaCV 1.5. Enjoy! |
Hi everybody, i have this ffmpeg line command parameters i have to replicate with javacv library.
How can i do?
Actually i have:
How can i complete?
The text was updated successfully, but these errors were encountered: