Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert MKV Dolby Vision to UHD Dolby Vision Error message? #812

Open
UHDSteffen opened this issue Dec 3, 2023 · 6 comments
Open

Convert MKV Dolby Vision to UHD Dolby Vision Error message? #812

UHDSteffen opened this issue Dec 3, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@UHDSteffen
Copy link

UHDSteffen commented Dec 3, 2023

Hello, I want to convert my Dolby Vision-MKVs to UHD-iso(Dolby Vision) but I keep getting error messages with tsMuxeR, how can I solve this? Couldn't it be integrated into a new Muxer?
The error message is >>> "Warning! Dolby Vision Double Layer Single Tracks are not standard for BD disks, the disk will not play in a Blu-ray player"
How to solve the Dolby Vision UHD compatibility problem (BL+MEL+RPU)?
Suggestion for improvement and integration into tsMuxeR in the future?

@jcdr428
Copy link
Collaborator

jcdr428 commented Dec 4, 2023

@UHDSteffen changing a single track DV back to two tracks in tsMuxer is feasible, let's leave this issue open as an enhancement request.

@jcdr428 jcdr428 added the enhancement New feature or request label Dec 4, 2023
@DreckSoft
Copy link
Contributor

I think that's the same as my #781
As my patch seems to break regular DV muxing I'm currently using my private version. DV will be lost but at least a playable HDR10 file is the result. Keeping DV from MKV is not easy.

@Hellboy00000
Copy link

You can use DoVi_Scripts to change a MKV (Dolby Vision Profile 7 Level 6) with "Double Layer Single Tracks" to "Double Layer Double Tracks"

@NeedsMoar
Copy link

First off if you're ripping these yourself like a good citizen (downloading movies is bad, you should rob the local big box store blind instead). :D Save yourself a huge hassle and don't rip them to MKV.... use the backup mode in MakeMKV and pick and choose the files you need from the resulting folder containing everything off the bluray. If you're actually trying to play on a bluray player and have an Oppo or Clone (definitely if it's jailbroken), or maybe one of the Sonys, there's a chance you can play that folder without doing anything else and keep menus. If you want them. Otherwise grab the M2TS or MPLS you need and cross your fingers that it works if it's a seamless branching disk and remux that in tsmuxer while removing all the tracks you don't want. If all you need is 2 HEVC layers in profile 7 they'll show up as 2 different HEVC tracks at the top of the interface and you're all set.

If it's a MEL file and you want more compatibility the much easier option is converting it to profile 8.1 after demuxing it from the mkv with tsmuxer using the command:

dovi_tool -m 2 convert --discard -i Input.hevc -o Output.hevc
You can also pipe in the hevc stream from ffmpeg and avoid temporarily eating the chunk of disk space, but I stopped doing that because older versions would randomly corrupt the movie somewhere mid-stream and force everything to be re-done. They may have fixed it; you can try:

ffmpeg -i Movie.mkv -bsf:v hevc_mp4toannexb -c:v copy -f hevc - | dovi_tool -m 2 convert --discard -o Output.hevc -
Then mux that into your m2ts in place of the movie.

Since the MEL layer is just a null-adjustment grey FEL (basically) with the RPU in it there's not really any functional difference aside from what devices are blessed to play them. Profile 8.1 plays on practically everything including Windows Movies and TV (only in MP4 format) and can be muxed to MP4 which is "nicer" than m2ts unless you need subtitles. Real FEL has very few devices it plays correctly on. A bunch of them fake-play it by ignoring the enhancement layer; this covers pretty much every device that will play DV in MKV in the first place, all set top streaming boxes... pretty much everything but the Oppo 203 / 205 or the Chinoppo clones. The clones aren't perfectly stable but given how many hours of remuxing crap and converting audio formats it's going to save me I don't care about having to reboot it every so often, and it navigates SMB shares faster than my workstation somehow. The Sony players are cheap and look like a nice option until you realize you have to manually turn dolby vision on and it applies itself to SD content when it's on if you don't turn it back off... well that and they have the same crappy network connection as all the TVs. I can go on ebay and buy dual port 100Gb Ethernet / Infiniband adapters for around $100 that are being pulled from servers because they're going on 3 generation old garbage with 800GbE out this year it's kind of insulting that the $1500 OLED comes with an ethernet port that could run at full speed on the 16-bit version of the ISA card introduced in the 80286 computers of the 80s.

