Jump to content

HW Acceleration maxes out nVidia RTX 4000 when playing back 4k movie on 1080p display


MBSki

Recommended Posts

MBSki

I just installed a new RTX Quadro 4000 in preparation for HDR tonemapping to hopefully arrive soon. In doing some tests, I was surprised to see that I can't currently play back a 4k movie on a 1080p display. I know HDR tonemapping isn't enabled yet, but shouldn't the RTX card be able to handle a 4k transcode? I can't believe the card is maxing out and not even able to play the movie.  

Link to comment
Share on other sites

MBSki
1 minute ago, Luke said:

Hi there, what happens when you try to play it?

It plays for a few seconds and then just stops. It still holds onto the GPU, but it doesn't play.

Link to comment
Share on other sites

MBSki
3 minutes ago, Luke said:

Ok we'd have to look at an example:

Thanks.

Ok, I'll submit logs.

@pir8radio Do you have similar issues when transcoding 4k videos in Emby using HW acceleration? The movie I tested 2as the last Harry Potter (deathly hallows part 2). I'll test a few more.

Link to comment
Share on other sites

MBSki

@Luke I tested a few more movies. the first few played back ok, but the last one, which is the same movie I tried before, stopped playing after a few seconds. On all movies, the GPU was maxed out. I'll PM the logs to you now.

Link to comment
Share on other sites

You're getting fast enough performance. If you go into server transcoding settings and change the hardware transcoding option to Advanced, what options do you have for hevc decoders? Can you show a screenshot? Thanks.

Link to comment
Share on other sites

MBSki
4 hours ago, Luke said:

You're getting fast enough performance. If you go into server transcoding settings and change the hardware transcoding option to Advanced, what options do you have for hevc decoders? Can you show a screenshot? Thanks.

Here you go. But why does it max out? Even if it is working, why is it maxing out a Quadro RTX GPU? That seems rather extreme when the card is supposed to handle a dozen transcodes at the same time.

image.png.5119dfe9bf0faa1ee2281b7b5cca7a2c.png

image.png.f92a45e78dbf01d9a36cbe8b91d7953a.png

Link to comment
Share on other sites

As a test could you enable the NVDEC.Ex and move it to top spot and give it another try.

If this doesn't improve anything you can easily put it back to how it's shown.

You can also test changing the "Enable throttling" setting but only make one change at a time when testing!

Link to comment
Share on other sites

MBSki
32 minutes ago, cayars said:

As a test could you enable the NVDEC.Ex and move it to top spot and give it another try.

If this doesn't improve anything you can easily put it back to how it's shown.

You can also test changing the "Enable throttling" setting but only make one change at a time when testing!

I tested both and got the same result. So, 2 issues:

  1. GPU maxes out on every movie I've tested.
  2. Certain movies stop playing after a few seconds.

Any other thoughts on why these issues are occurring?

Link to comment
Share on other sites

What do you have currently set for the throttle settings?
If NOT enabled the GPU will do it's best to transcode the whole video as fast as possible and this of course will try to use all resources available to finish as fast as possible.

If ENABLED then the GPU will get used in spurts.  GPU will get used to transcode enough video to get ahead of the client then will throttle/rest until more data is needed by the client.

If you only have an issue with certain movies it could be a number of things we'll have to try and identify.  If you know how the best thing to try first would be to remux the file in case there are bad headers in the file.

We'll need screen shots from the detail screen (bottom) of problem movies along with ffmpeg logs generated during playback to analyze what's going on.

Link to comment
Share on other sites

MBSki
6 minutes ago, cayars said:

If ENABLED then the GPU will get used in spurts.  GPU will get used to transcode enough video to get ahead of the client then will throttle/rest until more data is needed by the client.

I tried it as enabled and the one movie I tried maxed the GPU and stopped playing.

7 minutes ago, cayars said:

If you only have an issue with certain movies it could be a number of things we'll have to try and identify.  If you know how the best thing to try first would be to remux the file in case there are bad headers in the file.

We'll need screen shots from the detail screen (bottom) of problem movies along with ffmpeg logs generated during playback to analyze what's going on.

I PM'd the logs to Luke, I'll PM them to you now too.

Link to comment
Share on other sites

These appear to be problems with the files.  I'll give an example from one of the files.

Harry Potter and the Goblet of Fire (2005)  is kicking out lots of errors:
22:44:49.837 [matroska,webm @ 000001b97ce616c0] File ended prematurely at pos. 222732 (0x3660c)
22:44:49.879 [matroska,webm @ 000001b97ce616c0] Could not find codec parameters for stream 12 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
22:44:58.265 [segment @ 000001b97d4db800] Non-monotonous DTS in output stream 0:1; previous: 3431893, current: 3425503; changing to 3431894. This may result in incorrect timestamps in the output file.
22:44:58.406 [matroska,webm @ 000001b97ce616c0] Element at 0xa22db68 ending at 0xa25dab2 exceeds containing master element ending at 0xa234428
and so on.  These errors repeat all though the transcode and likely can't be cleaned up enough and this trips up the players.

I don't know if a remux will fix these but it's worth a try.

