Log in

View Full Version : [DDVT Tool] Dolby Vision RPU Demuxing / Injecting / Editing.


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24

titomoi
11th June 2023, 17:44
great job!!

-QfG-
12th June 2023, 06:39
Just saw these new functions. Is it possible to queue up multiple files to work overnight? Like if I have one folder of DV episodes and one folder of HDR episodes, how would I be able to do the Hybrid script and use the first file in each folder, then when complete do the second file in each folder, etc.? I won't need to change any FPS, add delays, nor do any border changes. Should be able to simply inject the DV into the HDR

Thanks for this tool. It's great

You can edit the scripts and you can make a dir support, with a for command, so that every file in this folder will be called. The problem is the naming in this case, the tool must know which DV file is for the actually HDR file. But the tool supports completely multitasking, so you can mux more files at the same time.

Amateur
13th June 2023, 00:08
You can edit the scripts and you can make a dir support, with a for command, so that every file in this folder will be called. The problem is the naming in this case, the tool must know which DV file is for the actually HDR file. But the tool supports completely multitasking, so you can mux more files at the same time.

I did Right Click > Edit to see if your comment would make sense to me but not really. I have no coding experience. You're suggesting to edit the Hybrid.cmd file?

If the files have the exact same name (just in different folders) would that do the trick as far as lining up the correct files to be merged?

black_hunter
13th June 2023, 22:07
Thank you for the great tool. I have two questions.
Would it please be possible to add a script that converts the audio from DTS to AC3 but keeps the MKV and does not make it an MP4?

If I have an MKV with PGS subs, would it be possible that the script removes the PGS subs instead of having to remove the PGS subs itself with MKVToolNix?

-QfG-
16th June 2023, 14:45
-v0.56 Online
*NEW - Hybrid Script - If DV file contents DV and HDR10+ and the HDR file is only HDR
you can choice to mux HDR10+ metadata into target file. DV RPU
will always mux in HDR stream, HDR10+ is optional.
*Small Bugfixes.

Example: You have a UHD Remux only with HDR10 and a Hybrid WEB Release containing DV Profile 8 und HDR10+ Metadata. Choose UHD Remux as HDR File, the P8 Hybrid as DV file, type in the correct Delay and mux it.

You're suggesting to edit the Hybrid.cmd file?

Thats not so easy, but i will take a look, if i can add folder support in futere releases.

Would it please be possible to add a script that converts the audio from DTS to AC3 but keeps the MKV and does not make it an MP4?

Simple create a Batch file and copy paste this code in it:

@echo off & setlocal
mode con cols=122 lines=57
TITLE AUDIO TO AC3 Converter
setlocal EnableDelayedExpansion
set "FFMPEGpath=%~dp0tools\ffmpeg.exe" rem Path to ffmpeg.exe
set "AUDIOCODEC=-c:a ac3 -b:a 640k"
"!FFMPEGpath!" -drc_scale 0 -y -i "%~1" -strict experimental -loglevel error -stats -c:v copy !AUDIOCODEC! -c:s copy -strict -2 "%~dpn1_[AC3 CONVERTED]%~x1"
setlocal DisableDelayedExpansion
TIMEOUT 10

Simply Drag & Drop the MKV over this Script.

-QfG-
18th June 2023, 08:47
-v0.57 Online
*DEMUXER creates a directory in source file dir if a custom dir is set - Fixed.
*HYBRID Any bugfixes and overhauled layout. Live ticker if HDR and OUTPUT Borders matches.

-QfG-
19th June 2023, 09:22
-v0.58 Online
*Removes mkclean from all scripts because damage on some tracks inside mkv container.

Versions till v0.55 removed from drive for safety all our releases!

hidef_rec
23rd June 2023, 16:23
Thanks for the continued updates to this excellent toolset. A question on Apple DV Profile 8.4; searched this thread & found some discussion on converting to 8.4, but wondering if there's a way to convert videos shot on iPhone in DV 8.4 to a lower profile, namely 8.1?

