Clarification on Hardware Acceleration with AMD APUs

Just trying to get an updated understanding of the state of hardware acceleration in Plex on Linux with an AMD APU (in my case AMD FX 8300).

Is it even possible? Do I need a discrete GPU to make it work? Should it already be working?

I have an and a10 and on Windows had to turn off the hardware acceleration else the Transcoder crashed each time.

I suspect it’s not supported, but watching thread in case someone can say otherwise.

You’ll need to add a Nvidia GPU or switch to an Intel CPU with Quick Sync Video

PMS now supports NVDEC in addition to NVENC.

Support document for Hardware Accelerated Streaming (not yet updated with NVDEC info)
https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/

Any recommendations on an Nvidia GPU? Also, is hardware acceleration even worth the trouble? I can definitely hear my CPU fan spinning when doing transcoding now.

That is up to you. It depends on your system, media, & users.

Does your system currently transcode desired media in real time (i.e. no pausing/buffering so the CPU can catch up with things)?

If so, then adding a GPU to your system would probably have little impact on your end-users’ experience. It would offload the transcode from your CPU in most cases, so your CPU utilization would decrease when transcoding.

If your system cannot keep up with the requested transcodes, then adding a GPU would help, as the transcoding is offloaded from the CPU to the GPU.

Other applications such as Handbrake can also take advantage of GPUs to speed up their processes. This may help if you use such applications to process movies/shows/etc before loading them into Plex. The hardware encoders/decoders in GPUs do not accept as many options as when software transcoding, but the processes run much, much faster.

Some datapoints to start:

  • There are two parts to a transcode, decoding the current format and encoding to the desired format.
  • 4K HDR movies are 10 & 12 bit H.265 4:2:0 video
  • Plex currently transcodes all video to 8 bit H.264 4:2:0 video.
  • Nvidia GTX cards are limited by Nvidia to two concurrent transcodes
  • Nvidia Quadro cards do not have a preset limit.

Reference Information:

For Plex, you’ll want a GTX 1050 or better. It can decode H.265 video and encode to H.264 (see Nvidia support matrix). If the two transcode limit is a concern, then use a Quadro P2000 or better.

Note there are hacked Nvidia drivers that remove the two transcode limit. I’ve no idea about their stability or if they work with Linux.

The Turing based GPUs (GTX 16xx, RTX xxxx, Quadro T2000, Quadro RTX xxxx) provide better performance per watt according to Nvidia docs. They are also faster, which may help if using with Handbrake, etc.

Note according to Nvidia docs (see SDK Info), the NVDEC/NVENC chips are independent of graphics performance. So, a GTX 1080Ti doesn’t necessarily have better Plex transcoding performance than a GTX 1050.

Suggest you read additional forum posts for real-world information, especially since full NVDEC/NVENC support just became available for Plex/Linux. I don’t transcode that much and have a rather dated 750 Ti card, which does not support H.265 video.

1 Like

Hi guys, I have been trying to figure this one out for some time, I guess I am missing some info. My Microserver gen10 with AMD APU runing Ubuntu produces the following vainfo output:

libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Mesa Gallium driver 19.0.8 for AMD Radeon R5 Graphics (CARRIZO, DRM 3.27.0, 5.0.0-29-generic, LLVM 8.0.0)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

Apparently VA API is supported, as well as relevant codecs.

Also ffmpeg works beautifully at this stage, here is a sample output.

~$ ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i A.Long.Way.mkv -c:v h264_vaapi -b:v 1M -c:a copy -bf 0 out.new.mkv
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, matroska,webm, from ‘A.Long.Way.mkv’:
Metadata:
encoder : libebml v1.3.0 + libmatroska v1.4.0
creation_time : 2014-08-13T21:25:48.000000Z
Duration: 01:36:46.29, start: 0.000000, bitrate: 2135 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709/bt709/unknown, progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
File ‘out.new.mkv’ already exists. Overwrite ? [y/N] Y
Stream mapping:
Stream #0:0#0:0 (h264 (native) → h264 (h264_vaapi))
Stream #0:1#0:1 (copy)
Press [q] to stop, [?] for help
[h264_vaapi @ 0x564df3ed59c0] Warning: some packed headers are not supported (want 0xd, got 0).
Output #0, matroska, to ‘out.new.mkv’:
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (h264_vaapi) (High) (H264 / 0x34363248), vaapi_vld, 1920x1080 [SAR 1:1 DAR 16:9], q=0-31, 1000 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default)
Metadata:
encoder : Lavc57.107.100 h264_vaapi
Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp (default)
frame=15401 fps=135 q=-0.0 Lsize= 88313kB time=00:10:42.51 bitrate=1126.0kbits/s speed=5.61x
video:80553kB audio:7442kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.361517%

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.