Jump to content

GPU Transcoding Slow


Go to solution Solved by bradford,

Recommended Posts

Posted

Emby is detecting my Quadro P400 and when I start watching a 4k HEVC source the dashboard shows the following:

 

5d07e3f85c3c2_Capture.jpg

 

16 fps is what I would expect from a CPU transcode, and I am seeing one of my 8 cores pegged at 100% with ffmpeg. 

`nvidia-smi` shows the ffmpeg process, but it's not using the GPU:

 

5d07e45bad3e5_Capture.jpg

 

Logs are attached. Any ideas what's going on? It worked a bit ago, with the 418 driver, I'm on 430 now. Maybe that is the difference? 

 

Log.txt

Posted

And the ffmpeg log?

Posted

According to the Nvidia Video Encode and Decode Matrix the P400 should work: https://developer.nvidia.com/video-encode-decode-gpu-support-matrix

 

But maybe it doesn't have the power for a 4k transcode? I guess I assumed that if it was capable of it it could do it faster than 16 fps. The weird thing is, it's not even using the GPU in my case even though ffmpeg is being reported in nvidia-smi. 

Posted

Well this is transcoding 4k to 4k. Maybe that's just as fast as it can go? Can you try lowering the in-app quality setting to 1080p?

  • Solution
Posted (edited)

Well this is transcoding 4k to 4k. Maybe that's just as fast as it can go? Can you try lowering the in-app quality setting to 1080p?

I did try that and the performance was the same.

 

I dug a little deeper into nvidia-smi output. I was wrong about the process not using the GPU, I was reading the output of `nvidia-smi` wrong - utilization is per GPU and is listed there instead of per-process. Some benchmarks:

 

4k (HEVC) -> 4k transcode: ~14fps, GPU utilization from 45-52% via `nvidia-smi`, one core spikes up to 100% regularly

4k (HEVC) -> 720p transcode: ~20fps, GPU utilization from 25-33% via `nvidia-smi`, one core spikes up to 100% regularly

1080p (high bitrate AVC) -> 720p transcode: 140+ fps, GPU utilization spikes around 16% via `nvidia-smi` but heavily throttled based on setting, one core spikes up to 100% occassionally

 

So more taxing loads (4k to 4k hevc) use more of the GPU but neither can match the source framerate. I wonder if there's a single-thread process that's throttling me, like audio transcoding (since the 4k source requires audio and video transcoding to play in the browser) - I recall from another thread that audio transcoding can't be offloaded to the GPU and is single threaded so my relatively weak Atom 2785 single core performance might be the limiting factor here.

Edited by bradford
Posted

Ah yes that is possible.

Posted

Doing a little more reading it looks like there's not many multi-threaded or GPU enabled audio codecs. Too bad. Looks like I have another reason to upgrade my main pc and repurpose my Ryzen 1800x for my server. Sorry for wasting your time, hope this helps someone in the future. 

 

An enhancement request could be representing the -stats output of ffmpeg in the server dashboard, or maybe you're already doing that.

Posted

Thanks for the feedback.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...