Jump to content

Hardware Accelerated Tone Mapping does not work


MrMackey

Recommended Posts

MrMackey

Greetings,

I am using the Official Emby 4.8.1.0 Docker on Unraid

when I try to play a movie with Hardware Accelerated Tone Mapping it doesn't start, I just get this error message after a few seconds.

Screenshot2024-02-12111824.png.f6b8d236370058bfc64c64abb2c004c6.png

If I deactivate Hardware Accelerated Tone Mapping it works.

Screenshot2024-02-12111321.png.b5b9ba7bf4097fa04ff9ccb2fd81c5e6.png

Here are the logs from the failed attempt with Enable Hardware Accelerated Tone Mapping.

embyserver.txtffmpeg-remux-32abfc33-2c41-4263-9fac-18cb8315eff4_1.txtffmpeg-remux-abc7e5a1-facb-435c-bad5-f2a9cf1ca5c7_1.txtffmpeg-transcode-e69e92c8-1b18-4cbd-a60c-d48b2b6f4500_1.txtffmpeg-transcode-f5bd6618-368e-4e51-9b03-c67d32865fe8_1.txthardware_detection-63843333437.txt

Link to comment
Share on other sites

 @MrMackey

Thanks for the logs. This might be just a bit too much for the Atom CPU/GPU, to do tone mapping on 4k frames.

Can you please try:

  • Whether it works when you scale down to a lower resolution in the client (like 720p)?
  • Whether it works with Super-T instead of Extra-T (keep the low resolution)?
  • Whether it works when changing all encoders and decoders to VAAPI?

Thanks

  • Thanks 1
Link to comment
Share on other sites

MrMackey

@softworkz

Thank you for your help!


Indeed it is not the strongest igpu, but I believe I remember that it worked with emby 4.7.14

  • I tried with 720p but it was the same result the movie doesn't start at all.
  • With Super-T the result was also the same the movie doesn't start at all.
  • It only worked when I set it to Vaapi and Vaapi HW Tone Mapping. But this Tone Mapping is a little too dark for my taste.

Screenshot2024-02-15004851.png.5e1bba9141db8fc4a4ea9b80173c7540.png

Here are the logs where it works with Vaapi HW Tone Mapping.

embyserver.txtffmpeg-transcode-637be3a5-ea2e-41d3-aebd-32dc48a79590_1.txt

Edited by MrMackey
Link to comment
Share on other sites

MrMackey

@softworkz

Thankfully I made a full backup of 4.7.14 before updating to 4.8.1.0

So I installed the Docker version 4.7.14 for testing.

There Hardware Accelerated Tone Mapping works with Quicksync and the transcoding speed is twice as fast.

Screenshot2024-02-161111388.png.acba0731aeee5e6c4b8bdadcbab3ebf6.png

Here are the logs of version 4.7.14

embyserver.txtffmpeg-transcode-4a4305f2-8ebf-4a0b-94ab-21d92a6a488b_1.txthardware_detection-63843678663.txt

 

Link to comment
Share on other sites

Thanks for the logs. Yet, those from 4.7 are including a scale-down to 1080 opposed to the ones from 4.8, so it's not an equal comparison.

But lets try to check the OpenCL driver installation. Can you please (install and) run clinfo inside each of the Docker containers?

Link to comment
Share on other sites

MrMackey
1 hour ago, softworkz said:

Can you please (install and) run clinfo inside each of the Docker containers?

Unfortunately, I have no idea how I can run this in the docker container. I have not found a way to download anything in the Docker container.

Edited by MrMackey
Link to comment
Share on other sites

MrMackey
1 hour ago, softworkz said:

Yet, those from 4.7 are including a scale-down to 1080 opposed to the ones from 4.8, so it's not an equal comparison.

That is interesting but I have set it to 4k 40 mbit  Screenshot2024-02-17224458.png.90eab5eb8b2d751c80258569841c3bd1.png

Link to comment
Share on other sites

Happy2Play
14 minutes ago, MrMackey said:

That is interesting but I have set it to 4k 40 mbit  Screenshot2024-02-17224458.png.90eab5eb8b2d751c80258569841c3bd1.png

Don't know the thresholds but 4K -40mbps is irrelevant as only bitrate matters so you are getting scaling at 40mbps to 1080.  Just like there is no such thing as 1080p - 4Mpbs.

The resolutions really need to be dropped from the quality or enforce resolution with bitrate.  But mentioned in other topics.

 

  • Like 1
  • Agree 1
Link to comment
Share on other sites

MrMackey

@softworkz
Could you tell me how I can install clinfo inside the Docker container? Unfortunately, all my attempts have failed.

Link to comment
Share on other sites

8 hours ago, MrMackey said:

@softworkz
Could you tell me how I can install clinfo inside the Docker container? Unfortunately, all my attempts have failed.

Hi there, what exactly happens when you try?

Link to comment
Share on other sites

MrMackey