Ritsuka
24th June 2023, 07:31
I wouldn't call 8.4 an higher profile, it's just different: it uses HLG instead of PQ, so to convert to 8.1 you would have to re-encode and convert to PQ.
Furthermore, Apple uses the ambient viewing environment metadata, I don't know if there is any player outside of Apple owns that honours it, but without that iPhone recorded DV 8.4 files look completely different.

dkangel
25th June 2023, 18:14
Thank you for your amazing script.
It was already easy with the demux-injector functions but now with the hybrid script it's even more easy.
It's the perfect tool to import dv web file into hdr br remux.

Cedvano
26th June 2023, 07:02
Hi,
I'm starting to get interested in the AV1 codec, and I would like to know if this codec is compatible for Dolby Vision and if this software accepts this codec?
Thanks

GodzilaAvenger
26th June 2023, 09:43
AFAIK Dolby Vision is not supported on AV1, at least officially.

-QfG-
26th June 2023, 19:46
-v0.59 Online
*Hybrid Scripts supports now HDR10+ files without DV for secondary input.
If the secondary stream contains DV and HDR10+ metadata, you can choose
which metadata will be used for RPU.
*Live ticker for Output file HDR infos.

No support for DV Profile 8.4 now, because i have no HLG files for testing.

Cedvano
27th June 2023, 07:13
AFAIK Dolby Vision is not supported on AV1, at least officially.

Thank you :thanks:

MadMonkey57
28th June 2023, 10:29
Hi,

Reporting an issue. I can work it around with another tool, so mostly reporting as an FYI to DDVT maintainer (thx for your tool BTW).

I have downloaded a large DoVi MKV movie for TESTING purposes on my LG OLED65C8 (2018).

