I’m on the latest linuxserver.io docker release of Plex’s container. I have hardware encoding enabled on my nvidia GPU, but I wasn’t able to get hardware encoding working. Before the update I was able to enable this using the nvenc script: https://github.com/revr3nd/plex-nvdec/blob/master/plex-nvdec-patch.sh and nvidia-smi dmon was showing that I was using both enc and dec via GPU. Now it only shows the GPU doing decoding. This is using the same exact files. If I revert my container back to 1.17 and enable that script then all is well and I’m enc/dec via GPU. I noticed that the -hwaccel flag is being passed for dec but not enc. Not sure why it’s not picking that part of it up? below is the log.
Oct 04, 2019 14:54:51.123 [0x14e62cfb6700] DEBUG - TPU: hardware transcoding: zero-copy support not present
Oct 04, 2019 14:54:51.124 [0x14e62cfb6700] DEBUG - TPU: hardware transcoding: final decoder: nvdec, final encoder:
Here’s a sanitized command:
'/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'hevc' '-hwaccel:0' 'nvdec' '-hwaccel_fallback_threshold:0' '10' '-codec:1' 'truehd_eae' '-eae_prefix:1' 'wxdla4bkpjcasvhh2pg4k2y4_' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/Media/Movies/xxxxxxxxxxxx.mkv' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/transcode/Transcode/Sessions/plex-transcode-wxdla4bkpjcasvhh2pg4k2y4-305338d0-82f2-420c-b90b-6c1421c7b731/temp-0.srt' '-filter_complex' '[0:0]scale=w=2276:h=1280[0];[0]format=pix_fmts=yuv420p|nv12[1]' '-filter_complex' '[0:1] aresample=async=1:ocl='\''stereo'\'':osr=48000[2]' '-map' '[1]' '-metadata:s:0' 'language=eng' '-codec:0' 'libx264' '-crf:0' '16' '-maxrate:0' '56898k' '-bufsize:0' '113796k' '-r:0' '23.975999999999999' '-preset:0' 'veryfast' '-x264opts:0' 'subme=2:me_range=4:rc_lookahead=10:me=hex:8x8dct=1' '-force_key_frames:0' 'expr:gte(t,0+n_forced*1)' '-map' '[2]' '-metadata:s:1' 'language=eng' '-codec:1' 'aac' '-b:1' '256k' '-f' 'dash' '-seg_duration' '1' '-init_seg_name' 'init-stream$RepresentationID$.m4s' '-media_seg_name' 'chunk-stream$RepresentationID$-$Number%05d$.m4s' '-window_size' '5' '-delete_removed' 'false' '-skip_to_segment' '1' '-time_delta' '0.0625' '-manifest_name' 'http://127.0.0.1:32400/video/:/transcode/session/wxdla4bkpjcasvhh2pg4k2y4/305338d0-82f2-420c-b90b-6c1421c7b731/manifest' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'dash' '-map' '1:s:0' '-metadata:s:0' 'language=eng' '-codec:0' 'ass' '-f' 'segment' '-segment_format' 'ass' '-segment_time' '1' '-segment_header_filename' 'sub-header' '-segment_start_number' '0' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/wxdla4bkpjcasvhh2pg4k2y4/305338d0-82f2-420c-b90b-6c1421c7b731/seglist?stream=subtitles' '-segment_list_type' 'csv' '-segment_list_size' '5' '-segment_list_separate_stream_times' '1' '-segment_format_options' 'ignore_readorder=1' '-segment_list_unfinished' '1' '-fflags' '+flush_packets' 'sub-chunk-%05d' '-start_at_zero' '-copyts' '-vsync' 'cfr' '-y' '-init_hw_device' 'cuda=cuda:/dev/dri/renderD128' '-hwaccel_device' 'cuda' '-filter_hw_device' 'cuda' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/wxdla4bkpjcasvhh2pg4k2y4/305338d0-82f2-420c-b90b-6c1421c7b731/progress'
When I downgraded back to 1.17.x I was seeing nvidia-smi showing both enc and dec!
Full enc/dec support via GPU inside container.