December 19, 20241 yr 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 December 19, 20241 yr by tshorts
December 20, 20241 yr 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 December 20, 20241 yr by primeval_god
March 19, 20251 yr 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.