Jump to content

Dolby Vision tone-mapping implementation question/request


Recommended Posts

Posted

I ran across a feature request in Plex yesterday quoting Jellyfin and made me think if this has even been implemented in Emby.  Evidently Jellyfin has this posted:

https://github.com/jellyfin/jellyfin/pull/7828

https://www.reddit.com/r/jellyfin/comments/v2nudu/dolby_vision_to_sdr_hwa_tonemapping_is_coming/

Plex has told me that they "don't have the license to tone-map Dolby Vision".  No idea if that statement makes sense or is fudged to give an excuse.  

I'm guessing Emby DOES tone-map Dolby Vision, since I'm able to watch movies on my iPad or android phone using Emby and the picture is not washed out.  Not sure if it only works on certain profiles or not.  But wanted to get your expert info to set the record straight and see what has been implemented and yet to come.

Thanks

Posted
10 hours ago, jsc1205 said:

has told me that they "don't have the license to tone-map Dolby Vision". 

Hi.  Yes, that would be accurate.  DV is a proprietary format owned by Dolby Labs.  They are a business to make money and they do that through licensing their technology.  

  • Like 1
Posted

@ebr  So....does Emby officially tone-map DV on clients or no?

Posted

We don't currently have the ability to tone-map from DV specifically.  However, some DV profiles also contain an HDR layer and we can tone-map those.

  • Like 1
Posted

Any idea when Emby will identify DV (including Atmos & DTS X....) and label it on the detail page of the movie?

Happy2Play
Posted
1 minute ago, jsc1205 said:

Any idea when Emby will identify DV (including Atmos & DTS X....) and label it on the detail page of the movie?

From my understanding currently a limitation of FFMPEG. You could look at the MediaInfo pluging.

 

  • Like 1
FrostByte
Posted

You can follow my FR for the HDR and audio formats to be added to core in the link below.  I believe softworkz has made some progress with ffprobe and has posted screen shots somewhere

I'm using the plugin H2P posted for now until it makes it to core and it seems to be working very well.

 

 

  • Like 2
Cheesegeezer
Posted

Yup be we haven’t ventured into DV tone mapping. To be fair it’s probably gonna be a licensing issue. There is HDR tone mapping but i think Dolby are keeping cards close to chest, hence the reason not many TV’s support it actually 

FrostByte
Posted

Well, it appears JF either paid for DV licensing (doubtful considering they are open source) or did something like reverse engineer DV profile 5 to tone map it.  Not that Emby wants to go that route, else I'm sure softworkz would have done it already 😀

Posted
12 hours ago, FrostByte said:

either paid for DV licensing

Pretty much guarantee they didn't do that.

12 hours ago, FrostByte said:

or did something like reverse engineer DV profile 5

I know there are people that have been working on this for a while.  I'm not sure what the state of patents is on DV.  I know Dolby held a patent on DD for a long time but it expired a few years ago.

  • Like 1
  • 2 weeks later...
Posted

This is confusing to me 

I have movies on a qnap media server which hosts my emby server 

I play content on an Nvidia shield pro emby app, lg c8 tv and denon receiver - all of which is Dolby vision compatible

Dolby vision content plays fine and I get the Dolby vision logo flash up- is that because the shield supports Dolby vision and it is direct playing?

 

when I run these on the iOS app I get the washed out green and purple colours 

 

but if I use infuse app these run perfectly fine on iOS via my emby server; what is infuse doing differently? 

Posted
9 hours ago, AsheAshe said:

is that because the shield supports Dolby vision and it is direct playing?

Yes.  It is only in instances where the video needs to be converted that there would be any potential issue.

Posted
On 29/08/2022 at 14:32, ebr said:

Yes.  It is only in instances where the video needs to be converted that there would be any potential issue.

So what is infuse doing differently that the emby app cannot do that allows the Dolby vision to play correctly whereas emby app plays on iPad and iPhone with colour shift?

Cheesegeezer
Posted
1 hour ago, AsheAshe said:

So what is infuse doing differently that the emby app cannot do that allows the Dolby vision to play correctly whereas emby app plays on iPad and iPhone with colour shift?

@rbjtech @FrostByte can probably help you out here.

As far as I know it's DV5 that causes the green/purple washout because there is no HDR info to fall back on.  Infuse is probably disregarding the DV5 standard and not applying tone mapping and just playing it as a non enhanced movie ( but i honestly can't tell you).

if you switch off tone mapping in emby does it fix the problem?

FrostByte
Posted (edited)
9 minutes ago, Cheesegeezer said:

@rbjtech @FrostByte can probably help you out here.

As far as I know it's DV5 that causes the green/purple washout because there is no HDR info to fall back on.  Infuse is probably disregarding the DV5 standard and not applying tone mapping and just playing it as a non enhanced movie ( but i honestly can't tell you).

if you switch off tone mapping in emby does it fix the problem?

No, I don't use TM or transcode for anything

If I direct play DV5 from my Shield to my Samsung TV then all I get is either purple or green because my TV doesn't understand it

Only if I send DV5 from my Shield to my HDFury and then out to my Samsung will I get LLDV.  

I'm thinking there has to be some type of conversion of the signal for a nonDV TV to understand it.  I saw that other post about the Infuse and the only thing I can think of is that it's doing some sort of conversion like my HDFury.

I don't know anything about the Infuse though and what it does.

 

Edited by FrostByte
  • Like 1
FrostByte
Posted

However, on a TV that supports DV then as long as it direct plays and you don't use TM I would think you should be good.  The trick is to DP everything when using Emby and DV.

  • Agree 1
FrostByte
Posted

If you transcode with Emby and have no TM it will look bad too.  I don't think ffmpeg can convert the LLDV correctly without some help.

Posted

