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!

NVIDIA GTX 770 hardware transcoding on Debian 9

usnhobbzusnhobbz Posts: 11Members, Plex Pass Plex Pass

Trying out hardware support on Debian 9 and I can only get the encode side to work with the GTX 770. I get these errors repeated a few times for the encode in the log:

DEBUG - Codecs: hardware transcoding: testing API vaapi
ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error

Then:

DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
DEBUG - TPU: hardware transcoding: zero-copy support not present
DEBUG - TPU: hardware transcoding: final decoder: , final encoder: nvenc

So I wind up with Transcode h264 to h264 (hw) in the Now Playing status window.

I have the latest stable nvidia-driver packages installed, and the output from nvidia-smi is:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 770     Off  | 0000:03:00.0     N/A |                  N/A |
| 20%   43C    P8    N/A /  N/A |      2MiB /  4036MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0                  Not Supported                                         |
+-----------------------------------------------------------------------------+

I do not have a recent CPU that supports QSV in the server, so the only encoder/decoder is the GTX 770. Is decode limited to QSV only?

Thanks!

Best Answers

Answers

  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    If your processor does not support QSV then what you have is the limit at this time.
    https://support.plex.tv/hc/en-us/articles/115002178853-Using-Hardware-Accelerated-Streaming

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
  • zabby39103zabby39103 Posts: 16Validating, Plex Pass Plex Pass
    edited October 4

    But you guys enabled nvenc in the latest 9.3 release? It works for me. On my GeForce GTX 650 Ti. I get this in the transcoder log, and it's noticeably faster, and my GPU heats up :P.

    <Variant id="932ddf01-5bb0-48cd-9e36-635179ed4b3b" context="static" sourceVideoCodec="h264" sourceAudioCodec="ac3" videoDecision="transcode" audioDecision="copy" protocol="http" container="mp4" videoCodec="h264" audioCodec="ac3" audioChannels="6" transcodeHwRequested="1" transcodeHwEncoding="nvenc" transcodeHwEncodingTitle="NVIDIA" transcodeHwFullPipeline="0">

    To be clear, you're using the latest closed source drivers from NVIDIA?

  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited October 4

    May I have all the logs? Settings - Server - Help - Download Logs

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited October 4

    I've just confirmed with the transcoder team.

    Currently, functionality on Nvidia and AMD is best-effort. It is a 'Your mileage may vary' situation.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
  • usnhobbzusnhobbz Posts: 11Members, Plex Pass Plex Pass

    @ChuckPA said:
    If your processor does not support QSV then what you have is the limit at this time.
    https://support.plex.tv/hc/en-us/articles/115002178853-Using-Hardware-Accelerated-Streaming

    I've read that link several times but it does not give the granularity I asked about. It lists NVIDIA as supported under Linux but does not say encode (but no decode). What might I need to install to support decode, if supported? I'm happy with it being "YMMV" and encode only right now, but just curious and I'm sure others have the same question.

  • zabby39103zabby39103 Posts: 16Validating, Plex Pass Plex Pass
    edited October 4

    [Edit] -- going to check on my settings, one sec

  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited October 4

    Our focus for this release is Intel Quick Sync Video. Have you reviewed the support page?

    https://support.plex.tv/hc/en-us/articles/115002178853-Using-Hardware-Accelerated-Streaming

    NVidia and AMD are freebee sweep ups for those who have taken the time to install it on their systems but it's not guaranteed. The holdup for video on Linux has always been Intels libvaapi library. After 2.0.0 is formally released (it's 2.0.0 pre-release now), we will know more .

    This, plus the status of the i915 driver is what gates HAS (Hardware Accelerated Streaming) for us.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
  • zabby39103zabby39103 Posts: 16Validating, Plex Pass Plex Pass

    For what it's worth, I CAN confirm the encode working (the majority of the CPU intensity in a transcode operation)... however, yes I'm getting the same error as you in the Plex Media Server log for what I assume is the decode operation.

    cat Plex\ Media\ Server* | grep -i VAAPI

    gives me all sorts of results

  • uglymagoouglymagoo Posts: 569Members, Plex Pass Plex Pass
    edited October 4

    @zabby39103 said:
    I think the issue is that Plex is (attempting) to use VAAPI to decode the video. VAAPI is not supported by NVIDIA cards. VDPAU must be used. As long as it is trying to use VAAPI it will fail.

    Did you try the package vdpau-va-driver and the included va api to vdpau wrapper?

    PMS on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : Debian repository for armhf and arm64
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon
    My Plex DVR setup: tvheadend, tvhProxy on RPi 2 with Hauppauge WinTV-DualHD; Plex DVR on Shield TV for recordings and Tvheadend Live Channel for live TV

  • zabby39103zabby39103 Posts: 16Validating, Plex Pass Plex Pass
    edited October 8

    @uglymagoo Hey thanks. I checked that out. I have the latest installed version of vdpau-va-driver, set LIBVA_DRIVER_NAME=vdpau in /etc/environment, and ran vainfo successfully (so it should work...).

    However, "Failed to initialise VAAPI connection" still occurs. Perhaps Plex is using it's own driver instead of the system provided one... I'm not sure.

    (I know that any functionality would not be officially supported but it was fun to try)

    vainfo: Supported profile and entrypoints
    VAProfileMPEG2Simple : VAEntrypointVLD
    VAProfileMPEG2Main : VAEntrypointVLD
    VAProfileMPEG4Simple : VAEntrypointVLD
    VAProfileMPEG4AdvancedSimple : VAEntrypointVLD
    VAProfileH264Baseline : VAEntrypointVLD
    VAProfileH264Main : VAEntrypointVLD
    VAProfileH264High : VAEntrypointVLD
    VAProfileVC1Simple : VAEntrypointVLD
    VAProfileVC1Main : VAEntrypointVLD
    VAProfileVC1Advanced : VAEntrypointVLD

    Also I could use emulated VAAPI with mpv

    Playing: input.mkv
    (+) Video --vid=1 () (h264)
    (+) Audio --aid=1 --alang=eng (
    ) (eac3)
    Subs --sid=1 --slang=eng (subrip)
    libva info: VA-API version 0.39.0
    libva info: va_getDriverName() returns 0
    libva info: User requested driver 'vdpau'
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so
    libva info: Found init function __vaDriverInit_0_39
    libva info: va_openDriver() returns 0
    [vo/vaapi] VA-API is most likely emulated via VDPAU.
    [vo/vaapi] It's better to use VDPAU directly with: --vo=vdpau
    Using emulated hardware decoding API.
    AO: [pulse] 48000Hz 5.1(side) 6ch float
    Using hardware decoding (vaapi).
    VO: [vaapi] 1920x1080 vaapi
    AV: 00:00:06 / 01:21:22 (0%) A-V: 0.000

  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    PMS does use its own library files. Regardless of what may be available, LD_LIBRARY_PATH is redefined immediately prior to PMS launch

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
  • aptalcaaptalca Posts: 281Members, Plex Pass Plex Pass
    edited October 11

    Plex tries, vaapi, nvenc, etc. to see if they're supported. Then it uses whatever works (not sure about what priority but my guess is vaapi/qsv would be the first pick since it is officially supported). If all fail, it uses sw

    The problem with nvidia decoding is that plex built their ffmpeg with support for the nvenc encoder, but not the cuvid decoder. That's why it does hw encode, but sw decode

    EDIT: what I wrote above applies to Linux. On windows, plex uses dxva to hw decode on nvidia, so it doesn't need to use cuvid. But dxva is windows only.

    EDIT2: see this post about the plex transcoder (ffmpeg) build details: https://forums.plex.tv/discussion/comment/1496184/#Comment_1496184

  • zabby39103zabby39103 Posts: 16Validating, Plex Pass Plex Pass

    @aptalca thanks for the interesting details... if it is something as simple as the build options on Plex's ffmpeg, hopefully it can be fixed in a future release!

  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    If I may remind everyone?

    This first release of hardware transcoding focused on Intel QSV. Whatever the host OS was able to augment with was the bonus.

    When libva 2.0 is released, Engineering will have a much greater degree of freedom & flexibility.

    There are a lot of plans already but nothing can move forward until after Intel releases 2.0 and it becomes a known entity (many api/abi changes)

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
  • dlasherdlasher Posts: 30Members, Plex Pass Plex Pass

    Not that it's probably needed, but +1 to $any_cpu+NVIDIA card.

    Oct 20, 2017 10:42:29.897 [0x7f4e08bfe700] ERROR - [FFMPEG] - No VA display found for device: .
    Oct 20, 2017 10:42:29.898 [0x7f4e08bfe700] ERROR - [FFMPEG] - No VA display found for device: /dev/dri/renderD128.
    Oct 20, 2017 10:42:29.933 [0x7f4e08bfe700] ERROR - [FFMPEG] - Cannot init CUDA
    Oct 20, 2017 10:42:29.934 [0x7f4e08bfe700] WARN - avcodec_open2 returned -1313558101 for encoder 'h264_nvenc'
    

    drivers/cuda appear happy

    root@plex1:~/Logs# nvidia-smi 
    Fri Oct 20 10:48:47 2017       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 381.22                 Driver Version: 381.22                    |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  GeForce GT 430      Off  | 0000:04:00.0     N/A |                  N/A |
    | 52%   33C   P12    N/A /  N/A |      0MiB /   964MiB |     N/A      Default |
    +-------------------------------+----------------------+----------------------+
    
  • joshuaavalonjoshuaavalon Posts: 21Members, Plex Pass Plex Pass

    I just checked out this thread. It seems like libva 2.0 is released. Hopefully we can see the implementation soon.

    I read that Nvidia GPU does not support decoding. Is it still the case after libva 2.0? I don't have Intel QSV because I am running a server CPU. Am I still able to use hardware acceleration?

  • ChuckPAChuckPA Posts: 18,380Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Libva 2.0.0 is missing a critical function. If you look at github, you'll see it was pushed out to 2.1 which is now scheduled to drop 22-Dec-2017.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: 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 List

     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.

     
Sign In or Register to comment.