@Luke
Hello,
First I tried to download clinfo in the docker container via apt-get, apk, yum, dnf, zypper.
But none of them worked.
Then I downloaded clinfo on my windows pc and copied it into the docker container and tried to start it but that didn't work either.

Sorry for being so stupid but my knowledge about docker containers is quite limited.
Screenshot2024-02-20114815.png.f8fa924685d3a1af94c671e377316f88.png

Edited by MrMackey
Link to comment
Share on other sites

alucryd

@MrMackeyOur images are based on busybox, so chances are you won't have what is required to run external binaries on it. The error you get is probably because it's not executable, a simple `chmod +x clinfo` should make it possible to run `./clinfo` afterwards, but only if it was built against a glibc version that is not newer than ours.

We will ship our own clinfo in the next images so you could wait for that, or temporarily switch to the LinuxServer image which comes with a package manager and should let you install clinfo from its repositories. https://docs.linuxserver.io/images/docker-emby/

Edited by alucryd
Link to comment
Share on other sites

MrMackey

@alucryd
Many thanks for the update. I guess I have to use the LinuxServer image for 4.7.14. because it's not worth building it extra for this test, right?

Link to comment
Share on other sites

alucryd

Yeah, if you mean to stay on the stable release it would be easier to carry the tests out on the LinuxServer image. I could provide a prebuilt clinfo, but I can't give an ETA so the quickest route is LinuxServer for now.

Link to comment
Share on other sites

MrMackey

@softworkz@alucryd

Okay I used the LinuxServer Docker image and was able to successfully install clinfo.

For both Docker container 4.7.14 and 4.8.1 the output was the same "Number of platforms 0"

Do I have to install something else or include it when I run clinfo?

Screenshot2024-02-22141442.thumb.png.9719f27ce0649d935e3e12dcc6d6abb9.png

However, the behavior was the same as with the official Emby Docker container:
4.7.14 Hardware Accelerated Tone Mapping works with Quicksync
4.8.1 Hardware Accelerated Tone Mapping dosent work with Quicksync

Thank you very much for your help!

Link to comment
Share on other sites

It's interesting that clinfo shows 0 but still works on one of them.

It's possible that the environment variable settings are missing. We have some stub scripts for ffmpeg which allows you to run ffmpeg manually in the same way as it is run by emby server.

Those scripts are called like "emby-ffmpeg", probably in the "/bin" folder (I'm not sure for Docker).
Can you try to copy "emby-ffmpeg" to "emby-clinfo" and then change the last line to execute "clinfo" instead of ffmpeg and run it this way?

Link to comment
Share on other sites

MrMackey

@softworkz

Hi,

I have found the emby-ffmpeg in /app/emby/bin


Screenshot2024-02-22181039.png.fbf569943ae2d664df31af1472c2145d.png

There I copied "emby-ffmpeg" to "emby-clinfo" and made the following changes as shown in the screenshot. I hope this is correct.

Screenshot2024-02-22181109.png.557012f3b5a0ad142d33f651652e9813.png

However, when running it I got the same result Number of platforms 0

Screenshot2024-02-22181135.png.cbfa1507bcbb57ab1a7df53197be0933.png

This attempt was with the Emby LinuxServer image 4.7.14

Link to comment
Share on other sites

Okay, thanks this looks like all done right.

Did you check whether OpenCL tone mapping is working with this Docker image?

Link to comment
Share on other sites

MrMackey

Yes, I just checked it again to make sure, here are the logs again so you can have a also look


Screenshot2024-02-22183253.png.ae4cb11dac6fb27dbe087698fe959860.png

This is from the Emby LinuxServer image 4.7.14

Oh wait how can I select OpenCL in 4.7.14?
Or do you mean with the 4.8.1 Docker container?

embyserver.txtffmpeg-transcode-4df408a5-2801-400e-85b5-b79408aeee79_1.txthardware_detection-63844223512.txt

Edited by MrMackey
Link to comment
Share on other sites

Okay, this appears to be working.

I couldn't remember it, but now I found the "secret" command in my notes which causes ffmpeg to list the OpenCL devices that it can "see" - which is more relevant (closer to the truth) than clinfo:

emby-ffmpeg -v debug -init_hw_device opencl 

Can you please run this and show the result?

Edited by softworkz
Link to comment
Share on other sites

MrMackey

I have tried it but the command does not seem to work in the docker container.

Screenshot2024-02-22185547.png.1bab8e9920582bbd23eca5164000e890.png

Link to comment
Share on other sites

Lessaj

It seems to be expecting /opt/emby-server as the base path but you have it in /app/emby so update that in the script and try again.

  • Thanks 2
Link to comment
Share on other sites

4 minutes ago, Lessaj said:

It seems to be expecting /opt/emby-server as the base path but you have it in /app/emby so update that in the script and try again.

Thanks!

That also explains why clinfo didn't work - the env variables weren't set correctly for the same reason.

  • Like 1
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...