Virt-Manager, Intel-GPU-Tools and more Dockers


dee31797

Recommended Posts

22 minutes ago, dee31797 said:

While not as easy as Handbrake, you can decode and encode with your GTX 750 on unraid with ffmpeg.

 


docker run --rm --runtime=nvidia -v "/unraid/your/videos:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-UUID-from-nvidia-pluginXXXX' djaydev/ffmpeg-ccextractor \
ffmpeg -hwaccel nvdec -i "/input/oldvideo.ts" -c:v hevc_nvenc -c:a copy "/input/newvideo.mp4"

Edit, I don't know if GTX 750 has nvdec components or not

just checked nvidia's site about that and it says it does support h.264 (AVCHD) decoding, so i guess i will give it a try.

well thanks for all the info and help.👍

Link to comment
On 7/8/2019 at 10:41 AM, dee31797 said:

While not as easy as Handbrake, you can decode and encode with your GTX 750 on unraid with ffmpeg.

 


docker run --rm --runtime=nvidia -v "/unraid/your/videos:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-UUID-from-nvidia-pluginXXXX' djaydev/ffmpeg-ccextractor \
ffmpeg -hwaccel nvdec -i "/input/oldvideo.ts" -c:v hevc_nvenc -c:a copy "/input/newvideo.mp4"

Edit, I don't know if GTX 750 has nvdec components or not

 

Running this command on my system gives me the following error.  Any ideas?

 

docker run --rm --runtime=nvidia -v "/mnt/user/Downloads/handbrake/watch:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-90490eba-cd03-39f1-d641-3360df982f5a' djaydev/ffmpeg-ccextractor \
> ffmpeg -hwaccel nvdec -i "/input/test.mkv" -c:v hevc_nvenc -c:a copy "/input/test1.mvk"
docker: invalid reference format.
See 'docker run --help'.

 

Link to comment
2 minutes ago, IamSpartacus said:

 

Running this command on my system gives me the following error.  Any ideas?

 


docker run --rm --runtime=nvidia -v "/mnt/user/Downloads/handbrake/watch:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-90490eba-cd03-39f1-d641-3360df982f5a' djaydev/ffmpeg-ccextractor \
> ffmpeg -hwaccel nvdec -i "/input/test.mkv" -c:v hevc_nvenc -c:a copy "/input/test1.mvk"
docker: invalid reference format.
See 'docker run --help'.

 

I copied your command into my unraid server and it worked (I had to change the GPU ID of course).  Do you have the nvidia plugin installed and the drivers loaded?

Link to comment
1 minute ago, IamSpartacus said:

 

Yup.  NVENC works fine in your handbrake container and in both Plex and Emby.  Hmmmm.

Maybe try it all on one line?

 

docker run --rm --runtime=nvidia -v /mnt/user/Downloads/handbrake/watch:/input:rw -e NVIDIA_DRIVER_CAPABILITIES=all -e NVIDIA_VISIBLE_DEVICES=GPU-6315e2bf-1c81-cc19-bfb3-a24978448a5e djaydev/ffmpeg-ccextractor ffmpeg -hwaccel nvdec -i /input/test.mkv -c:v hevc_nvenc -c:a copy /input/test1.mkv

 

Link to comment
4 minutes ago, dee31797 said:

Maybe try it all on one line?

 


docker run --rm --runtime=nvidia -v /mnt/user/Downloads/handbrake/watch:/input:rw -e NVIDIA_DRIVER_CAPABILITIES=all -e NVIDIA_VISIBLE_DEVICES=GPU-6315e2bf-1c81-cc19-bfb3-a24978448a5e djaydev/ffmpeg-ccextractor ffmpeg -hwaccel nvdec -i /input/test.mkv -c:v hevc_nvenc -c:a copy /input/test1.mkv

 

 

With or without the quotes like you have in your initial command?

 

EDIT:  Nvmd, it worked without the quotes.  I guess I needed to remove them in my above command?

Edited by IamSpartacus
Link to comment
Just now, IamSpartacus said:

 

With or without the quotes like you have in your initial command? 

I did it with the quotes, you mainly need the quotes when there's spaces in between, in this case you don't need them.

 

I ran your command and it started up the container, I don't have a file there so it didnt convert anything but I didn't get the docker error before it tried.

 

@unraid:~# docker run --rm --runtime=nvidia -v "/mnt/user/Downloads/handbrake/watch:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-6315e2bf-1c81-cc19-bfb3-a24978448a5e' djaydev/ffmpeg-ccextractor \
> ffmpeg -hwaccel nvdec -i "/input/test.mkv" -c:v hevc_nvenc -c:a copy "/input/test1.mvk"

ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gnutls --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
/input/test.mkv: No such file or directory

Link to comment
3 minutes ago, dee31797 said:

