Plex Media Server Hardware Transcoding Cheat Sheet

 
 
 
Loading...
 
 
Loading...

*h.264 FPS Based on 1080p@20MBPS YUV 4:2:0 8-bit. HEVC (h.265) FPS based on 1080p@20MBPS 8-bit
*VRAM listed are common sizes.
*NVENC FPS based on Single Pass quality profile. (High Quality – High Performance)
*VDPAU nVidia PureVideo Information [https://en.wikipedia.org/wiki/Nvidia_PureVideo#Nvidia_VDPAU_Feature_Sets]

VRAM Bandwidth

Preliminary testing sees a single NVDEC job on a 128Bit GTX 1050 Ti 4GB (Pascal) unable to use more than 30% (112 FPS) of the NVDEC. Two streams hold about 50%, Three about 80% and more than four streams to reach 100% NVDEC saturation. A 256Bit GTX 970 4GB (Maxwell 2nd Gen) can hit 100% NVDEC saturation (376FPS) with a single stream.

The difference between the 128Bit, 192Bit and 256Bit Memory bandwidth needs further testing. It looks like a 128Bit memory bus will not cause performance issues with multiple transcodes but will see Plex offline “Sync” jobs only able to use 30% of the NVDEC chip.

VRAM Stream Card Load

Card load is calculated from the smallest of the “NVENC FPS” and “NVDEC FPS” then divided by “Streams for VRAM” combined FPS to provide card. For example; Quadro K2200 4GB model can NVDEC 1080p@376 FPS and NVENC 720p@502 FPS and fit a maximum 16 transcodes in its 4GB VRAM. NVDEC being the smaller FPS we take 16x h.264.1080p@30 FPS equals 480 FPS, more than the NVDEC can process. This card will be under 128% Load to deliver 16 streams causing buffering but could deliver 12 streams at 96% load. See “Recommended Plex Streams” for more information.

Exceeding VRAM

Exceeding the VRAM usage will cause new transcodes to buffer indefinitely, even once VRAM has dropped below the maximum. The Plex Client will need to stop the play request and request it again once VRAM usage has dropped. Choose a card with enough VRAM to avoid this.

Streams for VRAM

“Streams for VRAM” is how many Plex Streams will fit in VRAM at any one time, this figure is based on 1080p@15MBPS to 720p@4MBPS per stream.
See “Recommended Plex Streams” and “Exceeding VRAM” for stream buffering issues.

 

Kepler

Maxwell 1st Gen

Maxwell 2nd GEN

Pascal & VOLTA

720p@3Mbit to SD 2Mbit

 

102MB

207MB

190MB

720p@3Mbps to 720p 2Mbps

 

104MB

190MB

195MB

720p@6Mbps to 720p@2Mbps

 

98MB

218MB

170MB

720p@6Mbps to 720p@4Mbps

 

108MB

229MB

190MB

1080p@15Mbps to 720p@2Mbps

 

122MB

231MB

280MB

1080p@15Mbps to 720p@4Mbps

 

133MB

248MB

300MB

1080p@15Mbps to 1080p@8Mbps

 

142MB

250MB

320MB

4K@68MBPS to 720p@4MBPS

-

-

 

1220MB

4K@68MBPS to 1080p@8MBPS

-

-

 

1290MB

Recommended Plex Streams

Maximum 1080p@15Mbps streams to maintain live streams without buffering pauses based on FPS of chipset and VRAM available. This calculation is based on 1080p@15MBPS to 720p@4MBPS per stream. See “Streams for VRAM” for more precise usage.

Multiple NVENC Chips

Some cards have either multiple NVENC chips or multiple Graphics chips each containing an NVENC chip.

Taking into account that you need to decode the same FPS as you encode let’s look at the GTX 1070; It supports NVENC h.264@1262 FPS but only NVDEC h.264@658 FPS, this would mean 658 FPS@1080p is the maximum throughput with a “single pass” encoding profile, not the full 1262 FPS.

Using a “high quality” profile the GTX 1070 supports NVENC h.264@776 FPS, you will see improved image quality and smaller encoded streams while still reaching the 658 FPS@1080p throughput. Input streams lower than 1080p or that do not use NVDEC (eg. Unsupported CODEC) can allow this card to NVENC over the NVDEC limit. HEVC NVDEC on this card supports 720FPS meaning a HEVC to h.264 workload would yield a transcode of 720FPS, 60FPS better than h.264 to h.264.

GPU Power Usage

Without an attached monitor, a GTX 970 with a max draw of 145w will draw about 80w with 100% NVDEC to NVENC transcoding.

Microsoft Windows

Session Limits can be overridden in Windows [https://github.com/keylase/nvidia-patch/tree/master/win]. This can be a tricky setup, a more sturdy option choose a Quadro Card with no session limits.

Linux

Session Limits can be overridden on GeForce and Quadro Cards [https://github.com/keylase/nvidia-patch] Please make sure the card has enough VRAM for this.

NVDEC for Linux needs v1.15.1.791 or newer and a patch. [https://github.com/revr3nd/plex-nvdec] Please make sure the card has enough VRAM for this.

Linux NVENC / NVDEC Monitoring
Live usage stats:
watch -n 2 'nvidia-smi -q -d UTILIZATION'

Usage Report:
nvidia-smi

Plex Media Server Optimisation

  • Run Plex Library from an SSD (NVMe SSD for best performance) by making a symlink in Linux
    sudo ln -s "/SSD/Plex Media Server" "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server"

 

  • Move the “Transcoder temporary directory” to a RAM disk using the Linux default: “/dev/shm”
    /dev/shm allows by default 50% of RAM to be used as cache
    You will need about 1GB per 1080p stream for a 900 sec “Transcoder default throttle buffer”

VDPAU Reference

VP4

C

Mar-11

Supports complete acceleration for MPEG-1, MPEG-2, MPEG-4 Part 2 (a.k.a. MPEG-4 ASP), VC-1/WMV9 and H.264.

Global motion compensation and Data Partitioning are not supported for MPEG-4 Part 2.

VP5

D

Apr-11

Similar to feature set C but added support for decoding H.264 with a resolution of up to 4032×4080 and MPEG-1/MPEG-2 with a resolution of up to 4032×4048 pixels.

VP6

E

Feb-14

Similar to feature set D but added support for decoding H.264 with a resolution of up to 4096×4096 and MPEG-1/MPEG-2 with a resolution of up to 4080×4080 pixels.

 

GPUs with VDPAU feature set E support an enhanced error concealment mode which provides more robust error handling when decoding corrupted video streams.

 

Cards with this feature set use a combination of the PureVideo hardware and software running on the shader array to decode HEVC (H.265) as partial/hybrid hardware video decoding.

VP7

F

Jan-15

Introduced dedicated HEVC Main (8-bit) & Main 10 (10-bit) and VP9 hardware decoding video decoding up to 4096 × 2304 pixels resolution.

 

G

 

Introduced dedicated hardware video decoding of HEVC Main 12 (12-bit) up to 4096 × 2304 pixels resolution. 

VP8

H

May-16

Feature Set H are capable of hardware-accelerated decoding of 8192x8192 (8k resolution) H.265/HEVC video streams.

VP9

I

Nov-17

 

VP10

J

Apr-19

 

Sources

https://en.wikipedia.org/wiki/Nvidia_PureVideo#Nvidia_VDPAU_Feature_Set
https://developer.nvidia.com/video-encode-decode-gpu-support-matrix
https://developer.nvidia.com/nvidia-video-codec-sdk#NVENCFeatures
http://developer.download.nvidia.com/assets/cuda/files/NVENC_DA-06209-001_v07.pdf (720p FPS Kepler to Maxwell 2nd Gen)
https://github.com/MarkRepo/NvencEncoder/blob/master/doc/NVDEC_DA-06209-001_v08.pdf (NVENC_DA-06209-001_v08 1080p FPS Kepler to Pascal)
https://github.com/MarkRepo/NvencEncoder/blob/master/doc/NVENC_DA-06209-001_v08.pdf (NVDEC_DA-06209-001_v08 1080p FPS Kepler to Pascal)