Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th December 2021, 22:16   #1  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
[DDVT Tool] Dolby Vision RPU Demuxing / Injecting / Editing.

DDVT Tool Download Folder on MEGA.
(The tool based on quietvoids tools)


-Demuxing DV Metadata from MKVs/MP4s.
-Convert HDR10+ Metadata to DoVi Metadata (Experimental).
-Convert Profile 7/5 Metadata to Profile 8.1.
-Inject DoVi Metadata in Streams.
-Easy Delay Adjustment in Injector.
-Complete Open Source Batch Scripts!

Credits to quietvoid for his awesome tools.
Credits to Atak_Snajpera for the BorderDetect tool.


Last edited by -QfG-; 6th February 2023 at 00:07.
-QfG- is offline   Reply With Quote
Old 4th December 2021, 23:14   #2  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
The mastering display metadata you used is correct.

For the min value, it is 10000x the float value. So 10000 * 0.0001 = 1.
Max stays the same.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 5th December 2021, 01:17   #3  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Ok, thank you quietvoid.
-QfG- is offline   Reply With Quote
Old 5th December 2021, 04:13   #4  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
i have created 2 little Batch scripts, one Demuxer and one Injector. With this scripts you can simply:

- Change DoVi Profile 7,5 to Profile 8
- Adding Delays (useful for Hybrid Releases)
- Convert HDR10+ Metadata to DoVi Profile 8 Metadata
- Delete HDR10+ Metadata from Videostream



https://workupload.com/file/GWpvx2dzvcs

quietvoid many thanks for this awesome tools.
-QfG- is offline   Reply With Quote
Old 5th December 2021, 21:47   #5  |  Link
shodan5000
Registered User
 
Join Date: Sep 2018
Posts: 33
Quote:
Originally Posted by -QfG- View Post
i have created 2 little Batch scripts, one Demuxer and one Injector.
Thank you very much! I am having an issue though. I'm testing a HDR10+ film and running it through the demuxer batch file to convert to DV. Everything seems to go just fine in the conversion and it appears to complete successfully. However, I can't find any resulting RPU.bin file. The generated folder is completely empty.

I've also tested a DV film and that process seems to work well and leaves a generated RPU.bin file.

Also, since dovi_tool is capable of converting the RPU to be profile 8.1 compatible, why is that option not available and only profile 8 is shown? Can that be added?

Last edited by shodan5000; 5th December 2021 at 23:15.
shodan5000 is offline   Reply With Quote
Old 24th July 2023, 17:09   #6  |  Link
puremind
Registered User
 
Join Date: Jul 2023
Posts: 2
Quote:
Originally Posted by -QfG- View Post
i have created 2 little Batch scripts, one Demuxer and one Injector. With this scripts you can simply:

- Change DoVi Profile 7,5 to Profile 8
- Adding Delays (useful for Hybrid Releases)
- Convert HDR10+ Metadata to DoVi Profile 8 Metadata
- Delete HDR10+ Metadata from Videostream

https://workupload.com/file/GWpvx2dzvcs

quietvoid many thanks for this awesome tools.
Hello

In order to accelerate conversions from MKV to MP4 I customized your script so that you can pass a folder instead of a file path to allow for batch conversion of files.
MP4all.rar

Changes include:
  • The script will now convert all files in the specified folder (C:\folder and C:\folder\ both work).
  • It will ask for the audio codec selection only for the first file and then apply those settings to all further files
  • It will summarize the output file name, FPS and audio codec while it is converting, not only the source characteristics
  • The converted files will go to the source folder instead of a custom folder for each conversion.
    This allows the user to replace all of their MKV's with the MP4's without having to pull for multiple subfolders.
    It will keep the MKV's until you have been able to check the files (user should delete the MKV's manually)
  • it will check if there is already an MP4 file with the output file name and skip the mkv conversion if there is
  • it will also convert any subfolder files, so be careful if you convert at root level, you may convert your entire mkv library at once

NOTE:
  • Only convert files that have the same characteristics using this script.
  • If you want to convert heterogeneous files, the loop would need to be tweaked so that each source file is analyzed (:CHECK is always performed) and only skipping the audio codec selection part.

I created this because I often have multiple files in one folder all waiting to be converted and it can be very tedious to do it one by one.

