Jump to content

QuickSync (All?) Tone Mapping broken - Docker LXC w/ vGPU mapping


Recommended Posts

MavericK96
Posted (edited)

A lot going on here.  Took me forever to get HW transcoding working with this new Emby server I'm testing.  Using an Intel n305 mini-PC running Proxmox, running an unprivileged LXC and using vGPU to pass through the Intel iGPU to a Docker container running Emby (latest stable version 4.8.3.0).

Transcoding works great, I have both QuickSync and VAAPI to choose from and they both work.  However, if I engage QuickSync tone mapping, suddenly I get the output shown in the screenshot below.

Actually, if I try to run VAAPI tone mapping, it just does nothing - doesn't show that it's tone mapping at all in the Stats.  Video playback is still okay in that case.

I'm not sure what logs to include so I did both the Emby server and the FFMPEG transcode logs.

Any ideas?  I can of course just turn off tone mapping, but it seems preferable to have it on.

Thanks for any help.

Screenshot 2024-03-13 203927.png

embyserver (1).txt ffmpeg-transcode-ba1393fa-b5fa-43e9-a4ed-2d9f0395f68b_1.txt

Edited by MavericK96
Added VAAPI info
MavericK96
Posted

Okay, a bit more info about this.  I tried setting up an unprivileged Debian LXC and installing Emby straight on it rather than using Docker.  Same exact issue, VAAPI seems to work with tone mapping (assuming VAAPI transcoding is prioritized), but QuickSync gives the above.  Without tone mapping, QuickSync seems to work okay.

Is there some sort of limitation here I'm not understanding?

  • 1 month later...
Posted

QuickSync uses OpenCL tone mapping. For VAAPI, you can choose. Can you try to change the tone mapping methd for VAAPI? (Emby Transcoding settings, second tab)

We are recently seeing some frequency of reports about OpenCL.

@alucryd- what's the status? Does it make sense to try the latest beta for comparison?

  • 2 months later...
alucryd
Posted

@adminExitiumApologies for the delay. If possible please give the latest beta a try, should fix your issue. Note that you won't be able to go back to the current stable afterward though, so if you can wait a bit longer we will backport the changes in the next stable release.

adminExitium
Posted

I think you meant to ping @MavericK96. I don't really use tonemapping so haven't faced any issues with transcoding. Was just helping with the root cause since I have also seen similar threads on the plex forums about it.

MavericK96
Posted
5 hours ago, alucryd said:

@adminExitiumApologies for the delay. If possible please give the latest beta a try, should fix your issue. Note that you won't be able to go back to the current stable afterward though, so if you can wait a bit longer we will backport the changes in the next stable release.

I'll check it out - thanks!

Posted

I remember when I used this script for LXC I had to use vaapi also https://tteck.github.io/Proxmox/. Is there a reason you do not want to use VAAPI? I thought they were essentially the same thing.

MavericK96
Posted
12 minutes ago, guunter said:

I remember when I used this script for LXC I had to use vaapi also https://tteck.github.io/Proxmox/. Is there a reason you do not want to use VAAPI? I thought they were essentially the same thing.

Well from my original post, VAAPI didn't actually work either.  It would play the video, but no tone mapping was being done.  Generally, I try to use Quicksync because it's faster than VAAPI.

Posted

If you're just a fresh install try the tteck script. It maps everything for you.

  • 2 months later...
Posted
4 hours ago, Luke said:

@MavericK96has this helped?

I haven't messed with it in an LXC in awhile, I'll try it again sometime soon.

  • Like 1
Posted
22 hours ago, MavericK96 said:

I haven't messed with it in an LXC in awhile, I'll try it again sometime soon.

HI, that would be great. Thanks.

  • Like 1
  • 1 month later...
Posted (edited)

I think this is still an issue in an LXC container.

I've tried both the release versions and beta versions of Emby.  I've tried kernel 6.8 and 6.11, I've tried VAAPI (OpenCL and VAAPI tone mapping) and QuickSync.  I've tried installing updated Intel compute packages... the only thing that gets it to work with hardware transcode is to disable tone mapping which obviously then looks completely washed out.

Edit:  though I don't get the garbled display - I just get a fallback to SW encoding as shown in the logs.

 

ffmpeg-transcode-04078ffc-efdb-4b10-aaf7-20e823b09692_1.txt

Edited by jhoff80
  • Like 1
Posted

Thanks for testing - I realized I don't think I have my test LXC set up for this anymore.

Posted
On 11/16/2024 at 12:59 PM, jhoff80 said:

I think this is still an issue in an LXC container.

I've tried both the release versions and beta versions of Emby.  I've tried kernel 6.8 and 6.11, I've tried VAAPI (OpenCL and VAAPI tone mapping) and QuickSync.  I've tried installing updated Intel compute packages... the only thing that gets it to work with hardware transcode is to disable tone mapping which obviously then looks completely washed out.

Edit:  though I don't get the garbled display - I just get a fallback to SW encoding as shown in the logs.

 

ffmpeg-transcode-04078ffc-efdb-4b10-aaf7-20e823b09692_1.txt 1.53 MB · 1 download

I have tone mapping w/ IGPU working in my LXC container but it's an intel i5-8290u. Are you doing priv or unprivileged LXC and did you make sure to properly chmod /dev/dri on the host?

Posted (edited)
3 hours ago, guunter said:

unprivileged LXC and did you make sure to properly chmod /dev/dri on the host?

Unprivileged.  Yes, I'm pretty sure permissions are correct on the host and in the container, I definitely set those up.  I'm also by no means a Linux expert, but I also tried creating a brand new container using helper-scripts.com and seeing the same issue.  As soon as I turn on HW tone mapping, hardware transcode is broken and the frame rate drops to like 10fps.

Like I mentioned, HW transcoding is working perfectly as long as tone mapping is off so I'm assuming I'm just running into the issue adminExitium mentioned above?

This is with an Arc A310, no onboard graphics.  Not sure if that's a factor.

Edited by jhoff80
Posted
2 hours ago, jhoff80 said:

Unprivileged.  Yes, I'm pretty sure permissions are correct on the host and in the container, I definitely set those up.  I'm also by no means a Linux expert, but I also tried creating a brand new container using helper-scripts.com and seeing the same issue.  As soon as I turn on HW tone mapping, hardware transcode is broken and the frame rate drops to like 10fps.

Like I mentioned, HW transcoding is working perfectly as long as tone mapping is off so I'm assuming I'm just running into the issue adminExitium mentioned above?

This is with an Arc A310, no onboard graphics.  Not sure if that's a factor.

Ah okay if it works without tone mapping then yeah its passed throw correctly.

 

Some googling Did you try an even lower proxmox kernel? someone said 6.8 is bugged and 6.5.13-2 worked or them

Posted (edited)

Sorry, missed that reply.  I have not yet tried a lower Proxmox kernel than what was installed by default, only 6.8 and the opt-in 6.11.  Likely to be a week or two before I can try that with the upcoming holiday.  For now I'm just leaving tonemapping off.

Edited by jhoff80
  • Thanks 1
Posted

Looks like 6.5.13-6 is working properly with HW tonemapping enabled.

  • Like 1
  • Thanks 1

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