I did it with the quotes, you mainly need the quotes when there's spaces in between, in this case you don't need them.

 

I ran your command and it started up the container, I don't have a file there so it didnt convert anything but I didn't get the docker error before it tried.

 

@unraid:~# docker run --rm --runtime=nvidia -v "/mnt/user/Downloads/handbrake/watch:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-6315e2bf-1c81-cc19-bfb3-a24978448a5e' djaydev/ffmpeg-ccextractor \
> ffmpeg -hwaccel nvdec -i "/input/test.mkv" -c:v hevc_nvenc -c:a copy "/input/test1.mvk"

ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gnutls --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
/input/test.mkv: No such file or directory

 

The one line worked.

 

What kind of FPS do you get with that command and what GPU are you using?  Trying to compare to my GTX 1660.

Link to comment
4 minutes ago, IamSpartacus said:

 

The one line worked.

 

What kind of FPS do you get with that command and what GPU are you using?  Trying to compare to my GTX 1660.

Here's my ending stats with my GPU:

 

frame= 4505 fps=294 q=36.0 Lsize=   46690kB time=00:02:30.28 bitrate=2545.1kbits/s dup=22 drop=0 speed=9.81x

Link to comment
2 minutes ago, IamSpartacus said:

 

Hmmm I wonder why my FPS is so low then.  It's been holding steady at 169 FPS the entire time.  I have heard the new Turing GPU's are a little slower and high quality but this seems really slow. 

wow fancy, which turing you got?  I want one because they can do B-frames, better file sizes at better quality levels.

Link to comment
1 minute ago, dee31797 said:

wow fancy, which turing you got?  I want one because they can do B-frames, better file sizes at better quality levels.

 

GTX 1660.  Tremendous value GPU for HW acceleration.  Can do 20 1080p > 720p transcodes or 5 4K > 720p transcodes at once.  Lower power usage.  All for $220.

Edited by IamSpartacus
Link to comment
3 minutes ago, IamSpartacus said:

Oh hmmm, it finished a lot quicker than I thought.  I was looking at the time going up and that was the time of the movie not the time left.  When it finished, I didn't see and ending stats like you showed though.

My test video is a mpeg2, ts container, 2mins 30secs long.  The codec you're decoding makes a difference in the FPS.

Edited by dee31797
Link to comment
Just now, Max said:

could anyone guide me how to use this command, where to put and all, as i have never used docker run command ever before so i literally have no clue about it. 

Hi @Max

Are you talking about the command from this post?  If so, you need to either SSH into unraid (same IP address as webUI) or use the >_ terminal icon from the webGUI to bring up the command line interface.  From there you can you paste in the command, but you need to edit the command to your personal server.  First, find your Nvidia GPU UUID in the Nvidia plugin under settings in the Unraid UI.  Lastly, you need to change the directory to where your videos for converting are, such as /mnt/user/myvideos/:input:rw. 

  • Upvote 1
Link to comment
23 minutes ago, dee31797 said:

Hi @Max

Are you talking about the command from this post?  If so, you need to either SSH into unraid (same IP address as webUI) or use the >_ terminal icon from the webGUI to bring up the command line interface.  From there you can you paste in the command, but you need to edit the command to your personal server.  First, find your Nvidia GPU UUID in the Nvidia plugin under settings in the Unraid UI.  Lastly, you need to change the directory to where your videos for converting are, such as /mnt/user/myvideos/:input:rw. 

thanks but know im getting following error.

ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi -enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enad --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cfl
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Unrecognized option 'hwaccel'.
Error splitting the argument list: Option not found

 

Link to comment
1 minute ago, Max said:

thanks but know im getting following error. 


ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi -enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enad --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cfl
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Unrecognized option 'hwaccel'.
Error splitting the argument list: Option not found

 

Please paste here the exact command you ran

Link to comment
4 minutes ago, dee31797 said:

Please paste here the exact command you ran

docker run --rm --runtime=nvidia -v "/unraid/user/Window Share/Handbrake/Watch:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-4daa28f9-2851-49be-7240-d485e0fa6aad' djaydev/ffmpeg-ccextractor \
ffmpeg -hwaccel nvdec -i "/input/oldvideo.ts" -c:v hevc_nvenc -c:a copy "/input/newvideo.mp4"

here it is.

Link to comment
5 minutes ago, Max said:

docker run --rm --runtime=nvidia -v "/unraid/user/Window Share/Handbrake/Watch:/input:rw" -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-4daa28f9-2851-49be-7240-d485e0fa6aad' djaydev/ffmpeg-ccextractor \
ffmpeg -hwaccel nvdec -i "/input/oldvideo.ts" -c:v hevc_nvenc -c:a copy "/input/newvideo.mp4"

here it is.

That looks good, what GPU do you have?

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.