You should feel free to add this script to your rar release, either as a replacement of the DDVT_MKVTOMP4 script or as a separate command.

One thing that I wanted to ask you about. As you know, right now conversion fails if there is an image based subtitle track in the MKV. Should we just strip the subtitles when this is detected? It seems to me we could use something like this in the script so that no conversion would fail?
Code:
# remove all subtitles (copy none)
mkvmerge -o output.mkv --no-subtitles input.mkv
If you think it makes sense, I would appreciate if you could include in future versions of your scripts.
Attached Images
 

Last edited by puremind; 26th July 2023 at 08:13.
puremind is offline   Reply With Quote
Old 31st July 2023, 15:56   #7  |  Link
TomDoom
Registered User
 
Join Date: Jul 2023
Posts: 1
Hi -QfG-

thanks for those nice scripts

I mostly use the MKV2MP4 Convert to have DV play on my LG TV. However, the MP4 File has the wrong audio language tag. Every track will become tagged as ENGLISH, unfortunately.
That even happens If you don't change/convert the audio track.

MKV:

Quote:
Audio #1
ID : 2
[...]
Title : German
Language : German

After MP4 conversion:

Quote:
Audio #1
ID : 2
[...]
Title : German
Language : English
Maybe you can fix that (or anyone else knows what's going wrong here and tell me what tou change)? That's happening since loooong time and I think you heard of it already.

Thanks!
Tom
TomDoom is offline   Reply With Quote
Old 3rd September 2023, 03:43   #8  |  Link
puremind
Registered User
 
Join Date: Jul 2023
Posts: 2
Quote:
Originally Posted by puremind View Post
Hello

In order to accelerate conversions from MKV to MP4 I customized your script so that you can pass a folder instead of a file path to allow for batch conversion of files.
Attachment 18452

Changes include:
  • The script will now convert all files in the specified folder (C:\folder and C:\folder\ both work).
  • It will ask for the audio codec selection only for the first file and then apply those settings to all further files
  • It will summarize the output file name, FPS and audio codec while it is converting, not only the source characteristics
  • The converted files will go to the source folder instead of a custom folder for each conversion.
    This allows the user to replace all of their MKV's with the MP4's without having to pull for multiple subfolders.
    It will keep the MKV's until you have been able to check the files (user should delete the MKV's manually)
  • it will check if there is already an MP4 file with the output file name and skip the mkv conversion if there is
  • it will also convert any subfolder files, so be careful if you convert at root level, you may convert your entire mkv library at once

NOTE:
  • Only convert files that have the same characteristics using this script.
  • If you want to convert heterogeneous files, the loop would need to be tweaked so that each source file is analyzed (:CHECK is always performed) and only skipping the audio codec selection part.

I created this because I often have multiple files in one folder all waiting to be converted and it can be very tedious to do it one by one.

You should feel free to add this script to your rar release, either as a replacement of the DDVT_MKVTOMP4 script or as a separate command.

One thing that I wanted to ask you about. As you know, right now conversion fails if there is an image based subtitle track in the MKV. Should we just strip the subtitles when this is detected? It seems to me we could use something like this in the script so that no conversion would fail?
Code:
# remove all subtitles (copy none)
mkvmerge -o output.mkv --no-subtitles input.mkv
If you think it makes sense, I would appreciate if you could include in future versions of your scripts.
@-QfG-

I found we can use mkvextract:
mkvextract file.mkv tracks [tracknumber] file.srt

I think your script already saves key information using media info, so all you would have to do is store information about on which track each language is found, then ask the user which subtitles they want to extract and do the extraction command on the tracks that the user selected and put them in the same folder as the source folder.

This would allow srt subtitles to be preserved on all episodes of a same video within MP4all.cmd.

Is there a way to extrac them in a different format and then add them to an MP4 container?
puremind is offline   Reply With Quote
Old 5th December 2021, 11:44   #9  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Hi,
I have a question : now if we can convert HDR10+ to DoVi, is it possible to convert DoVi to HDR10+ ?
Thanks !
Nico8583 is offline   Reply With Quote
Old 5th December 2021, 14:48   #10  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
Quote:
Originally Posted by Nico8583 View Post
Hi,
I have a question : now if we can convert HDR10+ to DoVi, is it possible to convert DoVi to HDR10+ ?
Thanks !
In theory it is, but there's no implementation for it.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 5th December 2021, 20:00   #11  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Thank you, do you plan to add it later ?
Nico8583 is offline   Reply With Quote
Old 5th December 2021, 20:03   #12  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Location: Canada
Posts: 574
No, I have no way to test anything related to HDR10+.
__________________
LG C2 OLED | GitHub Projects
quietvoid is offline   Reply With Quote
Old 5th December 2021, 22:43   #13  |  Link
RanmaCanada
Registered User
 