Some devices will handle those dual layer single track files anyway despite the warning (the oppo clone won't with FEL, at least not in m2ts, I didn't try dolby's mp4muxer which does some weirdness of its own) so I'd test it before you put yourself through a conversion nightmare. THD files from MKVs created by MakeMKV will be broken too, btw. You need to run them through
eac3to blah.thd blah.thd+ac3 to get an ac3 core back in them to make them playable on most BD hardware, but that doesn't completely match what a "real" track should look like on a disk and I'm not sure if it works right. Your other option is dropping atmos because it's nowhere near as important as dolby vision (and there's way to play it that isn't massively faked with a bunch of tiny directional speakers for any reasonable amount of money) and converting to 7.1 channel PCM which will play on mostly anything.

@UHDSteffen
Copy link
Author

@UHDSteffen changing a single track DV back to two tracks in tsMuxer is feasible, let's leave this issue open as an enhancement request.
Is there still hope that this matter will be integrated?

@NeedsMoar
Copy link

After having converted more stuff for the Oppo, I wouldn't recommend doing this. Just re-rip to an ISO or rip the main M2TS on the disk. You can demux the single-track file with dovi_tool (which is all the script mentioned above does). I don't mind using scripts to get things done if they make things easier, and my own SD / 1080p -> Dolby Vision upconvert script is an evolved batch file so I don't particularly mind those, but I'm planning on converting my own stuff to perl because eventually .BAT / .CMD becomes too difficult to maintain and troubleshoot and the author of Dovi_Scripts has far more patience than I do as far as dealing with ungodly complex batch constructs goes. I might end up making something like dovi_scripts with a proper UI that's cross platform so people can intuitively use it (Every time I see it mentioned it's "just select option 6 then option 2 then option 1" which is less memorable than typing thing in the command line. ) although with increasing support for various formats the conversions should become less and less necessary. Technically I don't need to do anything except dump the ISO onto the network, but I prefer ditching menus so I can play movie sequels back to back easily and transcoding the extras to 10-bit HEVC and adding dolby vision metadata for anything not too noisy and in color because it's a free quality increase and size decrease (and for 90% of movies the extras aren't worth watching) Anyway, the one-liner for demuxing with ffmpeg and dovi_tool installed and on the path is just

ffmpeg -i Movie.mkv -bsf:v hevc_mp4toannexb -c:v copy -f hevc - | dovi_tool demux -b Movie_BL.hevc -e Movie_EL.hevc -

Then add those two files in order to tsmuxergui.

The problem is that not every movie cleanly converts when you do this. I found a couple that lagged the EL behind the BL by about one IDR-frame (those need to match so I think it just started up the EL at the next IDR) so there was weird faint echoey spam all over the movie, and when I pulled the DTS-HD MA from the same mkv and muxed it in as well with the default settings, it was 3s behind the movie. There was some timing info in the streams not being respected (ffmpeg won't insert black frames or empty audio based on MKV information). Add into that the fact that getting the chapter list out of ffmpeg from an mkv into a format tsmuxer likes is a PITA where importing from a UHD M2TS just preserves the chapter list and keeps all of the delays correct. Another was a seamless branching disk that didn't have dolby vision EL information for the first segment (which was just the studio logo) and demuxing with ffmpeg just produced a broken disk because there was no information about where the EL was supposed to end up. Too many variables.

Anyway that's my personal experience, there are a lot of ways the MKV fels can be broken unless played from the MKVs themselves, which nothing would do correctly until very recently and considering how many times people have been confused about what FEL support means in the past I'll believe it when I see it. I'm personally not a big fan of MKV but that might just be because about every 5th software upgrade on the LG TVs, I'll try opening some MKV that worked fine before and LG has become more compliant to the MKV standard and refuses to play the file because it's malformed, then hopefully all I have to do is remux it to mp4 but more likely I get stuck doing some kind of repair on the bitstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants