Hardware Accelerated Decode (Nvidia) for Linux

Long post but scroll down to the bottom if you’re just looking for what I found in my testing

W10 Test
@TeknoJunky already confirmed what I found. 300mb of vram and about 20% decode on each 50mb transcode. The stream looks pretty good but I’m locked at two due to the geforce crap nvidia does. It sucks but it is what it is. I did notice the occasional hiccup once I kicked up the second transcode even when I had 20+ seconds of buffer, which I found odd. Every 20 seconds or so, I’d have a second of buffering. Then complete lock down when the third (non HW decoded) stream started. which was expected. I turned off all visuals on a clean install of W10 with the latest geforce drivers & PMS v1.15.0.659

Back to the linux docker.
I unlock the 1050ti, run the nvdec script and I’m back with high unusually high vram usage again. What I just now realized was that I wasn’t actually transcoding 4 streams with the 1050ti last night. I was using the 4770’s igpu. If you check my first post, you’ll see a few procs with 45MiB.
That was just encoding and not decoding. Here’s how I can tell.

I queue up a video on an iPad and hit start. nvidia-smi shows 1 process running. I then convert to a 20mpbs 1080p and it starts a second process but the first one doesn’t get killed. That’s the problem I mentioned earlier. I kicked off 2 more streams (different files but all within the same 50-60 mpbs mark) and then restart the docker. All three devices pause for a second but then I’m back to only three full hardware encode/decode processes. I can verify this using the nvidia-smi dmon -s u command and i’m sitting around 60% decode. Awesome sauce but I have a big, blocky problem.

smi-test
Annotation%202019-02-21%20004528

The quality is so poor even, with just the two streams unpatched. The decoder work around is causing artifacts (estimating) 300x600 pixel chunks at a time, scene changes cause complete color loss. Its watchable, it doesn’t buffer, I’m getting awesome transcode speeds and my 4770 is seeing about 25% per stream but it is not up to my standards. If I wanted to watch low bitrate, blocky content, I’d head on over to netflix.

Next steps…I guess
I have a 2080/9900k in my main rig that I’m going setup a test linux PMS on. The new RTX cards are supposed to have better decoders built in (source needed). It should give me more headroom with vram and cpu but I really really really don’t wan’t to be dropping a 1k gpu, into a rack server just to use it as an encoder and the Turing quadros are way out of my reach at this point.

I’m also going to head over to a windows thread to see if anyone else has had that strange buffering issue I ran into. If i could get that fixed, I’d just go get a P2000 and run W10. I don’t want to run into the same problem because that’s again a deal breaker for me. I wonder if the Emby grass is any greener? I’d hate to leave Plex. I’ve been using it for over a decade at this point but 4k is here and if it can’t keep up, it has to go.

TLDR W10 looks great, low vram usage but I ran into stuttering issues with a very healthy buffer. Linux looks terrible but great performance, which I guess isn’t anything new at this point.

2 Likes