LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   building ffmpeg with nvenc? (for OBS stream/capture) (https://www.linuxquestions.org/questions/slackware-14/building-ffmpeg-with-nvenc-for-obs-stream-capture-4175694988/)

coralfang 05-11-2021 02:50 AM

building ffmpeg with nvenc? (for OBS stream/capture)
 
I haven't been able to get this working the several times i've tried.
In the ffmpeg.Slackbuild it mentions;

Code:

# Configure ffmpeg features not autodetected by default.
# You can enable a lot of optional (not-autodetected) features by
# passing variables to the script (VAR=yes/no ./ffmpeg.SlackBuild).
# Unfortunately ffmpeg's configure doesn't support --enable-feature=yes
# syntax, so we have to do it the complicated way :/
# Additional optional (autodetected) dependencies are:
# - bzip2
# - libva
# - libvdpau
# - libX11
# - libxcb
# - nvdec/nvenc
# - sdl2
# - xz
# - zlib

It doesn't seem to be auto detected after installing the nvidia related headers and rebuilding the package;
https://developer.nvidia.com/nvidia-video-codec-sdk and manually setting --enable-nvenc tries to build it from within the slackbuild, but still complains about missing headers/libraries.

Wondering if anyone is using nvenc on slackware and knows how to get this working correctly?

I'm mostly just looking for the nvenc codec to process video within OBS, such as:
https://www.gamingonlinux.com/articl...ly-great.8417/

andrew.46 05-11-2021 04:30 AM

You have tried this?

https://slackbuilds.org/repository/1...codec-headers/

mumahendras3 05-11-2021 06:38 AM

Hi, I have been using nvenc encoders in obs for some time now. All I have to do is (iirc) install cudatoolkit and nv-codec-headers from SBo then recompile ffmpeg. My system is Slackware-current

coralfang 05-11-2021 07:29 AM

Thanks both. I did not spot the nv-codec-headers on slackbuilds previously. I will give that a shot, thanks.

coralfang 05-11-2021 07:52 AM

Yep, works great, thanks. I'll mark as solved
Code:

> $ for i in encoders decoders filters; do                                                                                                                                                   
    echo $i:; ffmpeg -hide_banner -${i} | egrep -i "npp|cuvid|nvenc|cuda|nvdec"
done                                     
encoders:
 V....D h264_nvenc          NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264          NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_hevc          NVIDIA NVENC hevc encoder (codec hevc)
 V....D hevc_nvenc          NVIDIA NVENC hevc encoder (codec hevc)
decoders:
 V..... av1_cuvid            Nvidia CUVID AV1 decoder (codec av1)
 V..... h264_cuvid          Nvidia CUVID H264 decoder (codec h264)
 V..... hevc_cuvid          Nvidia CUVID HEVC decoder (codec hevc)
 V..... mjpeg_cuvid          Nvidia CUVID MJPEG decoder (codec mjpeg)
 V..... mpeg1_cuvid          Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
 V..... mpeg2_cuvid          Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
 V..... mpeg4_cuvid          Nvidia CUVID MPEG4 decoder (codec mpeg4)
 V..... vc1_cuvid            Nvidia CUVID VC1 decoder (codec vc1)
 V..... vp8_cuvid            Nvidia CUVID VP8 decoder (codec vp8)
 V..... vp9_cuvid            Nvidia CUVID VP9 decoder (codec vp9)
filters:
 ... hwupload_cuda    V->V      Upload a system memory frame to a CUDA device.



All times are GMT -5. The time now is 08:00 PM.