Jump to content

Tone-mapping in transcoding HDR for playback on SDR screens??


griffindodd
Go to solution Solved by Luke,

Recommended Posts

alucryd
5 hours ago, softworkz said:

I found the reason: You have beta .20 but with an outdated ffmpeg

I'm not sure where that comes from, but I'm not familiar with all the Linux packages.

@alucryd - Do you have any idea what's happening here?

@softworkz All arch packages compile ffmpeg from source, so they all use the puplic source tarball we host, which is the last stable release. Like Gentoo or FreeBSD, we don't like proprietary binaries.

We could probably host the beta source code if we wanted, but I don't maintain the AUR package, so keeping it up to date would be somewhat challenging.

Link to comment
Share on other sites

So I've tried with the latest beta 4.7.0.21 (AUR package just got updated, and I got the ffmpeg binaries from the latest deb as described before) because I wanted to try ffmpeg 5.0, and I get Input/Output error when transcoding:

Quote

18:42:16.740 Press [q] to stop, [?] for help
18:42:16.779 [hevc_qsv @ 0x1ec35c0] error getting SEI payload: -5
18:42:16.779 [hevc_qsv @ 0x1ec35c0] Error parsing SEI data
18:42:16.780 Error while decoding stream #0:0: Input/output error

I attach the logs as well. Should I submit this as a bug somewhere?

 

ffmpeg-transcode-85cbed3a-e8df-4389-88bc-4577fda9ec97_1.txt

Link to comment
Share on other sites

  • 3 weeks later...
escapereality
On 1/26/2022 at 2:40 PM, nouboh said:

Managed to use the ffmpeg/ffprobe/ffdetect binaries included in the deb package and now seems to be working!

374123137_Screenshot2022-01-26at14_32_50.thumb.png.2235a4324a5ae61fd864623f7ca94dd3.png

and yes, with the correct ffmpeg version I see the options you mention:

731115151_Screenshot2022-01-26at14_33_57.thumb.png.9df47b63ea3dfca7931d7d8e5042ad26.png

I guess I didn't see them since it assumed I did not have hw acceleration.

 

If anyone is running arch Linux and faces the same problem, that is what I did to solve it:

  1. Download beta deb pacakge and decompress it (the files are in the data.tar.xz file)
  2. Copy the emby-server folder to /opt
  3. Create a new emby-ffprobe wrapper in /opt/emby-server/bin/ based on the /opt/emby-server/bin/emby-ffmpeg script (just change the last line to execute ffprobe)
  4. Modify the configuration in /etc/conf.d/emby-server so it uses the new binaries
  5. Modify the `FFmpeg options` in the `Advanced Transcoding` configuration (install the Diagnostics plugins to see it) so they point to the new binaries.
  6. Restart emby-server (sudo systemctl restart emby-server)

 

Hi, I'm the current maintainer of the emby-server-beta AUR package. Nice find! I'll implement this today in the package.

It'd be even better if the latest emby ffmpeg and ffdetect could be uploaded, so I can include them in de PKGBUILD. @Luke would that be possible?

Link to comment
Share on other sites

2 hours ago, escapereality said:

Hi, I'm the current maintainer of the emby-server-beta AUR package. Nice find! I'll implement this today in the package.

It'd be even better if the latest emby ffmpeg and ffdetect could be uploaded, so I can include them in de PKGBUILD. @Luke would that be possible?

Yes, as soon as we're sure it won't be getting updated again for 4.7.

Link to comment
Share on other sites

escapereality
26 minutes ago, Luke said:

Yes, as soon as we're sure it won't be getting updated again for 4.7.

Okay! So extracting the ffmpeg from a other distro package is indeed the way to go for the time being?

Link to comment
Share on other sites

  • 3 months later...
On 1/26/2022 at 11:56 AM, nouboh said:

I get the impression that in my intel Jasper Lake is not performing any tone-mapping.

Just wanted to let you know that Intel has confirmed that native tone mapping is not supported on Jasper and Elkhart Lake. We created an issue with them regarding the incorrect detection output (indicating that tm would be supported).