I converted the MKV to MP4 with DDVT_MKVTOMP4 v0.58, and TV plays it as a regular HDR file.
Then I converted the MKV to MP4 with dvmkv2mp4 (https://github.com/gacopl/dvmkv2mp4), and TV plays it as a DoVi file.

For context, here are the "ffmpeg (https://github.com/BtbN/FFmpeg-Builds/releases) -i" output of all three files:
- MKV: https://pastebin.com/LvGW4PaA
- DDVT.mp4: https://pastebin.com/WBATZTkY
- dvmkv2mp4.mp4: https://pastebin.com/CbEACpbt

And the mediainfo of both converted files:
- DDVT.mp4: https://pastebin.com/MUPVR0Fw
- dvmkv2mp4.mp4: https://pastebin.com/7QnM3fwM

Hope it helps.

EDIT: Still experimenting. This time, I tried converting this DoVi MKV (https://mega.nz/file/DGJU1BzL#4jtSK9Kvx2N6WuNdnQXyOi4NFEqLIymLrmSK5R8WilY) and the resulting mp4 plays as a DoVi on my TV.

EDIT 2: Tried converting "FEL_test_for_AVS.mkv" available from HERE (https://mega.nz/folder/FSog3BhS#UzG3Mrrs_vuT1Qy-lZIhhg). This time, TV detects the resulting mp4 as a DoVi, but playback is stuck on the very first frame.

This is so weird.

Fuso
28th June 2023, 16:17
Hi,

Reporting an issue. I can work it around with another tool, so mostly reporting as an FYI to DDVT maintainer (thx for your tool BTW).

I have downloaded a large DoVi MKV movie for TESTING purposes on my LG OLED65C8 (2018).

I converted the MKV to MP4 with DDVT_MKVTOMP4 v0.58, and TV plays it as a regular HDR file.
My main tv is LG C2, but I also have a B8 as second tv and I watch movies sometimes on it but can't play DV converted with this tool. I will be very happy if it becomes possible to watch Profile 8 mkv2mp4 on the pre-2020 LG models.



Then I converted the MKV to MP4 with dvmkv2mp4 (https://github.com/gacopl/dvmkv2mp4), and TV plays it as a DoVi file.
I suppose this tool is only for Linux?


EDIT: Still experimenting. This time, I tried converting this DoVi MKV (https://mega.nz/file/DGJU1BzL#4jtSK9Kvx2N6WuNdnQXyOi4NFEqLIymLrmSK5R8WilY) and the resulting mp4 plays as a DoVi on my TV.
That is because the file is Profile 7 which plays fine on the pre-2020 LG models.

GodzilaAvenger
28th June 2023, 18:04
Can you add the MediaInfo of the converted files?

MadMonkey57
28th June 2023, 18:27
Can you add the MediaInfo of the converted files?

Sure. Updated the original post (https://forum.doom9.org/showthread.php?p=1988940#post1988940).

GodzilaAvenger
29th June 2023, 05:09
My guess is that the problem stems from the codec type, one is "hev1" while the other is "dvhe". It seems that the latter triggers DV on your TV while the former doesn't. Also the HDR format info of the second one is weird (Version 0 isn't exactly a thing).

If I were to guess again I'd say this is because dvmkv2mp4 uses "hevc_mp4toannexb" but DDVT doesn't, but I may be wrong.

guest
29th June 2023, 05:37
My main tv is LG C2, but I also have a B8 as second tv and I watch movies sometimes on it but can't play DV converted with this tool. I will be very happy if it becomes possible to watch Profile 8 mkv2mp4 on the pre-2020 LG models.


In my limited experience (so far) with all this, I have found that the ONLY DV file format that will play on my LG 4K TV is either .ts, or .m2ts !!!!

Neither .mp4 or .mkv will play as DV, only as HDR10.

The only playback issue I have is if I "bump" the playback forward or backwards by the default 15 sec's, it will stall the playback for a second or 2, other than that, it's fine.

MadMonkey57
29th June 2023, 12:04
I will be very happy if it becomes possible to watch Profile 8 mkv2mp4 on the pre-2020 LG models.
I've only made a few tests so far, but it seems Profile 8 are indeed not detected as DV once converted with DDVT_MKVTOMP4.


I suppose this tool is only for Linux?
Yes, I'm running the docker setup in Linux. You could maybe try WSL.


That is because the file is Profile 7 which plays fine on the pre-2020 LG models.
Again, I can only concur to this. The "Awaken Girl (https://mega.nz/file/DGJU1BzL#4jtSK9Kvx2N6WuNdnQXyOi4NFEqLIymLrmSK5R8WilY)" MKV sample converted with DDVT_MKVTOMP4 successfully plays as DV. And it is Profile 7.

MadMonkey57
29th June 2023, 12:11
My guess is that the problem stems from the codec type, one is "hev1" while the other is "dvhe". It seems that the latter triggers DV on your TV while the former doesn't.
Like I stated in my previous post, the converted "Awaken Girl " sample plays fine as DV although the codec is hev1 for reasons...

Also the HDR format info of the second one is weird (Version 0 isn't exactly a thing).
Yes, I noticed that as well. Weird.

If I were to guess again I'd say this is because dvmkv2mp4 uses "hevc_mp4toannexb" but DDVT doesn't, but I may be wrong.
That was also my first assumption, but considering the other MKV samples I have converted, I'm having second thoughts.

That LG player is a mess.
It's a pity I don't have more MKV samples (with different profiles, ...) to play with.

EDIT: I've managed to get my hands on another very large Profile 8 (dvhe.08.06) DV MKV file. Once again, converted to mp4 with DDVT is not detected as DV by LG TV, while it is with dvmkv2mp4. So under *some* circumstances, profile 8 can actually play as DV on the LG (2018).

SeeMoreDigital
29th June 2023, 12:22
What Dolby Vision profiles do media streaming services use?

GodzilaAvenger
29th June 2023, 18:50
5, sometimes 8. Blu-rays use 7.

hidef_rec
29th June 2023, 19:55
Hi,
I'm starting to get interested in the AV1 codec, and I would like to know if this codec is compatible for Dolby Vision and if this software accepts this codec?
Thanks
No DV as has been said, but there was talk last year of Google pushing for a new open, royalty-free HDR & object-based audio formats (https://www.protocol.com/entertainment/google-dolby-atmos-vision-project-caviar).

GodzilaAvenger
29th June 2023, 23:52
@-QfG- I'm using v0.58 and I noticed that when using the injector script, instead of creating a "_[TEMP]" folder in the directory where the ".mkv" file is, the script creates a "SAME AS SOURCE" folder in the "DDVT" directory and stores the files there. Could you look into this and see if there's a bug somewhere?

Also, it would be great if when entering ALL in the FRAMEINFO tool, the L1 plot that dovi_tool can create is also generated.

UPDATE. Changing lines 87 and 88 to
if "!TMP_FOLDER!"=="SAME AS SOURCE" set "TMP_FOLDER=%~dpn1_[TEMP]"
if "!TARGET_FOLDER!"=="SAME AS SOURCE\%~n1_[INJECTED]" set "TARGET_FOLDER=%~dpn1_[INJECTED]"
(same as the demuxer script) seems to resolve the issue.

fransalas
1st July 2023, 18:10
Good afternoon, thank you very much for the great tool you have created.

fransalas
3rd July 2023, 16:40
good afternoon, maybe my question is somewhat risky but there I throw it, there would be a possibility of incorporating a script that transforms the RPU to XML and vice versa? thank you again

GodzilaAvenger
3rd July 2023, 19:36
Here's a possible solution: use the FRAMEINFO tool and enter ALL to get a *.json file of all frame infos of the RPU binary. Then use a json to xml conversion tool (there are even some online tools available).

pandv2
3rd July 2023, 20:54
I am confused about removing and duplicating rpu frames at the same time.

If I want to remove the frame 10 and duplicate the frame 20. I need to do:

"remove": [
"10",
],
"duplicate": [
{
"source": 20,
"offset": 21,
"length": 1
}
]
}

Or I need to acount for the deleted frame:

"remove": [
"10",
],
"duplicate": [
{
"source": 19,
"offset": 20,
"length": 1
}
]
}

I am using DDVT injector with a custom.json.

I am suposing a delete doesn't changes the count for the next delete, and a duplicate doesn't change the count for the next duplicate. Is this true?

Thanks.

GodzilaAvenger
3rd July 2023, 21:46
dovi_tool editor instructions (https://github.com/quietvoid/dovi_tool/blob/main/docs/editor.md)

fransalas
3rd July 2023, 22:20
thanks for answering before, could you tell me if there is any possibility of knowing the scenes of an MKV in HDR10, is that I am doing a test reconstructing a movie.

pandv2
3rd July 2023, 23:22
dovi_tool editor instructions (https://github.com/quietvoid/dovi_tool/blob/main/docs/editor.md)

Thanks.

I have read that document before asking. Maybe, it is my understanding of english, but i am not sure what is the correct answer. I deducted:

1.- One remove doesn't affect the position of the next.
2.- One duplicate doesn't affect the position of the next.
3.- The remove's set affect the duplicates.

I am not sure if it's true. That's why I asked.

Note: It's correct. I tested as suggested by GodzilaAvenger.

GodzilaAvenger
4th July 2023, 02:17
I have the same understanding as you. To verify I recommend trying out dovi_tool (not the INJECTOR script) on the RPU and then using the FRAMEINFO tool on both the original and modified RPUs to see what has changed.

GodzilaAvenger
4th July 2023, 02:22
thanks for answering before, could you tell me if there is any possibility of knowing the scenes of an MKV in HDR10, is that I am doing a test reconstructing a movie.

I'm not sure if I understand your question correctly. Do you want to know if a .mkv file is HDR10? If so, you can use MediaInfo to find out.

I haven't heard of an .mkv being capable of having both SDR and HDR scenes at the same time, if that's what you mean. It's either one or the other AFAIK.

quietvoid
4th July 2023, 02:23
1.- One remove doesn't affect the position of the next.
2.- One duplicate doesn't affect the position of the next.
3.- The remove's set affect the duplicates.

I am not sure if it's true. That's why I asked.

Sounds correct to me.

Fuso
4th July 2023, 15:54
EDIT: I've managed to get my hands on another very large Profile 8 (dvhe.08.06) DV MKV file. Once again, converted to mp4 with DDVT is not detected as DV by LG TV, while it is with dvmkv2mp4. So under *some* circumstances, profile 8 can actually play as DV on the LG (2018).

Can you test if this file plays fine in regulard HDR on non-DV capable tv... like Samsung for example? I think it will not play because the codec ID is dvhe.
If you can test and it works even on a non-DV capable tv, it will be perfect.
Strangely Profile 5 DV with codec ID set to hev1 plays fine on both LG B8 and LG C2, even on a Samsung but with purple and green tint (which is understandable).
The problem is that the older LG's have some issue with Profile 8 with Codec ID set to hev1.

Boulder
4th July 2023, 20:04
Does anyone have a proven DV profile 8.1 sample clip in MP4 to test on my Sony's media player? I can get a profile 5 sample to trigger DV mode, but the 8.1 ones I created using RPU injection while encoding in x265 or injecting afterwards and then converting the files to MP4 won't work. The Sony player can apparently understand DV only in MP4 files, and the links to samples at Dolby's developer site just error out.

MadMonkey57
5th July 2023, 14:45
Can you test if this file plays fine in regulard HDR on non-DV capable tv... like Samsung for example? I think it will not play because the codec ID is dvhe.
If you can test and it works even on a non-DV capable tv, it will be perfect.
Strangely Profile 5 DV with codec ID set to hev1 plays fine on both LG B8 and LG C2, even on a Samsung but with purple and green tint (which is understandable).
The problem is that the older LG's have some issue with Profile 8 with Codec ID set to hev1.
Sorry, the only TV I have access to is my LG C8.

guest
5th July 2023, 15:43
Does anyone have a proven DV profile 8.1 sample clip in MP4 to test on my Sony's media player? I can get a profile 5 sample to trigger DV mode, but the 8.1 ones I created using RPU injection while encoding in x265 or injecting afterwards and then converting the files to MP4 won't work. The Sony player can apparently understand DV only in MP4 files, and the links to samples at Dolby's developer site just error out.

Me again,

Have you tried converting them to either .ts or .m2ts ??

My LG TV won't play DV in either .mp4 or .mkv :(

I also mentioned this here :-

https://forum.doom9.org/showthread.php?p=1988970#post1988970

SeeMoreDigital
5th July 2023, 18:53
My LG TV won't play DV in either .mp4 or .mkv :(

Just so you know... Currently, no make/model of television is able to play Dolby Vision in .mkv (using it's built in media player app). As a new Matroska parser will need to be created...

benwaggoner
5th July 2023, 19:37
I've only made a few tests so far, but it seems Profile 8 are indeed not detected as DV once converted with DDVT_MKVTOMP4.
Profile 8 was a relatively recent addition to Dolby Vision, and isn't supported by older TVs, presumably including these pre-2020 LG models. I'd hope/expect they'd at least play back as native HDR-10 ignoring the dynamic metadata.

benwaggoner
5th July 2023, 19:40
Does anyone have a proven DV profile 8.1 sample clip in MP4 to test on my Sony's media player? I can get a profile 5 sample to trigger DV mode, but the 8.1 ones I created using RPU injection while encoding in x265 or injecting afterwards and then converting the files to MP4 won't work. The Sony player can apparently understand DV only in MP4 files, and the links to samples at Dolby's developer site just error out.
What model year Sony? DoVi TVs have supported Profile 5 since they launched, but only the last few years have supported Profile 8.

rwill
5th July 2023, 20:11
Does anyone have a proven DV profile 8.1 sample clip in MP4 to test on my Sony's media player? I can get a profile 5 sample to trigger DV mode, but the 8.1 ones I created using RPU injection while encoding in x265 or injecting afterwards and then converting the files to MP4 won't work. The Sony player can apparently understand DV only in MP4 files, and the links to samples at Dolby's developer site just error out.

Can you make your 8.1 .mp4 stream available somewhere so I can test it on my end ?

Boulder
5th July 2023, 20:30
What model year Sony? DoVi TVs have supported Profile 5 since they launched, but only the last few years have supported Profile 8.

It's an XF9005 (x900f in the USA?), so it's 2018 I think. Very hard to tell which profiles it supports as it doesn't seem to be any important information to Sony..
Can you make your 8.1 .mp4 stream available somewhere so I can test it on my end ?
Here are the two files I've tested. One with direct RPU input while encoding, the other with injection afterwards.

https://drive.google.com/file/d/15ewWr8v1x3xnanbS-TReWnVldIsu2YpA/view?usp=drive_link
https://drive.google.com/file/d/13wbvOYwJwHdxKON94jY4JCXfYARCBTws/view?usp=drive_link

SeeMoreDigital
5th July 2023, 20:59
https://drive.google.com/file/d/15ewWr8v1x3xnanbS-TReWnVldIsu2YpA/view?usp=drive_link[/url]
https://drive.google.com/file/d/13wbvOYwJwHdxKON94jY4JCXfYARCBTws/view?usp=drive_linkHave you created the meta-data for both of these 1920x1080 video files yourself?

Neither can display Dolby Vision on my 2016 LG television, only HDR...

Do 'known' profile 5 and/or profile 8 .mp4/.m2ts/.ts files display okay on your Sony KD-65XF9005?

Boulder
5th July 2023, 22:37
Have you created the meta-data for both of these 1920x1080 video files yourself?

Neither can display Dolby Vision on my 2016 LG television, only HDR...

Do 'known' profile 5 and/or profile 8 .mp4/.m2ts/.ts files display okay on your Sony KD-65XF9005?

Both files use the same RPU.bin file. I got it by turning a Dolby Vision sample track (m2ts with DoVi profile 7) to mkv using MakeMKV, then using the created file with the demuxer script.

The profile 5 one I have (not made by me) does play ok and switches on the Dolby Vision mode. The others fall back to HDR10, hence me asking if anyone has a verified sample clip to check.

quietvoid
5th July 2023, 23:32
The profile 5 one I have (not made by me) does play ok and switches on the Dolby Vision mode. The others fall back to HDR10, hence me asking if anyone has a verified sample clip to check.

My guess is that your TV might only play in Dolby Vision if the codec tag is dvhe/dvh1.
At least both of your samples are hev1.

One way is to use MP4Box to mux:

MP4Box.exe -add video.hevc:dvp=f8.hdr10:hdr=none:stype=dvhe -brand mp42isom -ab dby1 -new video-muxed.mp4

rwill
6th July 2023, 04:08
https://drive.google.com/file/d/15ewWr8v1x3xnanbS-TReWnVldIsu2YpA/view?usp=drive_link
https://drive.google.com/file/d/13wbvOYwJwHdxKON94jY4JCXfYARCBTws/view?usp=drive_link

Well, plays as Dolby Vision on my OLED48CX9LB LG TV...

guest
6th July 2023, 04:42
Well, plays as Dolby Vision on my OLED48CX9LB LG TV...

Neither of these would display DV on my LG SK8500PTA.

But, quickly running them thru tsmuxer to .m2ts, DID display DV :)