Open hou718945431 opened 1 year ago
Did you make sure to use hardware acceleration everywhere?
My testing environment does not have a GPU. After using ffmpeg to block audio, the delay drops to about 3 seconds. Does JavaCV provide ffmpeg - an parameter configuration? how can i do
If the problem doesn't occur without audio, that's probably because of a synchronization issue between audio and video frames. Make sure audio and video frames are synchronized within ~1 second.
i use setTimestamp, But it seems to have no effect
setTimestamp() doesn't affect audio frames, that's normal.
I want to use FFmpegFrameGrabber by my own compiled ffmpeg and how can I do it
Build from source? https://github.com/bytedeco/javacpp-presets#build-instructions
I want to use cuda for hardware acceleration. Does 1.5.8 support it? ffmpeg6.0 should compiling the corresponding files
Yes, most hardware acceleration is available in 1.5.8.
how can i do ?
grabber.setOption("hwaccel", "cuda");
and How do I know the decoder and encoder?h264_?
I don't believe hwaccel works, but setting video codecs with setVideoCodecName() does work: https://trac.ffmpeg.org/wiki/HWAccelIntro
When I want to compile ffmpeg to support cuda, I need to tell him the installation path of cuda and how I need to inform it of the location in Javacv
You're talking about the --enable-cuda-nvcc build option? That's not currently part of the presets, but we can add it to the cppbuild.sh script.
I don't believe hwaccel works, but setting video codecs with setVideoCodecName() does work: https://trac.ffmpeg.org/wiki/HWAccelIntro
i try to set grabber.setVideoCodecName("h264_cuvid") and recorder.setVideoCodecName("h264_nvenc") get error,
Error: [h264_cuvid @ 0xfffdbc1e06f0] Cannot load libnvcuvid.so.1 Error: [h264_cuvid @ 0xfffdbc1e06f0] Failed loading nvcuvid.
Error: [h264_nvenc @ 0xffff0c2c5ec0] Cannot load libnvidia-encode.so.1
how can i know what decoder and encoder it support
Those files come with the video drivers. You'll need to install the latest version of the video drivers for your GPU.
I use FFmpegFrameGrabber to process images frame by frame and push the stream to the rtmp server, but the rtmp playback delay is too high. What can I do to reduce this delay? I think I can accept it within 5 seconds