Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Plex HW Transcoding using AMD VCE and VA-API?

JohnnyBr@v0JohnnyBr@v0 Posts: 2Members

Hi there,

I've recently upgraded my HP Microserver Gen8 server with a Xeon E3-1265L V2 CPU.
This one features an Intel® HD Graphics 2500 GPU with QuickSync capabilities.
But unfortunately the bios of the Microserver Gen8 won't allow the integrated GPU to be activated.
And since HP bios images a signed.. there's also no possibility to mod it.

So then I came up with the idea to install a dedicated GPU for transcoding.
I can only fit a low-profile PCI-E card, so I can go for nvidia and use nvenc (which is officially supported), but the consumer cards are limited to 2 streaming sessions only...
This sucks big time as the third and fourth transcode will still hit the CPU..

So then I was looking into AMD cards with VCE capabilities as they now also feature VA-API support trough the mesa drivers.
According to the FFMpeg wiki it's only interlacing which is currently broken while encoding.
See: https://trac.ffmpeg.org/wiki/Hardware/VAAPI (AMD / Mesa)

Has anyone tried it?
I suppose if the drivers are correctly installed, it should run automatically, since the FFMPeg command for encoding with VA-API would be the same as for Intel QuickSync.

Answers

  • ChuckPAChuckPA Posts: 22,836Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    External GPU card support is only if you enable it yourself. It is not supported by Plex at this time nor is AMD's equivalent of QSV.

    In order for PMS to use any means other than QSV, the device node /dev/dri/renderD128 must exist.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • JohnnyBr@v0JohnnyBr@v0 Posts: 2Members

    Thank you ChuckPA.

    Yes, when using a recent kernel, the amdgpu driver should provide a "/dev/dri/renderD128" node for use with va-api.

    Only downside is that polaris doesn't support B-frames and vega isn't supported yet.
    But the R9 series should encode h264 up to 4k resolutions with B-frame support, so the ffmpeg command-line should be the same as for QSV.

  • ChuckPAChuckPA Posts: 22,836Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @JohnnyBr@v0

    That is exactly how I understand it will be too. When vega support comes , it should all be good.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • b2a8r1b2a8r1 Posts: 4Members, Plex Pass Plex Pass
    edited June 14

    I have a rx480 and this is the commands I use. you will need ffmpeg built with libfdk_aac support or use aac that is built in.
    This is my specs I'm not sure how new of a ffmpeg and mesa you need for h265 to work. I'm using mesa-git and ffmpeg-git
    OpenGL renderer string: AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.26.0, 4.17.0-1-git+, LLVM 7.0.0) OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.0-devel (git-135e4d434f)

    mp4 h264 -vaapi_device /dev/dri/renderD128 -filter:v 'format=nv12,hwupload' -c:a libfdk_aac -bf 0 -qp 29 -quality 8 -c:v h264_vaapi -profile:v constrained_baseline -level:v 4.1

    mkv h264 with ac3 -vaapi_device /dev/dri/renderD128 -filter:v 'format=nv12,hwupload' -c:a copy -bf 0 -qp 29 -quality 8 -c:v h264_vaapi -profile:v constrained_baseline -level:v 4.1

    mp4 h265 aac -vaapi_device /dev/dri/renderD128 -filter:v 'format=nv12,hwupload' -c:a aac -bf 0 -qp 30 -quality 8 -c:v hevc_vaapi -profile:v 1 -level:v 4.1

    mkv h265 ac3 -vaapi_device /dev/dri/renderD128 -filter:v 'format=nv12,hwupload' -c:a copy -bf 0 -qp 30 -quality 8 -c:v hevc_vaapi -profile:v 1 -level:v 4.1

Sign In or Register to comment.