These are of course 4K HDR files and will look washed out when transcoding since you loose the HDR. We're in the process of adding tone mapping to Emby but it's always going to be better to only play 4K media back when it can be direct played and to have an alternate 1080 version as well.  Tone mapping a 4K file to SDR will never equal the quality a movie studio can do when they can adjust things frame by frame as needed.

Link to comment
Share on other sites

6 hours ago, mbarylski said:

Here you go. But why does it max out? Even if it is working, why is it maxing out a Quadro RTX GPU? That seems rather extreme when the card is supposed to handle a dozen transcodes at the same time.

image.png.5119dfe9bf0faa1ee2281b7b5cca7a2c.png

image.png.f92a45e78dbf01d9a36cbe8b91d7953a.png

Try unchecking the top decoder and checking the bottom one and see if that helps.

Link to comment
Share on other sites

MBSki
12 minutes ago, Luke said:

Try unchecking the top decoder and checking the bottom one and see if that helps.

I did that and it didn't work. it's the AVC encoder that appears to be the problem. If I uncheck that, it works.

Carlo says I've got errors in my files and the only fix is cleaning them up. Copies from MakeMKV have worked for me for a long time so I don't quite understand why they won't work when transcoding. Is there anything that can be done with that AVC encoder to get it to work? 

Link to comment
Share on other sites

GWTPqZp6b

I’d try some demo files which are known to be problem free, there are various bitrates available on the jellyfin site I’ve used for testing before. 
I very much doubt your GPU is maxing out with one stream, the RTX4000 will handle many easily. Try installing nvtop to see some perf data too. 
my guess is a corrupt stream as GPU transcoding is more susceptible to errors and flaws in my experience so good to rule that out first. 
 

edit. Added link https://jell.yfish.us

Edited by GWTPqZp6b
Link to comment
Share on other sites

3 hours ago, mbarylski said:

Carlo says I've got errors in my files and the only fix is cleaning them up. 

I'm saying I'm seeing lots of errors in the ffmpeg log files and I would try to remux the files since this is a quick test.

GPU transcoding is not as forgiving as CPU transcoding is.

The remux may not help but we won't know this until it's tried.

We can also compare the log from before the mux with one after for differences as well.

Link to comment
Share on other sites

rbjtech

Turn off GPU transcoding - play the file with CPU transcoding - if that works, then the issue is with the GPU transcoding, not the file ... ;)

Link to comment
Share on other sites

MBSki
14 minutes ago, rbjtech said:

Turn off GPU transcoding - play the file with CPU transcoding - if that works, then the issue is with the GPU transcoding, not the file ... ;)

That's my thought, and yes, it does work with CPU transcoding. It actually works with just the AVC encoder unchecked. But, Carlo says it's all about errors in the file. So, what am I supposed to do? Kinda stuck. I'd think the card would be able to transcode a file coming from MakeMKV, but apparently not. 

Link to comment
Share on other sites

rbjtech

Did you try 4K files from other sources - are they ok via the GPU transcode ?

If yes, then there might be an incompatibility issues with the way MakeMKV is muxing the file - which is why Carlo said to try demuxing it (into it's .h265 and audio parts) and then remuxing it back using another tool (mkvtoolnix for example). 

 

Link to comment
Share on other sites

MBSki
18 minutes ago, rbjtech said:

Did you try 4K files from other sources - are they ok via the GPU transcode ?

If yes, then there might be an incompatibility issues with the way MakeMKV is muxing the file - which is why Carlo said to try demuxing it (into it's .h265 and audio parts) and then remuxing it back using another tool (mkvtoolnix for example). 

Practically everything I get is from MakeMKV, so if those files don't work then for me at least, the card is a bust. Someone else suggested testing these, so I'll give these a shot. I imagine they'll work, but if the MakeMKV files don't work ... well ... that's a huge disappointment.

Link to comment
Share on other sites

Well we honestly don't know yet without the remux test so it's just speculation based on the errors seen in the logs.

But when you see things like "Queue input is backward in time", "Element at 0x1393816e ending at 0x1393c833 exceeds containing master element ending at 0x1393adac",
"Non-monotonous DTS in output stream 0:1; previous: 6216313, current: 6128353; changing to 6216314. This may result in incorrect timestamps in the output file." and many other timings related errors it begs a remux test to see if it helps fix the problem before diving in farther.

So I'm surely not saying this is the problem but want to try and rule it out with the remux test.  At least see what errors change in the log with the remux.

I do want to ask a general question however since this is a HDR file being transcoded.  When it was playing after being transcoded were you OK with the colors?

Link to comment
Share on other sites

MBSki
48 minutes ago, cayars said:

When it was playing after being transcoded were you OK with the colors?

Yes, actually which is a bit odd considering I'm not running a version of Emby with HDR to SDR tonemapping. I'll run again with some more colorful scenes to see how it is.

I'll try to remux too.

Edited by mbarylski
Link to comment
Share on other sites

Looked at the logs from the JF files and they looked clean with no errors.

When you say froze it just stops playing or are you doing any ff/rw type things?
What clients have you tested in?

Link to comment
Share on other sites

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...