Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Anyone gotten ffmpeg with nvenc to work?

Featured Replies

Anyone managed to encode with nvenc codec in unraid with ffmpeg?

I've installed ffmpeg using this guide. 


And it worked fine when encoding. But only with CPU encoding, when trying with hardware accelerated codec (nvenc since it's a nvidia card in the server) it does not recognize the codec. 

I've tried nvenc encoding on both windows and linux before and it's horrible getting to work, and unraid is another layer away from linux - if it's difficult on a standard linux distro, you'll have to add extra steps on top of that to meke it run on unraid (for things run in the native linux environment that is). 


Have anyone tried and succeeded to get nvenc encoding to work on unraid? 

 

 

I've also tried the docker ffmpeg-nvidia but that one does not even recognize the input file.

Neither with full path in command, eg:

root@unraid:~#docker exec -i ffmpeg-nvidia ffmpeg -i "/mnt/user/Video - Files/The.Video.Input.File.mp4" -c:v h264_nvenc output.avi

Nor navigating to the directory and only run the file, eg:

root@unraid:/mnt/user/Video - Files/#

docker exec -i ffmpeg-nvidia ffmpeg -i The.Video.Input.File.mp4 -c:v h264_nvenc output.avi

Both output error /mnt/user/Video - Files/The.Video.Input.File.mp4: No such file or directory and The.Video.Input.File.mp4: No such file or directory respectively. 

 

Anyone managed to use the docker successfully? 

 

Edited by tshorts

Solved by primeval_god

  • tshorts changed the title to Anyone gotten ffmpeg with nvenc to work?
  • Solution
17 hours ago, tshorts said:

I've also tried the docker ffmpeg-nvidia but that one does not even recognize the input file.

Neither with full path in command, eg:

root@unraid:~#docker exec -i ffmpeg-nvidia ffmpeg -i "/mnt/user/Video - Files/The.Video.Input.File.mp4" -c:v h264_nvenc output.avi

Nor navigating to the directory and only run the file, eg:

root@unraid:/mnt/user/Video - Files/#

docker exec -i ffmpeg-nvidia ffmpeg -i The.Video.Input.File.mp4 -c:v h264_nvenc output.avi

Both output error /mnt/user/Video - Files/The.Video.Input.File.mp4: No such file or directory and The.Video.Input.File.mp4: No such file or directory respectively. 

 

Anyone managed to use the docker successfully? 

What you are likely doing wrong with docker is referencing the video file path on the host not in the container. Since you are using docker exec I assume you have the container h264_nvenc already running on your system. You need to first make sure that it has the folder "/mnt/user/Video - Files/" mounted into the container. You need to determine what folder in the container it is mounted to, then your conversion command needs to reference the path within the container. Personally i like to mount my video conversion folder to something simple like /mnt/convert in the container.

 

p.s. Also just as a general rule (not for unraid for everywhere all the time), you should not have spaces in directory names.

Edited by primeval_god

  • 2 months later...
  • Author
On 12/20/2024 at 3:53 PM, primeval_god said:

What you are likely doing wrong with docker is referencing the video file path on the host not in the container. Since you are using docker exec I assume you have the container h264_nvenc already running on your system. You need to first make sure that it has the folder "/mnt/user/Video - Files/" mounted into the container. You need to determine what folder in the container it is mounted to, then your conversion command needs to reference the path within the container. Personally i like to mount my video conversion folder to something simple like /mnt/convert in the container.

 

p.s. Also just as a general rule (not for unraid for everywhere all the time), you should not have spaces in directory names.

Thank you! 

That was exactly it. 

Had to "Add another Path, Port, Variable, Label or Device" under the container, add "/mnt/user/Video - Files/" in host path and "/Video" in container path, and then run docker exec -i ffmpeg-nvidia ffmpeg -i "/Video/The.Video.Input.File.mp4" -c:v h264_nvenc output.avi and works like a charm! 

Your help here will probably help me with a lot of docker stuff I've never gotten to work. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.