snakes- your post reminded me (I really am taking off after this):
.mov might not be a container DolbyVision is supported in on LG TVs. The behavior of reverting to base SEI level is the same with Profile 8.1 / HDR10 compatible files when they're muxed as .mkv... the DV info can be in the video stream but the TV is unable to read it, even in .mkvs created by recent tools that support that part of Matroska properly (the library on the TV is likely too old).
Since ffmpeg doesn't and if the responses of the authors are any indication will never properly support muxing DV, you'll need one of two tools -- I'm feeling obscenely generous today (my dislike of Apple for pulling crap like this rises to the level that wars are started over, luckily I'm a nobody) so I tested out the first one as best I could without a source file from an iPhone. My steps to create a test file were (you don't need to do this, I'm just pointing out that this can be generated sorta on non-apple stuff, but nobody would ever want to... skp down to (1) if you don't care ):
1) https://github.com/DolbyLaboratories/dlb_mp4base/
-- This is Dolby's own tool for muxing .mp4 files. It will create a compatible stream for anything that supports the level you're targeting, but you need to do some work first, demuxing the .mov into an Annex B HEVC stream without changing anything and the audio into its own file (with possible conversion).
The commands for this are roughly:
The biggest problem here might be that there are no makefiles for this tool for mac. Last time I was chained to a desk and forced to do mac development (on clang / llvm) clang and make could handle pretty much everything, but you never know. If you guys can't build it fire up the Windows VM I know you all have hidden on your computer for the programs with no mac version and do the muxing in that, or try option 2.
2) https://github.com/justdan96/tsMuxer
-- Easier option, use the GUI, add the .mov file. Leave all the streams selected, mux it into either .ts or .m2ts, DolbyVision definitely works from these containers. I haven't tested it with v8.4 (I use it with 8.1) but if it works from .mp4 it should work from this and I'm not doing any more testing for you. You'll likely need to put it on USB or a DLNA share; attempting to cast from something that wouldn't handle it before probably isn't going to work when you change formats. I don't know whether this works, it technically should if the above method works but .m2ts is kinda odd format to store things in. I mainly use it because Dolby's mp4muxer is single threaded and obscenely slow on large files.
.mov might not be a container DolbyVision is supported in on LG TVs. The behavior of reverting to base SEI level is the same with Profile 8.1 / HDR10 compatible files when they're muxed as .mkv... the DV info can be in the video stream but the TV is unable to read it, even in .mkvs created by recent tools that support that part of Matroska properly (the library on the TV is likely too old).
Since ffmpeg doesn't and if the responses of the authors are any indication will never properly support muxing DV, you'll need one of two tools -- I'm feeling obscenely generous today (my dislike of Apple for pulling crap like this rises to the level that wars are started over, luckily I'm a nobody) so I tested out the first one as best I could without a source file from an iPhone. My steps to create a test file were (you don't need to do this, I'm just pointing out that this can be generated sorta on non-apple stuff, but nobody would ever want to... skp down to (1) if you don't care ):
- Extract a profile 8.1 .rpu from a profile 7 (UHD BDXL) with dovi_tool
- Re-encode the PQ video file into HLG with ffmpeg using a .cube generated via this https://github.com/wswartzendruber/hlg-tools and some quick messing around. FFMPEG breaks all the dolby information, so it needs to be put back for dolby's muxer...
- dovi_tool inject-rpu -i in.hevc -o out.hevc --rpu-in bla.rpu
- Remux with dolby's muxer, forcing the profile 8.1 to be treated as profile 8.4
- Throw on the DLNA share and play on LG NANO85UNA (2020 model), file triggers DolbyVision. Colors are screwy probably as a result of my complete disaster of both PQ -> HLG conversion and forcing a wrong versioned profile to be an 8.4 -- the point is the TV played the 8.4 file as an HLG with DV, which is what your files are in the first place so you don't need to do all of that mess, just look under (1) below. You'll need to play direct on the TV with a USB key or a DLNA server probably though, if casting was broken with .mov files it'll probably be broken with .mp4 as well.
- I ended up with a file with the following key items in mediainfo:
-
Code:
Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5@Main HDR format : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HLG compatible Codec ID : hev1 Color range : Limited Color primaries : BT.2020 Transfer characteristics : HLG / BT.2020 (10-bit) Matrix coefficients : BT.2020 non-constant
- The "HLG Compatible" part on the HDR format string indicates that things "took". They're not necessarily correct, but the file is showing as profile 8.4.
- The NANO85 is fairly low end compared to the OLED models most of the people here are talking about and a year old so I doubt it can magically play files that those can't.
- I'll shut up and you can try the below:
-- This is Dolby's own tool for muxing .mp4 files. It will create a compatible stream for anything that supports the level you're targeting, but you need to do some work first, demuxing the .mov into an Annex B HEVC stream without changing anything and the audio into its own file (with possible conversion).
The commands for this are roughly:
- ffmpeg -i in.mov -c:v copy -vbsf hevc_mp4toannexb -f hevc out.hevc
- Depending on audio type, you can probably copy it as-is. You'll need to figure out your own commands since I don't have a phone file. ffmpeg -i in.mov -c:a ac3 -b:a 128k out.ac3 if you're lazy / don't care about audio.
- mp4muxer -i out.hevc -i out.ac3 -o out.mp4 --dv-profile 8 --dv-bl-compatible-id 4 --mpeg4-comp-brand mp42,iso6,isom,msdh,dby1
2) https://github.com/justdan96/tsMuxer
-- Easier option, use the GUI, add the .mov file. Leave all the streams selected, mux it into either .ts or .m2ts, DolbyVision definitely works from these containers. I haven't tested it with v8.4 (I use it with 8.1) but if it works from .mp4 it should work from this and I'm not doing any more testing for you. You'll likely need to put it on USB or a DLNA share; attempting to cast from something that wouldn't handle it before probably isn't going to work when you change formats. I don't know whether this works, it technically should if the above method works but .m2ts is kinda odd format to store things in. I mainly use it because Dolby's mp4muxer is single threaded and obscenely slow on large files.