FreeBSD ffmpeg with h264 acceleration via NVENC/NVDEC

Hi all,

is anyone aware if it's possible to build ffmpeg with support for Nvidia's NVENC/NVDEC? It doesn't appear on the configure options, nor does libav or CUDA.
I *think* the API is made available in x11/nvidia-driver.

Thanks,
Scott
 
Thanks drhowarddrfine. Do you know if multimedia/libav will allow me to do H264 decoding and encoding in hardware with ffmpeg? It may not actually help my issue but I'd like to find out. I have a few RTSP camera streams coming in which I'm rebroadcasting via multicast (as well as saving segments to disk). That works well but when I overlay the camera name and current time then the CPU usage goes up.
Scott
 
Last edited by a moderator:
I got here through a search engine.
I was able to do hardware encoding on 13.4 as well, so I will leave a note.
Reference site

% ffmpeg -f hevc -i ipcam_5min.h264 -c h264_nvenc -f mp4 ipcam_5min.mp4
[h264_nvenc @ 0x866a42c00] Cannot load libcuda.so.1
[vost#0:0/h264_nvenc @ 0x8669f8a00] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Operation not permitted
[out#0/mp4 @ 0x8669ec240] Nothing was written into output file, because at least one of its streams received no packets.

% time nv-sglrun ffmpeg -f hevc -i ipcam_5min.h264 -c h264_nvenc -f mp4 ipcam_5min.mp4
62.21s user 0.89s system 246% cpu 25.631 total

% time ffmpeg -f hevc -i ipcam_5min.h264 -c h264 -f mp4 ipcam_5min.mp4
949.17s user 5.40s system 641% cpu 2:28.77 total
 
Back
Top