View Full Version : [DDVT Tool] Dolby Vision RPU Demuxing / Injecting / Editing.
bobowb
6th February 2024, 10:09
I have both B8 and C2, and also Samsung models, and so far the only universal solution is to mux them into TS/M2TS.
Profile 8 mp4 will work on both new and old type of internal LG players, but the Codec ID must be dvhe. This tool will convert to mp4 with Codec ID hev1 which plays as HDR on the B8/C8. But dvhe is not compatible with non-DoVi devices such as Samsung AU9072.
Still, it will be a great addition to add the option to chose the Codec ID when converting to mp4.
Thank you very much for the info ! Please can you share which tool (source) and command do you use to demux such hybrid .mkv files into .mp4 (.m2ts) dvhe Codec ID ?
bobowb
6th February 2024, 10:26
The LG C8 doesn't work with current MP4 muxing tools. It should still work with tsMuxer if your file shows Dolby Vision in MediaInfo.
For MP4 you need to use Dolby's muxer from 2018: https://github.com/DolbyLaboratories/dlb_mp4base/tree/ad46704703d2f558a61c2dba444ae43a8e3effff/bin
Either way it's best to stick to .TS with tsMuxer, it should be working fine.
Thank you for the support but can you share the command after mp4muxer_64bits.exe please ? And i originally have just hybrid .mkv but not .mp4 . Should i first convert it in .mp4 ?
cool advertise
6th February 2024, 10:42
to -QfG-
I would like to point out, that the DDVT_MKVTOMP4.cmd script of your tool, when converting an mkv file that has chapters, to mp4, loses the chapters in the conversion...
bobowb
6th February 2024, 10:44
Yep, can confirm, simply run the "hybrid" mkv thru tsmuxer, and create a .ts or .m2ts file, and the LG will display Dolby Vision.
The problem is that when i try to add the such hybrid .mkv files into TSMuxer i always get this error:
https://i.ibb.co/nr3FQ3t/error.png (https://ibb.co/XXyqFyM)
with other kind of .mkv files i dont get such error...
von Suppé
6th February 2024, 12:45
I doubt if tsMuxer 2.6.12 accepts Dolby Vision video. Try latest nightly builds.
https://github.com/justdan96/tsMuxer/releases
bobowb
6th February 2024, 13:15
I doubt if tsMuxer 2.6.12 accepts Dolby Vision video. Try latest nightly builds.
https://github.com/justdan96/tsMuxer/releases
Thank you - i got it ! The .ts file is ready and waiting for me to back home and try to play it on the C8 TV ! I hope it will works this time !:helpful:
ripburnlearn
7th February 2024, 10:17
The latest HandBrake version will preserve HDR10+ and Dolby Vision when using the x265 10-bit encoder. So either something went wrong or who knows, it's hard to say without additional info.Very very interesting. Looks like you pointed me in the right direction. I used H.265 10-Bit (NVEnc) instead of H.265 10-Bit (x265). My GPU compresses in 30-50 minutes rather than a bunch of hours via x265. That's why I used NVEnc.
But testing out both of them using the preview encoding option on Handbrake (encoding a 5 second clip) and dragging that output into MediaInfo, the NVEnc is stripping out the HDR10+ (SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible) and reverting it down to HDR10 (SMPTE ST 2086, HDR10 compatible)
I even tried fooling around with the "Filters tab" and turned on Colourspace to "BT.2020". That definitely was no good. All the HDR10 data gets removed in the section in MediaInfo.
For future time travelers.
Set Video Encoder to H.265 10-bit (x265)
Set Encoder Profile to Main 10, Encoder level to 5.1
In the "Summary" tab make sure "Passthru Common Metadata" is checked.
That worked.
bobowb
7th February 2024, 10:39
So i tried to remux the hybrid .mkv file with newer version of tsMuxer into .ts file and finally my LG C8 plays the file into DV mode ! Now the only problem is that for some reason the .ts file rewind forward and backwards dont work and the movie has wrong duration time . Can this be fixed somehow ?
GodzilaAvenger
7th February 2024, 11:10
One thing that may help is checking the timestamps of the .hevc stream with ffprobe. If there's something weird going on you can rewrite it with ffmpeg genpts.
rwill
7th February 2024, 11:38
So i tried to remux the hybrid .mkv file with newer version of tsMuxer into .ts file and finally my LG C8 plays the file into DV mode ! Now the only problem is that for some reason the .ts file rewind forward and backwards dont work and the movie has wrong duration time . Can this be fixed somehow ?
Transport Streams do not have an Index so they are not seek-able and their total duration is unknown unless parsed completely.
guest
7th February 2024, 11:52
So i tried to remux the hybrid .mkv file with newer version of tsMuxer into .ts file and finally my LG C8 plays the file into DV mode ! Now the only problem is that for some reason the .ts file rewind forward and backwards dont work and the movie has wrong duration time . Can this be fixed somehow ?
Hi "bob",
I have been playing around with all this stuff, the last couple of days, too.
So, try an .m2ts, mine play OK, but the seeking back or fwd, works, but there is a very slight but noticeable delay before things move again.
I read somewhere, that it was suggested to encode the .mkv with x265 with --uhd-bd in the encoding instructions / profile.
It overwrite's some setting's that might already exist in the command line, but it's to a "standard" !!!
So I tried that, and converting that -uhd-bd "fixed" .mkv to .m2ts, the seeking was so much better, but there is still a very, very slight delay, but SO much better.
I will trying a few different settings in the few days, so we'll see how that works out.
bobowb
7th February 2024, 13:17
Hi "bob",
...
Thanks for the help TDS . I still wonder is there any tool like tsMuxer - mp4muxer i guess that can convert the hybrid .mkv into .mp4 and set that dvhe Codec ID so the LG TV triggers the DV mode ? I have been watched a lot of .mp4 DV movies on this TV without any issues . Guess there wont be any problem with timestamp and rewind if the files is with .mp4 instead .ts ...
guest
7th February 2024, 13:35
Thanks for the help TDS . I still wonder is there any tool like tsMuxer - mp4muxer i guess that can convert the hybrid .mkv into .mp4 and set that dvhe Codec ID so the LG TV triggers the DV mode ? I have been watched a lot of .mp4 DV movies on this TV without any issues . Guess there wont be any problem with timestamp and rewind if the files is with .mp4 instead .ts ...
So where are you getting these DV mp4's ???
I cannot get any DV's to work, unless it's .ts or .m2ts !!!
Nico8583
7th February 2024, 20:01
Hi, what is the best way to demux elementaries HDR10+ / DoVi streams in order to use it with this script ? TsMuxer ? Thank you
von Suppé
8th February 2024, 10:29
I still wonder is there any tool like tsMuxer - mp4muxer i guess that can convert the hybrid .mkv into .mp4 and set that dvhe Codec ID so the LG TV triggers the DV mode ?
So where are you getting these DV mp4's ?
I cannot get any DV's to work, unless it's .ts or .m2ts
First off, I don't have a LG tv so can't try. I am however more into mp4 lately.
I don't know how far mp4 implementation has reached in -QfG- tools, but you may wanna try dovi scripts from RESET_9999. They make use of mp4muxer and mp4box (cli tools). Resulting mp4 files do carry Codec ID dvhe.
For LG C8, MakeMKV forums show info about DoVi mp4 support and under what conditions several DoVi profiles must be muxed. Where first audiotrack being lossy is of importance, it says.
https://docs.google.com/spreadsheets/d/1jBIGF8XTVi9VmDBZ8a5hEyongYMCDlUiLHU9n1f_S74/edit#gid=427220017 Row 14
https://github.com/R3S3t9999/DoVi_Scripts/releases
As for these scripts, they do rely on a bunch of tools, which you have to get and put in a tools folder
Fuso
8th February 2024, 11:36
Thank you very much for the info ! Please can you share which tool (source) and command do you use to demux such hybrid .mkv files into .mp4 (.m2ts) dvhe Codec ID ?
The other not-so-official way to change the Codec ID is to use HxD to edit the converted mp4.
Open the mp4 in HxD, use the Find (Ctrl+F) function and search for hev1 as a Text-string, then simply write dvhe over hev1 and Save the file.
guest
8th February 2024, 12:24
https://github.com/R3S3t9999/DoVi_Scripts/releases
As for these scripts, they do rely on a bunch of tools, which you have to get and put in a tools folder
I did all this, earlier this week, and there IS quite a lot to get & install, (probably close to 3Gb) and put in the correct place, edit a few things so your hard work goes to the correct place, so you don't have to go looking for it.
Only today I had some success :)
guest
8th February 2024, 12:26
The other not-so-official way to change the Codec ID is to use HxD to edit the converted mp4.
Open the mp4 in HxD, use the Find (Ctrl+F) function and search for hev1 as a Text-string, then simply write dvhe over hev1 and Save the file.
Will definitely try that :)
von Suppé
8th February 2024, 12:40
The other not-so-official way to change the Codec ID is to use HxD to edit the converted mp4.
Open the mp4 in HxD, use the Find (Ctrl+F) function and search for hev1 as a Text-string, then simply write dvhe over hev1 and Save the file.
Nice! Didn't know. Thanks for this :)
cool advertise
8th February 2024, 13:09
The other not-so-official way to change the Codec ID is to use HxD to edit the converted mp4.
Open the mp4 in HxD, use the Find (Ctrl+F) function and search for hev1 as a Text-string, then simply write dvhe over hev1 and Save the file.
So from an mp4 file with dolby vision, it is sufficient to edit the 4 letters of the Codec ID with a hexadecimal editor, to change e.g. the compatibility between the LG TV or the Samsung TV or for any other device I suppose... And it seems to me the easiest method at the moment... Thank you also from me for this information.
von Suppé
8th February 2024, 13:45
A quick test indeed results in MediaInfo showing Codec ID: dvhe and Codec ID/Info: High Efficiency Video Coding with Dolby Vision. Looks good.
I did use "Replace all" btw. Nice to see that HxD backs-up the source mp4 as ***.bak
guest
8th February 2024, 13:58
A quick test indeed results in MediaInfo showing Codec ID: dvhe and Codec ID/Info: High Efficiency Video Coding with Dolby Vision. Looks good.
I did use "Replace all" btw. Nice to see that HxD backs-up the source mp4 as ***.bak
For what it's worth, would this work, and/or make a DV mkv play ??
I will try this myself, but I thought I'd ask, anyway.
UPDATE:- Well, as expected, I can't get this work, I even tried the "Replace All", it found 3 instances, but nothing got changed in Mediainfo.
Might the .mp4 I'm working with :(
von Suppé
8th February 2024, 18:23
As said, I don't have a LG tv so can't tell. For my standalone players it makes no difference.
The outcome looks good on MediaInfo and me learning more about mp4, it's nice to know about this hex-editing way.
von Suppé
9th February 2024, 08:26
I can't get this work, I even tried the "Replace All", it found 3 instances, but nothing got changed in Mediainfo.
Might the .mp4 I'm working with :(
Can you provide a link to the mp4 - or a small part?
AgentXXL
11th February 2024, 22:53
Attn -QfG-,
I have started using this tool again, after a long break, and the last build I used is #53
So I grabbed the latest build (#63.fixed) the other day, and when just simply wanting to extract the rpu.bin, it fails :(, however, #53 does the job, no issue :)
So I just got #60 & #62 (also noticed that there is a significant increase in the file size between #60 & #61.1, and then again between # 61.5 & #62.
#60 worked, #62 failed.
Am I missing something, or do I just need to keep using the older builds ??
Just fyi, that's all.
The failures you're seeing indicate path problems - I've found that these tools often fail when there are spaces in the path and/or filename.
I'm still fighting with the newer releases as well. The context menu options aren't working for me anymore. I even tried a fresh Win11 VM and running the DDVT_Options.cmd file no longer adds the context menu entries. I've rolled back to version 61.5 and it seems to be working for me. I was able to manually add the registry keys to re-add the context menu items.
I'm suspecting it's something to do with Win11 and some security patch that now prevents adding context menu items. Anyone else experiencing this? If the 63-FIXED version is working for anyone via the context menus, would it be possible for you to export the registry keys that it has added?
Thanks!
zomorf
14th February 2024, 19:17
Trying with the lastest FIXED 63 scripts. Loading a HDR file into the HYBRID script it doesn't recognise that it is HDR where I know it is...
this being the last portion of the filename... below...
1080p.NF.WEB-DL.DDP5.1.HDR.HEVC-NTb
it says "NO HDR File Chosen, HDR File must be set."
I had it working before in I think v0.61.5...
I'm a novice of this tool but I enjoyed the Hybrid script when it appeared...
Thanks...
sirbod
16th February 2024, 12:20
Attn -QfG-,
I have started using this tool again, after a long break, and the last build I used is #53
So I grabbed the latest build (#63.fixed) the other day, and when just simply wanting to extract the rpu.bin, it fails :(, however, #53 does the job, no issue :)
So I just got #60 & #62 (also noticed that there is a significant increase in the file size between #60 & #61.1, and then again between # 61.5 & #62.
#60 worked, #62 failed.
Am I missing something, or do I just need to keep using the older builds ??
The scripts will fail if there's a space in the generated temp path.
For example this line in the INJECTOR script:
FOR /F "tokens=2-5 delims=(,-)" %%A IN (!TMP_FOLDER!\Crop.txt) DO (
Will fail as it will split the path into tokens, not the contents. I switched it to:
FOR /F "tokens=2-5 delims=(,-)" %%A IN ('TYPE "!TMP_FOLDER!\Crop.txt"') DO (
Essentially, any FOR /F that uses a path to read the contents of a file is going to fail unless modified.
-QfG-
17th February 2024, 09:13
-v0.63.1 ONLINE
*FIXED Border check fails if temp folder includes spaces (THX @ sirbod).
*FIXED Better HDR detection.
AgentXXL
17th February 2024, 20:09
-v0.63.1 ONLINE
*FIXED Border check fails if temp folder includes spaces (THX @ sirbod).
*FIXED Better HDR detection.
Thanks again for these scripts! And FYI - I'm a dumbass sometimes. I figured out why the context menu was not appearing and it was as simple as forgetting to 'Run as Administrator' for DDVT_Options. All is good now.
Update: I still don't get any MUX into MKV option when using the Injector script. The Hybrid script does mux into a mkv, but I'm really not a fan of the drag and drop method. I'm sure I'll get used to it over time. And yes, when I ran DDVT_Options as administrator, I did set the MKVToolNix path. Was muxing removed from the Injector script since you added the Hybrid one?
-QfG-
18th February 2024, 02:54
The Muxing Option in the Injector script is Standard=Off. You can turn on with the switch. Also you can edit the script, in the header are the pre defined options.
Second you can only Mux into container, if the source file is containered (MP4/MKV).
set MUXINMKV=NO
:: YES / NO - Muxing video stream into MKV container if source was MKV container.
set MUXINMP4=NO
:: YES / NO - Muxing video stream into MP4 container if source was MP4 container.
set MUXP7SETTING=STANDARD
:: STANDARD / makeMKV - Method for muxing EL into BL.
AgentXXL
18th February 2024, 20:44
Ahh, perfect. Thank you! I'm already getting used to the Hybrid script with drag-n-drop, but it will be nice to have muxing available should I need to do any manually. And as mentioned before, I do only use .mp4 and .mkv source files.
zomorf
22nd February 2024, 05:52
Trying with the lastest FIXED 63 scripts. Loading a HDR file into the HYBRID script it doesn't recognise that it is HDR where I know it is...
this being the last portion of the filename... below...
1080p.NF.WEB-DL.DDP5.1.HDR.HEVC-NTb
it says "NO HDR File Chosen, HDR File must be set."
I had it working before in I think v0.61.5...
I'm a novice of this tool but I enjoyed the Hybrid script when it appeared...
Thanks...
Tried with latest still doesn't detect... I had it working in 0.58 so unsure what I have done or something has changed... I'm a novice to most of this... But I found it worked nice this HYBRID script compared to extracting manually like before...
I seen thread has been tidied up as pages #'s have reduced...
Nico8583
26th February 2024, 16:17
Does anyone have a document to describe HEVC structure ? Or a tool to analyze it ?
I would like to understand why a combined file created by dovi_tool, remuxed to MKV and extracted is different than a combined file created by mkvtoolnix and extracted. Only the last bytes are different.
Thank you.
ivanb
27th February 2024, 03:20
Doc: https://www.itu.int/rec/T-REC-H.265
Tool (high-level analysis): https://media-analyzer.pro
Nico8583
27th February 2024, 07:33
Thank you I'll look at it
Grimm
1st March 2024, 12:02
I wanted to convert dovi from 7.06 to 8.06 and I get this error
https://i.imgur.com/EdFWb7B.png
Problem solved. All you had to do was rename the file The.Hunger.Games.The.Ballad.of.Songbirds.and.Snakes.2023.MULTi.2160p.UHD.BluRay.REMUX.DoVi.HDR.HEVC.TrueHD7.1.Atmos-inTGrity
this name causes the above error
Fuso
11th March 2024, 19:42
The other not-so-official way to change the Codec ID is to use HxD to edit the converted mp4.
Open the mp4 in HxD, use the Find (Ctrl+F) function and search for hev1 as a Text-string, then simply write dvhe over hev1 and Save the file.
I've decided to test this method but it didn't work on my LG B8. Mediainfo shows dhve but the file still plays in HDR.
But I think I've found a universal format for playing on a non-DV TVs, older LGs, newer LGs - the so called fake Profile 5
HDR format : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID : hev1
Container is mp4.
This file plays in HDR on a Samsung JS8000 (2015), AU9072 (2021), in Dolby Vision on LG B8 and C2.
zomorf
13th March 2024, 17:01
Can someone please point me in a direction. I'm trying a file that is HDR tv show with drag and drop to HYBRID script but pressing enter it reports no HDR HDR10+ detected... I had this working and now no files HDR is being detected... All I have done is extracted the new versions and all of a sudden it stopped... I had the Hybrid script working and found it a nice setup compared to the old extract and inject method...
I'm a novice to say the least...
benwaggoner
13th March 2024, 22:28
Can someone please point me in a direction. I'm trying a file that is HDR tv show with drag and drop to HYBRID script but pressing enter it reports no HDR HDR10+ detected... I had this working and now no files HDR is being detected... All I have done is extracted the new versions and all of a sudden it stopped... I had the Hybrid script working and found it a nice setup compared to the old extract and inject method...
Have you confirmed there is HDR-10 metadata through another means?
zomorf
14th March 2024, 13:06
Have you confirmed there is HDR-10 metadata through another means?
Yes mediainfo details. Also no file at present is detecting HDR data. I did have it running ok in 0.58. So unsure what happened. Currently using 0.63.1
Going back to 0.58 doesn't help either.
Boulder
14th March 2024, 14:41
Have you tried remuxing with mkvmerge/MKVToolnix GUI to see what happens?
AgentXXL
15th March 2024, 19:48
Ahh, perfect. Thank you! I'm already getting used to the Hybrid script with drag-n-drop, but it will be nice to have muxing available should I need to do any manually. And as mentioned before, I do only use .mp4 and .mkv source files.
@-QfG- Again, THANK YOU!! I now use the Hybrid script for the majority of my injecting attempts. And it's been flawless for the content I've done.
Should you and @quietvoid ever accept donations for your efforts, I'd be happy to send one.
zomorf
16th March 2024, 05:28
Have you tried remuxing with mkvmerge/MKVToolnix GUI to see what happens?
I'll give that a try... Just that NO FILE is working... I had it running and preferred the new HYBRID script... I'm trying it now...
Just loaded and saved new HDR file using mkvtoolnix no help... :(
Video Information from mediainfo...
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 0 min
Bit rate : 4 752 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.095
Stream size : 2.01 GiB (86%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1053 cd/m2
Maximum Frame-Average Light Level : 358 cd/m2
-QfG-
16th March 2024, 12:32
@*zomorf What is the directory and filename? Use directory/filename without special letters and test again. Also check the 255 letters cap from windows. Mediainfo looks good, the HDR Detection is this String:
Transfer characteristics : PQ
If this string is existing in the file, HDR will be detected.
zomorf
16th March 2024, 21:07
@*zomorf What is the directory and filename? Use directory/filename without special letters and test again. Also check the 255 letters cap from windows. Mediainfo looks good, the HDR Detection is this String:
If this string is existing in the file, HDR will be detected.
Filename length isn't a problem... as I have tried from within the script directory even different paths drives etc have been tried... I'm at a loss... Below is the filename xxxx renamed...
xxx.xxxxxxx.S03E01.xxxxxxxxxx.1080p.NF.WEB-DL.DDP5.1.HDR.HEVC-NTb
https://www.dropbox.com/scl/fi/uffzpfs9h1v8f3pva8faz/ddvtools-image.png?rlkey=7g9cmz1meetws8u8curot9q1o&dl=0
At present NO FILE is detecting... That's what's strange... I was using this tool when you had to extract and then inject before the Hybrid script came through and from 0.58 I updated from 0.53 and found the HYBRID script which worked well... I updated to 0.63.1 and all of a sudden nothing detects...
I'm not sure what happened or why as I just extract the new versions of the releases...
I know my files have HDR and DV etc but I can't get past the HDR step :(
Strange indeed.... At a loss to explain or how to get around it...I even deleted the whole package and back to 0.58 still not working anymore... I'm stumped...
Titounet1965
17th March 2024, 13:15
Hello , can you add an option ( maybe in your option file ) to avoid the scripts exit from the CMD windows when job is finished ?
Thank you .
NeverExists
18th March 2024, 03:53
It always says no hdr10+ present no matter what...... just let it load past that part. it has always said that for me right when I first load the preset, then after it loads the main menu... you said your file was HDR10 hence why it says no HDR10+ PRESENT.
NeverExists
18th March 2024, 03:57
Can someone please point me in a direction. I'm trying a file that is HDR tv show with drag and drop to HYBRID script but pressing enter it reports no HDR HDR10+ detected... I had this working and now no files HDR is being detected... All I have done is extracted the new versions and all of a sudden it stopped... I had the Hybrid script working and found it a nice setup compared to the old extract and inject method...
I'm a novice to say the least...
IT is supposed to say that everytime you first load it. it will say that everytime there is no HDR10+ Present. You said you file was HDR10 Not HDR10+ so its working fine. let it load past that to the main screen.
zomorf
18th March 2024, 21:20
IT is supposed to say that everytime you first load it. it will say that everytime there is no HDR10+ Present. You said you file was HDR10 Not HDR10+ so its working fine. let it load past that to the main screen.
Nope juts keeps prompting... So it just doesn't detect it for some unknown reason... I'm working again tonight so limited time.. I'll revisit it Wednesday...
Thanks to all with info suggestions...
NeverExists
19th March 2024, 07:22
Nope juts keeps prompting... So it just doesn't detect it for some unknown reason... I'm working again tonight so limited time.. I'll revisit it Wednesday...
Thanks to all with info suggestions...
Also make sure you select the video file first when you're loading it in the program cause if you click on the rpu file first, it won't recognize it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.