This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

HDR-SDR using ffMpeg...
#1
Hi Selur!  Long time no talk   Smile  I know... I wait SO long between times coming here, each time I have to re-register.

I've been doing a lot of searching on different forums and I can't quite get a full understanding of the tone mapping used.  I don't know if Hybrid does this (it probably does  Big Grin )  but, currently I am using Clever FFmpeg GUI and the results seem to be pretty good in converting 4k HDR movies to 1080 SDR Blu-rays.  But, I'm curious about the settings.  I don't know if you are familiar with the program, but he apparently suggests to set it to the 'Mobius' tone mapping and a desaturation of -2.  I don't understand the differences using the different methods.  I know you can also choose Reinhard or Hable to use or Morbius as he has suggested.

If you get a moment, would you mind please explaining what the differences are between these tone mapping filters and which you think does the best job is retaining the detail and colours when converting from HDR to SDR?

I would really LOVE to understand this better and find out what you think is the best way to do this.  Using the Clever FFmpeg GUI is super easy, but I don't understand why he recommends using the Mobius when I THINK I read that the Reinhard preserves more detail, but I honestly don't know anything about it.

May I ask, please, what you would suggest I use to do this?  Do you think it is okay to use this program I've been using and should I just keep using the settings he suggested?  Or, do you think I should do this another way, perhaps using Hybrid, IDK...

I really appreciate whatever understanding or advice you could give me.

Thank you Selur!

Jaime.
Reply
#2
a. There is no best way to do HDR to SDR conversion, there is not standard that should be followed.
b. Hyrid is not meant to be easy, but it is meant to offer option. Like https://selur.de states: Hybrid is intended for advanced users.

Like all tone mapping HDR to SDR conversion is subjective, so whatever you thing matches the best for you is what you should use.
So if you like Reinhard looks better for you, use that.
If you just use tone mapping and no Avisynth or Vapoursynth filtering, you can use Filtering->FFmpeg->Color->ToneMap in which case Hybrid will use ffmpeg with the tonemap filter you know from 'Clever FFmpeg GUI'.

Using Vapoursynth there are additional options for HDR->SDR tone mapping for HDR10 content.
Personally I prefer 'HDR10 to SDR (DG)' and 'ToneMap Placebo', but like I wrote before this is about personal preferences and I adjust the settings of which filter I use with what settings on a per clip basis.

=> If it's just about HDR10->SDR for you and you are happy with 'Clever FFmpeg GUI' and the output of tonemap, there is no reason to switch to Hybrid.

Cu Selur
Reply
#3
Hey, that was a great answer, thank you Selur!  I didn't realize that it was so subjective, that is good to know.  Hmmm... I guess if it actually differs from film to film, I'm REALLY going to have to learn more about this!  So, may I please ask you, could you explain the difference between say the way Mobius would handle a conversion as opposed to Reinhard?  Does one have more identifiable characteristics that distinguish they way it looks as opposed to another filter?  Like is one more detailed, but another is more colour accurate?  You know, just to give me something to go on as to exactly what these filters do differently.  Also, what is the desaturation -2 about?  Is that just arbitrary or is there a good reason for that?  Like I say, I have really searched different forums and such, and I can't seem to find any truly distinctive answers as to what the DIFFERENCES are between these different methods.

May I ask what exactly does 'HDR10 to SDR (DG)' and 'ToneMap Placebo' mean?  Is that a specific setting on Hybrid?  I just would really like to understand what these different methods are actually doing so that I can get a handle on how they are processing the picture in different ways.  Like I know what Deblock does, I even kind of know what Psychovisual stuff is supposed to do, but I have no idea what these filters are doing exactly and how they differ in what they do.

I do like a very detailed and saturated picture, even if it may not be absolutely 'Natural' looking.  The first few times I tried to do this I used Handbrake just using the BT709 colour timing.  But, I thought the results came out a bit on the dark side.  When I tried the Clever FFmpeg GUI it seemed to come out more vibrant and lighter, but I have NO idea why.