I have paid licenses on both Emby/Plex and keep dockers installed, along with Jellyfin on my Unraid server.  The tonemapping in JF is pretty fugly in certain areas.  I think the best thing end-users can/should do is prepare their media in DV profile 8.1 (8.06) with the HDR10 base layer fallback.  There are enough tools available now to convert DV profile 5/7 to 8.1, HDR10+ to DV, etc.  I'd be more interested if Emby would start tonemapping their HDR video preview thumbnails so they don't look washed.

  • Like 1
Posted (edited)
44 minutes ago, cwills75 said:

  I'd be more interested if Emby would start tonemapping their HDR video preview thumbnails so they don't look washed.

Use the Media Toolbox plugin (coded by @Cheesegeezer with ffmpeg/bif logic from myself @rbjtech ..) - it properly tonemaps your HDR source files to SDR .. ;)

Note this needs HDR10 - it will not (currently) tonemap DV5 to SDR -   DV7 and DV8, HDR10, HDR10+ etc should be fine. ;)

https://github.com/Cheesegeezer/MediaInfoWiki/wiki/Emby-HDR-to-SDR-Thumbnail-&-Chapter-Image-Generator-using-Tonemapping

image.png.6bdc84690fcec0f840b257a4414e12c0.png

Edited by rbjtech
  • Like 2
  • Agree 1
Posted
57 minutes ago, rbjtech said:

Use the Media Toolbox plugin (coded by @Cheesegeezer with ffmpeg/bif logic from myself @rbjtech ..) - it properly tonemaps your HDR source files to SDR .. ;)

Note this needs HDR10 - it will not (currently) tonemap DV5 to SDR -   DV7 and DV8, HDR10, HDR10+ etc should be fine. ;)

https://github.com/Cheesegeezer/MediaInfoWiki/wiki/Emby-HDR-to-SDR-Thumbnail-&-Chapter-Image-Generator-using-Tonemapping

image.png.6bdc84690fcec0f840b257a4414e12c0.png

Thanks for the link.  Currently i manually create my .bif files.  I'll see if I can get this plugin working, but I'm on Unraid docker, so not sure if it's compatible with the 3rd party tools.

Posted
2 minutes ago, cwills75 said:

Thanks for the link.  Currently i manually create my .bif files.  I'll see if I can get this plugin working, but I'm on Unraid docker, so not sure if it's compatible with the 3rd party tools.

If the Roku Biftool works on linux/unraid/docker - then it should ?   Please let me know and I'll update the Wiki.  Thanks ! :)

https://developer.roku.com/en-gb/docs/developer-program/media-playback/trick-mode/bif-file-creation.md

Posted
31 minutes ago, rbjtech said:

If the Roku Biftool works on linux/unraid/docker - then it should ?   Please let me know and I'll update the Wiki.  Thanks ! :)

https://developer.roku.com/en-gb/docs/developer-program/media-playback/trick-mode/bif-file-creation.md

I DL'd the linux version of biftool, there were two files biftool and biftool_processor.  I made them both executable and added their path to the plugin config, then threw a file in there to test.  Log shows this error:

2022-09-01 11:50:18.398 Info Media Info: New Item Added --- Running BIF Generator Task for Oxygen (2021)
2022-09-01 11:50:18.398 Error Media Info: Error in Starting BIF Generator Task for newly added item Oxygen (2021)
2022-09-01 11:50:18.398 Error Media Info: System.NullReferenceException: Object reference not set to an instance of an object.
   at Emby.Server.Implementations.ScheduledTasks.TaskManager.Execute(IScheduledTaskWorker task, TaskOptions options)
   at Emby.MediaInfo.MediaInfoPluginEntryPoint.LibraryManagerItemAdded(Object sender, ItemChangeEventArgs e)

Posted
4 minutes ago, cwills75 said:

I DL'd the linux version of biftool, there were two files biftool and biftool_processor.  I made them both executable and added their path to the plugin config, then threw a file in there to test.  Log shows this error:

2022-09-01 11:50:18.398 Info Media Info: New Item Added --- Running BIF Generator Task for Oxygen (2021)
2022-09-01 11:50:18.398 Error Media Info: Error in Starting BIF Generator Task for newly added item Oxygen (2021)
2022-09-01 11:50:18.398 Error Media Info: System.NullReferenceException: Object reference not set to an instance of an object.
   at Emby.Server.Implementations.ScheduledTasks.TaskManager.Execute(IScheduledTaskWorker task, TaskOptions options)
   at Emby.MediaInfo.MediaInfoPluginEntryPoint.LibraryManagerItemAdded(Object sender, ItemChangeEventArgs e)

Is this on a test system ?

As I believe you said you manually created the BIF files ? - this will overwrite the existing BIF files, so we ideally just wanna test this on a couple of items .. ;)

Posted
46 minutes ago, rbjtech said:

Is this on a test system ?

As I believe you said you manually created the BIF files ? - this will overwrite the existing BIF files, so we ideally just wanna test this on a couple of items .. ;)

I only enabled it for new file creation so it doesn't screw with my old bif files.  Not sure if I can get the plugin working tho, working through error messages.

Posted

Can't seem to find a way to get it to work.  If I manually download ffmpeg and biftool and run a command like this from Unraid command line:

ffmpeg -f matroska -skip_interval 10 -copyts -i file:"input.mkv" -an -sn -vf "zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=mobius:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p" -s 320x180 -vsync cfr -r 0.1 -f image2 bif/%08d.jpg

I get an error about skip_interval because it's not in that build.  If I remove the -skip_interval 10 part, ffmpeg/biftool runs, putting .jpg files in the bif folder.  It just doesn't work being referenced by the plugin.  So the biftool seems functional, it just throws up the NullReferenceException error with the plugin. 

 

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