Jump to content

TM for Chapter Thumbnails ...

Recommended Posts


So a question for @softworkz most likely.

I've been playing around with ffmpeg with the TM filters trying to get Tone Mapped chapter thumbnails created in the .bif's.

I can't seem to use the TM filter in the image extractor in ffmpeg - ffmpeg is reporting that this function cannot use the filter.

I have got it 'working' if I simply do a TM conversion to a thumbnail resolution video (to rapidly increase it's conversion speed) and then re-run the thumbnail extract on that to produce the 'SDR/tone mapped' images.  Then delete the TM video file.

I was hoping to do it all in a single ffmpeg command.

It's obviously not urgent - but the 'washed out' thumbnail images on an SDR display are nagging me .. 

Any thoughts ?


Edited by rbjtech
  • Like 4
Link to post
Share on other sites

So @cayars reminded me that you can just use filter with tone mapping on the existing ffmpeg command line - but this is CPU only -

ffmpeg.exe -f matroska -skip_interval 30 -copyts -i file:"input.mkv" -vf "zscale=transfer=linear,tonemap=mobius,zscale=transfer=bt709" -an -sn -s 320x180 -vsync cfr -r 0.1 -f image2 "C:\temp\img_%05d.jpg"

For the time being, I may just script rebuilding my 4K library with these newly generated bif's using biftool to create them.

Down the line, I guess it would be nice for the image extractor to look at the colour space and apply the filter as necessary - I don't believe it  uses h/w acceleration today ?  So this is probably not a big deal to just include the optional TM filter.





  • Like 2
Link to post
Share on other sites

Hey I hope it takes you a long, long time to create the bif files.

You have lots of 4K media then. :)

I don't think this will be as bad as you think, fingers crossed.

Link to post
Share on other sites

So @softworkz has been busy in the background .. 🤪

Looking at the ffmpeg command line in the logs, it appears the new beta is applying a gamma/saturation filter to attempt to correct the SDR/HDR issues.

My thoughts are it certainly looks better than no TM, but it's possibly too dark imo.

I've put the 3 methods below - top row is no TM, middle row is using TM/Mobius, bottom row is gamma/sat filter,

Personally, I think the middle row looks the best by far.

I'll do some more research on this to look the cpu load of a gamma/sat filter vs doing a proper (cpu) TM - as from my initial look, there wasn't much difference.




Edited by rbjtech
Link to post
Share on other sites

Check out the next version, should be a bit brighter. Also check with multiple different videos.

The current is a quick and lightweight solution. It has taken great effort to achieve the quick image extraction that we have and I don't want to unnecessarily load it with something that adds again. We'll see how it works out and revisit this subject if it doesn't.

BTW: HW acceleration for image extraction is totally pointless (for our quick-image-extraction at least). I've explained the background somewhere here in the forums.

Link to post
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...