BTW, the last few times I did use Hybrid I really liked the different AVS or Vapoursynth choices and such that it offers.  So many great filters for so many great things!  When I really need to tweak movies and stuff I really like to use it because then I can sort of 'fine tune' the result which is great!

Perhaps if you could tell me the settings you would use with Hybrid if you were converting a 4k UHD to a SDR Blu-ray, I would love to give that a try in addition to maybe tweaking some of the other things   [Image: smile.png]

Thank you so much, I really appreciate all your time and help Selur!
Reply
#4
Quote: but I have no idea what these filters are doing exactly and how they differ in what they do.
tone mapping is an automated color grading approach trying to produce a similar representation HDR conten offers in SDR. Smile
If you want to understand it correctly you will have to read up on the algorithm which will require a lot of general understanding of math around image processing. https://en.wikipedia.org/wiki/Tone_mapping might give a general idea,..

Quote:could you explain the difference between say the way Mobius would handle a conversion as opposed to Reinhard?
Mobius transform allows the user to decide the trade-off between color accuracy and detail preservation on a continuous scale. The default of 0.3 is already far more accurate than `reinhard` while also being reasonably good at preserving highlights, without suffering from the overall
brightness drop and color distortion of `hable`. But depending on the source and settings (not just the method choice) one or the other method might preserve more details or highlights. Remember something gotta give, since HDR has wider color gamut(range), wider dynamic range and higher brightness.
There is no way general method X is better in XY.

Quote: Also, what is the desaturation -2 about? Is that just arbitrary or is there a good reason for that?
Just something the tonemap authors preferred and chose as default.

Quote:May I ask what exactly does 'HDR10 to SDR (DG)' and 'ToneMap Placebo' mean? Is that a specific setting on Hybrid?
Yes.
'HDR10 to SDR (DG)' is basically Reinhard with some more controls.
'ToneMap Placebo' is tone mapping offerec by lib placebo which uses it's own approach https://github.com/haasn/libplacebo/blob...options.md.

Quote:I do like a very detailed and saturated picture, even if it may not be absolutely 'Natural' looking. The first few times I tried to do this I used Handbrake just using the BT709 colour timing. But, I thought the results came out a bit on the dark side. When I tried the Clever FFmpeg GUI it seemed to come out more vibrant and lighter, but I have NO idea why.
Unless you do a HDR to SDR conversion simply switching to BT709 will drop all the HDR info.
I suspect FFmpeg GUI by default automatically uses some HDR to SDR conversion an Handbrake does not, but you would have to ask the authors of these tools to know for sure, since I don't use them.


Cu Selur
Reply
#5
Ah, excellent!  Thank you Selur, that gives me something to go on.  I will read those references.  But, I think I see what you mean that due to the 'down conversion' 'Something has to give', I think I get what you mean.  But, your sharing at least those differences between the two different types gives me a good start.

Perhaps I will start up Hybrid too and see what the settings are there for HDR to SDR conversion.  I assume there is a tab for that?  Also, being how awesome Hybrid is, would you have more variables and settings or parameters to adjust when doing the HDR to SDR conversion than say the simple interfaces I was telling you about?  Because if so, I think it would be worth trying out different settings with Hybrid to see if I can understand how to dial in better results with more parameters to choose from.
Reply
#6
There are a few post in the forum about HDR to SDR, for example https://forum.selur.net/thread-2848.html might be interessting.

Hybrid has a bunch of filters under "Filtering->Vapoursynth->Color->HDR to SDR" for HDR2SDR conversion + one could use a LUT using TimeCube.

Cu Selur
Reply
#7
Ah, I will absolutely check that out!  Yes, I would really like to get going with Hybrid and be more conversant with it, especially with the HDR-SDR encoding.

Thank you very much Selur!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)