Join Date: May 2009
Posts: 333
I hate to ask, but are there any plans to make a gui, even a basic one? This is fantastic work, seriously, it's just I am no longer comfortable with command lines in my "old" age haha (decades of AIX in my youth has taken it's toll). If I could, I would buy both you and quietvoid some pizza, or beer, or coffee, or chocolates/candy haha whatever you'd prefer!
RanmaCanada is offline   Reply With Quote
Old 6th December 2021, 09:22   #14  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 638
Eventhough I got myself accustomed to do every step with the cli of quietvoid's tools, your scripts are welcome and handy additions. Love the drag & drop support.
Thanks, -QfG-
von Suppé is offline   Reply With Quote
Old 13th December 2021, 00:38   #15  |  Link
shodan5000
Registered User
 
Join Date: Sep 2018
Posts: 33
Nothing? No follow-up at all?
shodan5000 is offline   Reply With Quote
Old 28th December 2021, 16:22   #16  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Here my newest scripts. Credits to @quietvoid for his awesome Tools. But i still have problems with the HDR10+ to DV conversion. I'm to stupid for this.

If anyone can fix the JSON script for HDR10+ converting, please tell it me.

Whats new?

I have many trouble with FFMPEG, so for MKV files i use mkvextract to demux and for mp4 files mp4box.
You can:

DEMUXER
-Extract RPU from Profile 5,7,8 and switch to profile 8.
-Erase HDR10+ Metadata during extracting.
-Crop the target RPU.

INJECTOR
-You can inject RPU into HDR Stream.
-You can discard HDR10+ Metadata in source stream.
-You can simply Edit Frames for hybrid releases.
-You can mux the raw hevc stream into mkv container (using mkvmerge) with correct DV infos.

Known Bugs:

-HDR10+ to DV Conversion will not working (JSON Script Error)

Everyone can change and fix something on the scripts without any permissions.

Newest Scripts are here:
https://1fichier.com/?6h70dlix91tsgmzaelar

Preview Pictures:




Quote:
Also, since dovi_tool is capable of converting the RPU to be profile 8.1 compatible, why is that option not available and only profile 8 is shown? Can that be added?
If u convert the RPU in Profile 8 and inject this in an SDR Stream it is 8.2 and in an HDR Stream it is 8.1.

Last edited by -QfG-; 28th December 2021 at 16:32.
-QfG- is offline   Reply With Quote
Old 29th December 2021, 02:30   #17  |  Link
shodan5000
Registered User
 
Join Date: Sep 2018
Posts: 33
I'm just not understanding the operation here. Apologies in advance, but could you baby step the operation of this for me. I've dropped a profile 5 video onto the demuxer and it creates a folder with the newly created profile 8 RPU in it, nothing else. Now what? I have no other file except the original profile 5 video to drop onto the injector. The injector will not accept this file to operate. How exactly, in steps, do you get the new RPU injected correctly?
shodan5000 is offline   Reply With Quote
Old 29th December 2021, 08:29   #18  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
You need another HDR10 file where you can now inject the DV RPU. DV Profile 5 Videos are only DV5 without HDR Fallback.
-QfG- is offline   Reply With Quote
Old 29th December 2021, 13:54   #19  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 638
for the new scripts, -QfG-
von Suppé is offline   Reply With Quote
Old 29th December 2021, 18:34   #20  |  Link
shodan5000
Registered User
 
Join Date: Sep 2018
Posts: 33
Quote:
Originally Posted by -QfG- View Post
You need another HDR10 file where you can now inject the DV RPU. DV Profile 5 Videos are only DV5 without HDR Fallback.
Thank you for the response. However, I'm even more confused now lol. Is it not one of the points of this program is the ability to convert profile 5 into profile 8 and then inject that?
shodan5000 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.