FFMPEG HVEC NVEC and CUDA

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1491
Joined: Tue Apr 26, 2016 3:28 pm

FFMPEG HVEC NVEC and CUDA

Post by Arch_Enemy »

I have spent the last 2 weeks trying to build a system for a friend with a recording studio. Audio was just fine, but since he has a fairly high-end older NVIDIA card he wanted to have his videos encoded with HEVC. HEVC is rather CPU intensive unless you go with the lower resolutions, so I decided to get NVENC working. I followed all the recipes I could find, and if NVENC worked in one utility, it failed in another. I followed the rules for building FFMPEG for Ubuntu from the FFMPEG site, and at first we got errors because the instructions only build static libraries. I altered and configurations to build shared libraries, and again, one or two applications might be able to use them while another would not.

Then I found this guide from NVIDIA's website: developer.download.nvidia.com/compute/redist/ffmpeg/1511-patch/FFMPEG-with-NVIDIA-Acceleration-on-Ubuntu_UG_v01.pdf

Follow the instructions, but, when configuring FFMPEG, add

Code: Select all

--enable-shared
to the ./configure command and compile. Make and install as instructed by the guide and it should work.

Caveat: AVIDEMUX, a quick linear editor, gives an error "bitrate too low" when using NVENC (x265), but it works fine in others. I wish I had found these instructions 2 weeks ago. Nothing else worked.

This is only tested on an NVIDIA card; you would have to disregard the CUDA installation if you want to try to compile FFMPEG from these instructions.

Good luck!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
I have travelled 37629424162.9 miles in my lifetime

One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1491
Joined: Tue Apr 26, 2016 3:28 pm

Re: FFMPEG HVEC NVEC and CUDA

Post by Arch_Enemy »

PS: Remove

Code: Select all

--enable-nvresize
from the configuration. It appears to have been removed.
I have travelled 37629424162.9 miles in my lifetime

One thing I would suggest, create a partition as a 50G partition as /. Partition the rest as /Home. IF the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
Locked

Return to “Sound”