Jump to content

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


griffindodd
Go to solution Solved by Luke,

Recommended Posts

mattsteg
1 minute ago, softworkz said:

OK thanks

You're not seeing tone mapping because you're on BSD, where we have only a regular ffmpeg version available. Hence no tone mapping.

But this is changing right now. Actually today(!) there has been an important milestone achieved, and when all things go well, the next beta (.21) might already include our own ffmpeg on BSD.

Thanks for the feedback on this.

Link to comment
Share on other sites

Is there a way to know if it is actually performing HDR-SDR tone-mapping? I get the impression that in my intel Jasper Lake is not performing any tone-mapping.

Link to comment
Share on other sites

5 minutes ago, nouboh said:

Is there a way to know if it is actually performing HDR-SDR tone-mapping? I get the impression that in my intel Jasper Lake is not performing any tone-mapping.

Yes. Please see here: 

 

Link to comment
Share on other sites

Great, thanks!

It only says `Color Convert NV12`  so I guess it is not performing tone-mapping. That's unfortunate. This processor doesn't support HW tone-mapping like other 11th gen Intel processors, but in Jellyfin it seems to work using OpenCL. I don't know if that is something that Emby supports (or will support).

 

Link to comment
Share on other sites

2 minutes ago, nouboh said:

Great, thanks!

It only says `Color Convert NV12`  so I guess it is not performing tone-mapping. That's unfortunate. This processor doesn't support HW tone-mapping like other 11th gen Intel processors, but in Jellyfin it seems to work using OpenCL. I don't know if that is something that Emby supports (or will support).

 

We have two versions of OpenCL tone mapping, both much faster than what the others have.

Could you please post an ffmpeg log?

Link to comment
Share on other sites

Mh, that's weird. The option was unselected (neither Yes or No) maybe it is because I just updated to 4.7.0.20 beta. In any case, I've retried making sure the option is set as yes but no tone-mapping either.

1211906800_Screenshot2022-01-26at13_03_08.thumb.png.ce86883cc1ba1e2b19ffbd7e9592595b.png

I've tried to select OpenCL, but I don't have these options.

1243337199_Screenshot2022-01-26at13_03_58.thumb.png.c4da2840f54155ea8c455303aad97263.png

Edited by nouboh
typo
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

I have Arch linux and I have installed the aur package `emby-server-beta`. It actually compiled ffmpeg. I'll check around my system to see if it was installed in a different location or it just compiled an old version. I can try to get the latest one and compile/install it myself and see if that way works.

Edit: How do I get the latest emby ffmpeg? I thought it would be in some github repo but I can't find it. Mmh well, maybe I can get it from the deb package.

Edited by nouboh
add info
Link to comment
Share on other sites

BTW, before trying the beta I tried the latest stable version, and it seemed to not work either. I'm correctly assuming that I need to use the latest beta, or should it work with the latest stable?

Link to comment
Share on other sites

2 minutes ago, nouboh said:

BTW, before trying the beta I tried the latest stable version, and it seemed to not work either. I'm correctly assuming that I need to use the latest beta, or should it work with the latest stable?

It works on every other Linux where we have our precompiled ffmpeg in the package. I never understood why we don't have that for Arch - but it's not my area to be honest..

Link to comment
Share on other sites

Happy2Play

I don't understand this image.  What is yes supposed to mean?

Screenshot 2022-01-26 at 13.03.08.png

Mine does not have only yes option.  Unless there is a difference per platform.

image.png.eea336e4f4922c4b60598d0af35beaab.png

Link to comment
Share on other sites

oh weird. Yeah, I see the `official` (or at least the one in the offical arch repo) stable arch linux package also installs this same old version...

Link to comment
Share on other sites

10 minutes ago, Happy2Play said:

I don't understand this image.  What is yes supposed to mean?

I don't understand it either!

Just look at the tone mapping options that you can access via the Diagnostics Plugin. These are clear and easy to understand.

Edited by softworkz
Link to comment
Share on other sites

GrimReaper
9 minutes ago, Happy2Play said:

I don't understand this image.  What is yes supposed to mean?

Screenshot 2022-01-26 at 13.03.08.png

Mine does not have only yes option.  Unless there is a difference per platform.

image.png.eea336e4f4922c4b60598d0af35beaab.png

My guess would be user has no Premiere subscription or HW acceleration, hence expanded options would not come into play, it'd be just Yes/No with SW only?

Edit: Re-thought, with no Premiere  wouldn't be able to TM anyway. Leaves no HW?

Edited by GrimReaper
Afterthought
Link to comment
Share on other sites

Happy2Play
6 minutes ago, GrimReaper said:

My guess would be user has no Premier subscription or HW acceleration, hence expanded options would not come into play, it'd be just Yes/No with SW only?

Has to be platform as the options are there no matter my premiere status or HWA settings, functionality is tied to Premiere status though.

image.png.808b0fed1c619713d2f128e9664c5172.png

Link to comment
Share on other sites

13 minutes ago, Happy2Play said:

Has to be platform as the options are there no matter my premiere status or HWA settings, functionality is tied to Premiere status though.

image.png.808b0fed1c619713d2f128e9664c5172.png

Correct, the visibility here depends on platform availability (not on Premiere status):

For Software

  • Checks whether the ffmpeg has our custom supertonemap filter

For Hardware

  • CUDA
    • Checks whether Nvidia HWA is available on the system
    • Checks whether an Nvidia device is available
    • Checks whether the ffmpeg supports Nvidia HWA
    • Checks whether the ffmpeg includes the tonemap_cuda filter
  • QSV
    • Checks whether QSV HWA is available on the system
    • Checks whether a QSV device is available
    • Checks whether the ffmpeg supports QSV HWA
    • Checks whether the ffmpeg includes the super-t and extra-t OpenCL filters
    • Checks whether the system is set up for OpenCL
  • VAAPI
    • Checks whether VAAPI HWA is available on the system
    • Checks whether a VAAPI device is available
    • Checks whether the ffmpeg supports VAAPI HWA
      two sub-options here
    • OpenCL
      • Checks whether the ffmpeg includes the super-t and extra-t OpenCL filters
      • Checks whether the system is set up for OpenCL
    • VAAPI
      • Checks whether the ffmpeg includes the tonemap_vaapi filter
      • Checks whether the hw device supports tone mapping
        => For all other devices (i.e. CPU too old) we can still do OpenCL tone mapping

 

For hardware, when not one of the top level items fulfills all requirements, then it's hidden.

Edited by softworkz
Link to comment
Share on other sites

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)

 

Edited by nouboh
Emphasized resolution text and added latest step
  • Like 2
  • Thanks 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...