# Hardware Accelerated Decode (Nvidia) for Linux

**URL:** <https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510>\
**Category:** Feature Suggestions\
**Created:** [April 23, 2018, 10:09am UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510 "2018-04-23T10:09:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlameSky](https://avatars.discourse-cdn.com/v4/letter/f/aca169/32.png) [@FlameSky](https://forums.plex.tv/u/FlameSky)\
**Post date:** [April 23, 2018, 10:09am UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/1 "2018-04-23T10:09:09Z")

</div>

Hi there, I’m new to Plex and this is my first post.

**What I’m requesting is : Hardware Accelerated Decode with Nvidia Cards for Linux.** I think this feature will be super helpful to cut down the CPU overhead when transcoding videos on a Linux server.

I’m using plex server with Ubuntu(18.04 beta) for now and I have a GeForce GTX1050 card installed on my HP MicroServer Gen10. The CPU(AMD Opteron X3216) is very slow and that’s why I bought the video card.

I’ve tried turning on the hw acceleration in the settings and my cpu usage is still 100% when transcoding videos due to the lack of hw decoding. I’ve tried transcoding the same video using the latest Emby beta version, which has both hw encode & decode features for Nvidia cards. My cpu will perform at around 40%-80% when both hw encode & decode is activated.

Will you guys add this Nvidia hw decode feature to Plex server for Linux versions? I don’t know if I’m right but I think it’s just an extra option when compling ffmpeg. I prefer using Plex and really don’t want to switch to Emby. I’d really appreciate it if you would add this feature in the coming releases. If you don’t plan on implementing it, please also let me know. Thank you and sorry for my broken English.

---

<div class="post-metadata">

**Author:** ![drevilish](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@drevilish](https://forums.plex.tv/u/drevilish)\
**Post date:** [April 29, 2018, 8:57pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/2 "2018-04-29T20:57:36Z")

</div>

Give this article a read.

[https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/](https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/)

---

<div class="post-metadata">

**Author:** ![FlameSky](https://avatars.discourse-cdn.com/v4/letter/f/aca169/32.png) [@FlameSky](https://forums.plex.tv/u/FlameSky)\
**Post date:** [May 15, 2018, 9:25am UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/3 "2018-05-15T09:25:26Z")

</div>

> @drevilish said:  
> Give this article a read.
> 
> [https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/](https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/)

I’ve read that. In fact that’s the very article which confirms there’s no support for HW decoding on linux with NVIDIA cards.  
Here’s what it says in the “_Linux system requirements_” section:

> If your computer has an NVIDIA GPU, please install the latest Latest NVIDIA drivers for Linux to make sure that Plex can use your NVIDIA graphics card for video encoding (only) when Intel Quick Sync Video becomes unavailable.

---

<div class="post-metadata">

**Author:** ![revr3nd](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@revr3nd](https://forums.plex.tv/u/revr3nd)\
**Post date:** [August 10, 2018, 4:35pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/4 "2018-08-10T16:35:00Z")

</div>

+1 vote for this. I have a physical server which hosts my Plex among other work related workloads. Due to this, Plex needs to be virtualized and my server does not support PCI passthrough. This means I cannot pass through the GPU to a Windows VM. So, my workaround here is running Plex on a LXC container and sharing the physical GPU from the host to the container.  
Plex itself works great, but I cannot even try to spin up 4K media due to the lack of NVDEC support on Linux.

The FFMPEG library added support for NVDEC in Nov-2017. [https://www.phoronix.com/scan.php?page=news\_item&px=FFmpeg-NVDEC-HEVC-VP9](https://www.phoronix.com/scan.php?page=news_item&px=FFmpeg-NVDEC-HEVC-VP9)

I’ve been hoping to see this added, which would hopefully just be updating the library in use. Please add support for this!

---

<div class="post-metadata">

**Author:** ![boboki](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/boboki/32/3874_2.png) [@boboki](https://forums.plex.tv/u/boboki)\
**Post date:** [August 11, 2018, 8:07pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/5 "2018-08-11T20:07:05Z")

</div>

I currently use HW transcoding with nvidia in linux, so yes it does work. You will need to post questions on what you are doing wrong to get it working. I currently use it with my P2000 and it works amazingly well, so well in fact I recommend it over a large CPU.

---

<div class="post-metadata">

**Author:** ![revr3nd](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@revr3nd](https://forums.plex.tv/u/revr3nd)\
**Post date:** [August 11, 2018, 8:47pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/6 "2018-08-11T20:47:58Z")

</div>

There is constant misunderstanding of what is and is not supported with Linux and hardware transcoding…  
Plex on Linux supports all platforms for hardware encoding, and my M2000 handles that like a champ.  
Plex on Linux ONLY supports hardware decoding with Intel’s Quicksync. This is due to the FFMPEG library version that Plex uses which does not support NVDEC. This means any Intel Xeon CPUs with Nvidia GPUs are stuck with software decoding (like my DL 380 server). This is fine for 1080p media, but even 12 CPUs will choke on software decoding 4K media and the transcoder will crash.

---

<div class="post-metadata">

**Author:** ![boboki](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/boboki/32/3874_2.png) [@boboki](https://forums.plex.tv/u/boboki)\
**Post date:** [August 13, 2018, 1:00am UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/7 "2018-08-13T01:00:53Z")

</div>

I think I am confused, you are correct. I currently use a P2000 in my PMS and can easily have more than 5 4k transcodes going live without even coming close to maxing out the GPU. That is, to be clear, over 5 people playing 4k media off my server being transcoded live so they can watch, and it works without issue.  
Running standard linux-generic-hwe-16.04 with the basic nvidia drivers and everything seems to work without issue. Mind you, when someone plays 4k content and it needs to transcode it it does not do the audio, CPU has to do that, but everything else goes to my P2000. Can you explain what it is you guys are doing that does not go to your GPUs?

Here is 4 live transcodes going:

```auto
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.59 Driver Version: 390.59 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro P2000 Off | 00000000:01:00.0 Off | N/A |
| 50% 41C P0 20W / 75W | 280MiB / 5057MiB | 1% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 18862 C /usr/lib/plexmediaserver/Plex Transcoder 62MiB |
| 0 20982 C /usr/lib/plexmediaserver/Plex Transcoder 77MiB |
| 0 21029 C /usr/lib/plexmediaserver/Plex Transcoder 68MiB |
| 0 21131 C /usr/lib/plexmediaserver/Plex Transcoder 62MiB |
+-----------------------------------------------------------------------------+

```

---

<div class="post-metadata">

**Author:** ![drivintin](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drivintin/32/93193_2.png) [@drivintin](https://forums.plex.tv/u/drivintin)\
**Post date:** [August 21, 2018, 1:36am UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/8 "2018-08-21T01:36:31Z")

</div>

The Plex Transcoder for linux needs an update to support decoding. Currently the Plex Transcoder ONLY supports hardware encoding for linux and NOT decoding.

With an updated FFmpeg then the P2000 (for instance) will support BOTH decoding AND encoding. It does not require QSV to function correctly.

If you look boboki, your CPU is still being used to decode the stream, then the encode occurs on the P2000.

---

<div class="post-metadata">

**Author:** ![boboki](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/boboki/32/3874_2.png) [@boboki](https://forums.plex.tv/u/boboki)\
**Post date:** [August 24, 2018, 5:01pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/9 "2018-08-24T17:01:51Z")

</div>

hmmm I assumed that was just the audio stream being transcoded, perhaps that answers why after 7 4k streams my i7-2600k was being owned. I thought the audio should not take THAT much cpu. Thank you for explaining this to me, +1 me up sir!

---

<div class="post-metadata">

**Author:** ![basic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/basic/32/123986_2.png) [@basic](https://forums.plex.tv/u/basic)\
**Post date:** [September 4, 2018, 3:37pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/10 "2018-09-04T15:37:10Z")

</div>

From what I can see, the ffmpeg-2018-03-22.tar.gz source is based off of ffmpeg 3.4 (plex-media-server-ffmpeg-gpl-09988bd25fb23a0b2386468667d51ae2349d6516). Once this is updated/rebased to ffmpeg 4.0+, support for NVDEC will be included: [https://github.com/FFmpeg/FFmpeg/blob/release/4.0/Changelog](https://github.com/FFmpeg/FFmpeg/blob/release/4.0/Changelog) - “NVIDIA NVDEC-accelerated H.264, HEVC, MJPEG, MPEG-1/2/4, VC1, VP8/9 hwaccel decoding”

Is this already on the roadmap perhaps?

---

<div class="post-metadata">

**Author:** ![Altheran](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/altheran/32/8355_2.png) [@Altheran](https://forums.plex.tv/u/Altheran)\
**Post date:** [September 6, 2018, 2:27pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/11 "2018-09-06T14:27:48Z")

</div>

@gbooker02

Any idea if an up to date ffmpeg library is on the horizon ? ETAish ?  
That would enable some serious transcoding with a p2000 …

---

<div class="post-metadata">

**Author:** ![drivintin](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drivintin/32/93193_2.png) [@drivintin](https://forums.plex.tv/u/drivintin)\
**Post date:** [September 6, 2018, 3:01pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/12 "2018-09-06T15:01:05Z")

</div>

The problem isn’t that ffmpeg doesn’t have support, it is that you have to compile cuda support in. So the Plex Transcoder could add support just by adding the needed libraries, but for what ever reason they have chosen not to. It might be a lot deal with the cuda libraries compatibility with certain nvidia drivers that is causing them to pause. You can get the Plex Transcoder source and compile it yourself, but I haven’t gotten it to work cleanly.

---

<div class="post-metadata">

**Author:** ![boboki](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/boboki/32/3874_2.png) [@boboki](https://forums.plex.tv/u/boboki)\
**Post date:** [September 6, 2018, 6:08pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/13 "2018-09-06T18:08:13Z")

</div>

Oh man, if someone could make this happen this would be amazing.

---

<div class="post-metadata">

**Author:** ![aptalca](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@aptalca](https://forums.plex.tv/u/aptalca)\
**Post date:** [September 6, 2018, 9:12pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/14 "2018-09-06T21:12:07Z")

</div>

Ffmpeg supported nvidia decode since forever.

The issue here is that when plex compiled their transcoder (which is ffmpeg) they specified all encoder and decoders one by one. Although they included nvenc, which is the encoder, they did not include cuvid, which is the decoder. When I brought it up a year ago, they weren’t interested in fixing it that way, but instead said nvidia on linux was not officially supported.

Their point was that they would like to include the display drivers in their package before they officially support a platform, like they do with intel igpus. At the time they were waiting for open source drivers to include nvidia hw encode/decode (through vaapi) so they could include those instead of the closed source nvidia drivers (cuvid and nvenc). But I guess that didn’t happen yet? I don’t know, I stopped following.

Anyway, here’s the convo I had with the plex team a year ago: [Plex Media Server - Hardware Transcoding Preview 4 (1.8.1.4140)](https://forums.plex.tv/t/plex-media-server-hardware-transcoding-preview-4-1-8-1-4140/202110/580)

---

<div class="post-metadata">

**Author:** ![boboki](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/boboki/32/3874_2.png) [@boboki](https://forums.plex.tv/u/boboki)\
**Post date:** [September 7, 2018, 9:19pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/15 "2018-09-07T21:19:35Z")

</div>

I wonder if @ChuckPa has an update for us then? I mean, since VAAPI did not happen, and the popularity of the Quadro series is now finally starting to get serious attention (and it is amazing) I would think maybe it is time they jumped and just went ahead and did it? I know I certainly would love to really use my P2000 for both sides and just watch my PMS blaze those users 😉

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [September 7, 2018, 10:37pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/16 "2018-09-07T22:37:50Z")

</div>

I have updates, I’m not sure if you’ll find them of particular interest 😉

I can tell you I’ve been super busy working on stuff.  
Some of what I did is already visible but nobody’s seen what we the team has been up to.  
You’re about to.

You’ll see the fruits of some _required_ steps in a couple weeks or less. (last minute tweaks to make it perfect).

I cannot, will not, and will never consider speaking directly to the FFMPEG question but do ask everything to think about the differences between a free public program and business.

One thing I can speak directly to:

Next Thursday, which is Good Friday,  
There’ll be a Ladies meeting for Men only.  
We’ll have plenty of square tables with round corners.  
You’re all welcome to pull up a chair and sit on the floor.

😃

---

<div class="post-metadata">

**Author:** ![kbu9999\_gmail.com](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@kbu9999\_gmail.com](https://forums.plex.tv/u/kbu9999_gmail.com)\
**Post date:** [September 8, 2018, 7:11pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/17 "2018-09-08T19:11:26Z")

</div>

+1 vote, i have a Quadro p2000 card and i need hw decode on linux, now it’s complicated for me to switch to windows (filesystem, without ssh, etc)

I would appreciate it

---

<div class="post-metadata">

**Author:** ![drivintin](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drivintin/32/93193_2.png) [@drivintin](https://forums.plex.tv/u/drivintin)\
**Post date:** [September 8, 2018, 8:56pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/18 "2018-09-08T20:56:28Z")

</div>

Is it possible just to get the “./configure” params you guys use for building ffmpeg? I am sure you are building off static libraries, and I am comfortable setting that up, I am just trying to see if I can get a stable copy of Plex Transcoder to compile.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [September 8, 2018, 9:11pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/19 "2018-09-08T21:11:01Z")

</div>

That information is considered Company Confidential.

Sorry.

---

<div class="post-metadata">

**Author:** ![revr3nd](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@revr3nd](https://forums.plex.tv/u/revr3nd)\
**Post date:** [September 8, 2018, 9:29pm UTC](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510/20 "2018-09-08T21:29:09Z")

</div>

Thank you for coming into this ChuckPA. You guys are always working on interesting stuff. In regards to NVDEC on Linux, you had stated above you would not want to comment regarding FFMPEG, so I won’t press that.

But would you be willing to comment if there is any roadmap item to support this?

At this point, to really start doing 4K media, I have to build a dedicated, purpose built, Plex box with a mix of consumer and professional hardware as opposed to leveraging my existing hardware. I would like to see if I should plan that in my budget or not if possible.

Definitely appreciate the work you guys do, thank you.

[Next page](https://forums.plex.tv/t/hardware-accelerated-decode-nvidia-for-linux/233510.md?page=2)