What does work though is OpenCL based tone mapping, it just needs to be configured manually for the time being.

  • Thanks 1
Link to comment
Share on other sites

@softworkz any idea if the Jasper/Elkhart Lake CPUs have enough muscle to actually tone map/transcode real-time?

Haven't had a chance to try or have any first hand experience so purely asking but it would seem like the CPUs are going to be an edge case where some might work and others won't? (ie 2 core likely not, 4 core maybe)?

A 4 core Celeron with QuickSync was sort of the like the entry bar to achieving HDR to SDR tone mapping. Has the bar been lowered?

Link to comment
Share on other sites

1 hour ago, cayars said:

@softworkz any idea if the Jasper/Elkhart Lake CPUs have enough muscle to actually tone map/transcode real-time?

Native tone mapping is not supported, but OpenCL TM should work. I can't tell how fast, but I'd say at least FullHD should be doable at > 1.0x, but it depends on the other operations that need to be performed.

 

1 hour ago, cayars said:

4 core Celeron with QuickSync was sort of the like the entry bar to achieving HDR to SDR tone mapping. Has the bar been lowered?

I'd say rather "spread" than lowered - meaning: better choose something before or after JSL/ELK (but none of those two)

Edited by softworkz
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
escapereality
20 minutes ago, softworkz said:

We have an official solution for Arch Linux users - finally!

Please see here: 

 

Super! I'll implement it in the emby-server-beta package this week.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
donjon

Hello 

I am running Emby 4.7.4.0 on TrueNas Scale with a Nvidia P400.

I have several 4k HDR movies that works perfect on my HDR TV with the Emby app.

But when I try to stream in browser or on mobile I get color issues. HDR tone mapping and HW acc is turned on in the settings.

I have installed the diagnostic plugin and tried Hable, Reinhard and Mobius, but I cant see any changes in picture.

Screenshot from browser:

https://imgur.com/a/9qepxzj 

2160p.hevc.10bit.hdr

Pixelformat: yuv420p10le

Main 10, 150

 

Can anybody point me in the right direction before I mess up all the settings in Emby?

Any help appreciated

Link to comment
Share on other sites

Happy2Play

@donjon But this media is not HDR according to probed information, so tonemapping can't happen.

"VideoRange":"SDR"

 

Link to comment
Share on other sites

donjon

Ok? Strange... and it also says .HDR in movie title. But the probe information is probably right.

And why is it that when I play it on my tv the colors are perfect and on mobile and browser the colors are purple and green-ish?

Can it be Dolby Vision? I dont know the difference, but my tv supports both HDR and DV.

Link to comment
Share on other sites

Happy2Play
1 minute ago, donjon said:

Ok? Strange... and it also says .HDR in movie title. But the probe information is probably right.

And why is it that when I play it on my tv the colors are perfect and on mobile and browser the colors are purple and green-ish?

Can it be Dolby Vision? I dont know the difference, but my tv supports both HDR and DV.

What does the program MediaInfo show?

But looks like a 10 bit HEVC to me.

Edited by Happy2Play
Link to comment
Share on other sites

donjon

Tried the MediaInfo app for mac but it just hangs when I open the file.

You are right, in Emby it shows just 4k HEVC 10bit.

I compared to some other HDR movies with no color issues, and they are showing 4k HEVC HDR10. 

So what causes the purple/green picture then? 🤔

Link to comment
Share on other sites

Happy2Play
Just now, donjon said:

Ok probably DV then. So there is no transcoding fix for this?

Thanks for the help anyways!

Would have to find other topics but no as it is propriety. 

See this topic and other comments.

 

  • Thanks 1
Link to comment
Share on other sites

DV is a proprietary format so its pass though I believe.

Translation, the client needs to support it directly.

  • Agree 1
Link to comment
Share on other sites

Mkilbride

Hey so, I'm wondering, why so Dolby Vision files not transcode to Normal HDR10 when not supported? When streaming to my friends HDR Only TV, the colors are all screwed up, usually with a green or purple filter. They don't even transcode to SDR. Just fucked up colors.

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