├── Changelog.txt ├── DDVT_DEMUXER.cmd ├── DDVT_FILEINFO.cmd ├── DDVT_HYBRID.cmd ├── DDVT_INJECTOR.cmd ├── DDVT_MEDIAINFO.cmd ├── DDVT_MKVTOMP4.cmd ├── DDVT_OPTIONS.cmd ├── DDVT_REMOVER.cmd └── README.md /Changelog.txt: -------------------------------------------------------------------------------- 1 | -v0.65.3 2 | -FIXED Errors with P8 Hybrid script if no temp folder set in options. 3 | -FIXED If you right click on a video file and navigate to DDVT/P8 Hybrid script, file will be automated set as HDR Input file. 4 | -FIXED Some little bugs in options script. It's recommended to reinstall shell extensions if needed. 5 | *Minor Bugfixes. 6 | 7 | -v0.65.2 8 | -FIXED Errors with FFMPEG and bitstream demuxing/pipelining (clipping and wrong colors on some movies) 9 | *Minor Bugfixes. 10 | 11 | -v0.65.1 12 | -ADDED INJECTOR Custom JSON Support (if activated) for RPU (*.bin) files. 13 | 14 | -v0.65 15 | ADDED Logfile for HYBRID script. 16 | ADDED Set Frame 0 Scenecut Fix in RPU (Turn ON/OFF via Options). 17 | FIXED Errors in HYBRID script. 18 | FIXED Errors in DEMUXER script. 19 | FIXED Display Bug with RPU files in FILEINFO script. 20 | NEW ICON SET - Reinstall the Shell Extensions! 21 | *Minor Bugfixes. 22 | 23 | -v0.64.5 24 | ADDED -Injector- Support for Custom JSON files without injecting DV / HDR10+. Not supported for DV Profile 7. Skip DV and HDR10+ Input for processing JSON files directly. 25 | FIXED -Options- Errors with Shell Extensions and W11. 26 | FIXED -Options- Wrong TAB entry in DDVT_Options.ini [Line JSON_PROCESS] (if you have the TAB bug, please delete the complete line in ini file and save options again). 27 | FIXED -MediaInfo- Removed HDR Metadata Tab for non HDR files. 28 | *UPDATED mkvtoolnix to v 89.0.0.0. 29 | *Minor Bugfixes. 30 | 31 | -v0.64.4 32 | *XML Support (Injector / Demuxer) 33 | *REWORKED MANY Scripts 34 | *ADDED Function to plot HDR Metadata in -FileInfo- script (fork from reset_9999) 35 | *ADDED Mass Converting with -MKVtoMP4- (Folder Support) 36 | *UPDATED Python to v3.13 37 | *Minor Bugfixes. 38 | 39 | -v0.64.3d 40 | *ADDED Function in -MKVtoMP4- script for creating "fake" Profile 5 files. 41 | 42 | -v0.64.3c 43 | *FIXED Errors in demuxing combinations in DEMUXER script. 44 | *FIXED Some errors in MediaInfo with DL files. 45 | *FIXED L6 Error (L6 SWITCH) in Injector script. 46 | *FIXED If changing FPS with Injector and EL is input, FPS from EL changed, too. 47 | *ADDED Option in Injector script for writing RPU L6 Data as HDR bitstream data. 48 | *Minor Bugfixes. 49 | 50 | -v0.64.3b 51 | *REWORKED -P8 Hybrid Script-. Works now faster. 52 | *Minor Bugfixes. 53 | 54 | -v0.64.3a 55 | *FIXED Problems with files that contains "()" in filename. 56 | 57 | -v0.64.3 58 | *ADDED m2ts Dual Layer Suppert for Demuxer Script. 59 | *FIXED -Demuxer- Frames display bug. 60 | *Minor Bugfixes. 61 | 62 | -v0.64.2 63 | *Major Bugfixes. 64 | *FIXED -MediaInfo- bugs with AV1/VP1 65 | 66 | -v0.64.1 67 | *Minor Bugfixes. 68 | *ADDED Custom JSON file directly Support (Injector) (also bin files). 69 | *ADDED RPU Extracting via -Demuxer- Script. (bin files) 70 | *FIXED Wrong L9 detection with MediaInfo. 71 | 72 | -v0.64 73 | *Minor Bugfixes. 74 | *ADDED -MEDIAINFO- script (also quick video check for DV levels, included MEL/FEL analyse). 75 | *ADDED -SYNCCHECK- (check frames and cropping borders between video and rpu). 76 | *UPDATED dovi_tool to v2.1.3. 77 | *UPDATED hdr10plus_tool to v1.6.1. 78 | *UPDATED mkvtoolnix to v 88.0.0.0. 79 | *UPDATED FFMPEG to 7.1 80 | 81 | -v0.63.2 82 | *ADDED Shot List Support in Generator. (Generator script not official) 83 | *UPDATED Dolby Vision Pro Tools. 84 | *UPDATED dovi_tool to v2.1.1. 85 | *UPDATED mkvtoolnix to v 83.0.0.0. 86 | 87 | -v0.63.1 88 | *FIXED Border check fails if temp folder includes spaces (THX @ sirbod). 89 | *FIXED Better HDR detection. 90 | 91 | -v0.63 92 | *UPDATED Complete overhaul of the -DEMUXER- script. 93 | *UPDATED Complete overhaul of the -REMOVER- script. 94 | *UPDATED No more Target subfolders. 95 | *FIXED minor bugfixes. 96 | 97 | -v0.62 98 | *UPDATED Complete overhaul of the INJECTOR script. 99 | *ADDED Feature for settings custom mkvtoolnix path in Options. 100 | *UPDATED mkvtoolnix to v 82.0.0.0. 101 | *FIXED minor bugfixes. 102 | 103 | -v0.61.5 104 | *FIXED missing HDR Info String in mkvtomp4 script with DV P5 files. 105 | *UPDATED mkvtoolnix to v 81.0.0.0. 106 | 107 | -v0.61.4 108 | *FIXED wrong error message during RPU.bin creating in DEMUXER Script. 109 | *FIXED Sourcecode REMOVER Script. 110 | 111 | -v0.61.3 112 | *UPDATED dovi_tool to v2.1.0. 113 | *Minor Bugfixes. 114 | *REMOVED Crop Check function in DEMUXER script. 115 | *ADDED Crop Check function in FILEINFO script. 116 | *ADDED SCENECUTS option in FILEINFO script without extracting ALL frames. 117 | 118 | -v0.61.2 119 | *Minor Bugfixes 120 | *FIXED FFPROBE Bug with UAC On. 121 | 122 | -v0.61.1 123 | *Minor Bugfixes 124 | *ADDED Video Bitrate Plotter in FILEINFO Script. 125 | *ADDED MediaInfo File Writer in FILEINFO Script. 126 | 127 | -v0.61 128 | *Minor Bugfixes. 129 | *Some changes in scripts layout. 130 | *RENAMED Script Frameinfo.cmd to Fileinfo.cmd. 131 | Support for plotting DV / HDR10+ metadata graphs to png picture file. 132 | If u use shell extensions start Options.cmd and reset Shell Extensions! 133 | *UPDATED mkvtoolnix to v 79.0.0.0. 134 | 135 | -v0.60 136 | *Minor Bugfixes. 137 | *UPDATED mkvtoolnix to v 78.0.0.0. 138 | 139 | -v0.59 140 | *Hybrid Scripts supports now HDR10+ files without DV for secondary input. 141 | If the secondary stream contains DV and HDR10+ metadata, you can choose 142 | which metadata will be used for RPU. 143 | *Live ticker for Output file HDR infos. 144 | 145 | -v0.58 146 | *Removes mkclean from all scripts because damage on some tracks inside mkv container. 147 | 148 | -v0.57 149 | *DEMUXER creates a directory in source file dir if a custom dir is set - Fixed. 150 | *HYBRID Any bugfixes and overhauled layout. Live ticker if HDR and OUTPUT Borders matches. 151 | 152 | -v0.56 153 | *NEW - Hybrid Script - If DV file contents DV and HDR10+ and the HDR file is only HDR 154 | you can choice to mux HDR10+ metadata into target file. DV RPU 155 | will always mux in HDR stream, HDR10+ is optional. 156 | *Small Bugfixes. 157 | 158 | -v0.55 159 | *NEW Checking and repairing MKV Container during muxing. 160 | *UPDATED mkvtoolnix to v 77.0.0.0. 161 | *Major Bugfixes. 162 | *Reworked Shell Extensions (Hybrid P8 Script now in Shell Background). 163 | 164 | -v0.54 165 | *NEW New Script included (DDVT_Hybrid) for fast creating DV Profile 8.1 Hybrid Releases. 166 | *INJECTOR-Function to change correctly the video framerate. Also included in HYBRID Script. 167 | *UPDATED mkvtoolnix to v 76.0.0.0. 168 | 169 | -v0.53 170 | *UPDATED FFMPEG to N-110509-g722ff74055-20230506 171 | *UPDATED MP4Box to 2.2-rev0-gab012bbfb 172 | *UPDATED mkvtoolnix to v 75.0.0.0. 173 | 174 | -v0.52 175 | *UPDATED dovi_tool to v2.0.3. 176 | *UPDATED hdr10plus_tool to v1.6. 177 | 178 | -v0.51 179 | *UPDATED dovi_tool to v2.0.1. 180 | *UPDATED hdr10plus_tool to v1.5.2. 181 | *UPDATED mkvtoolnix to v 73.0.0.0. 182 | *Bugfix in Injector script for HDR10+ injecting (thx "von Suppé" for finding and "GodzilaAvenger" for fixing). 183 | 184 | -v0.50 185 | *Works now correct with all symbols in filenames. 186 | *UPDATED mkvtoolnix to v 71.1.1.0. 187 | 188 | -v0.49 189 | *INJECTOR-Support for HDR10+ JSON Data delaying. 190 | *UPDATED hdr10plus_tool to v1.4.0. 191 | *UPDATED dovi_tool to v1.5.7. 192 | 193 | -v0.48c 194 | *INJECTOR-Support for DV Profile 5 Video Streams. 195 | *UPDATED hdr10plus_tool to v1.3.2. 196 | *UPDATED dovi_tool to v1.5.6. 197 | 198 | -v0.48b 199 | *UPDATED mkvtoolnix to v 70.0.0.0. 200 | *Fixed bugs with spaced names. 201 | *Fixed FRAMEINFO function. 202 | 203 | -v0.48a 204 | *UPDATED FRAMEINFO Function. If you set Frames to ALL, all frames of 205 | a RPU will be exported. Also a file with all scenecuts will be created. 206 | Automatically formated in readable format. 207 | *Minor Bugfixes. 208 | 209 | -v0.48 210 | *UPDATED mkvtoolnix to v 69.0.0.0. 211 | *Add function to set TEMP and OUTPUT folder. 212 | *Multi instances support (only for different releases!) 213 | 214 | -v0.47a 215 | *UPDATED hdr10plus_tool to v1.3.1. 216 | *DEMUXER Added feature to disable validation of HDR10+ extraction. 217 | 218 | -v0.47 219 | *INJECTOR supports custom.json files (copy edited custom.json to video source dir). 220 | custom json scripts processed first! 221 | *INJECTOR New function "Match L6 Metadata". 222 | L6 Metadata will be edited for matching HDR stream Metadata. 223 | *INJECTOR creates now a small Logfile by muxing. 224 | *FRAMEINFO shows more informations about the RPU. 225 | *UPDATED dovi_tool to v1.5.5. 226 | 227 | -v0.46 228 | *Shows RPU/EL Layer Information in INJECTOR (Profile, CM Version, Frames) 229 | *UPDATED dovi_tool to v1.5.4. 230 | 231 | -v0.45 232 | *Added DoVi Profile 8.4 HLG Conversion in DEMUXER. 233 | *Fixed bad Frame choice in FRAMEINFO. 234 | *UPDATED mkvtoolnix to v 68.0.0.0. 235 | 236 | -v0.44 237 | *Fixed wrong Min Luminance Bug in DEMUXER by HDR10+ to DV Conversion. 238 | *UPDATED dovi_tool to v1.5.3. 239 | 240 | -v0.43 241 | *INJECTOR supports EL.hevc file for creating DV Profile 7 Single Layer Files. 242 | Copy EL.hevc to source video file directory. 243 | If exist EL.hevc and RPU.bin the tool automatically uses EL.hevc. 244 | *Fixed wrong FPS Bug in REMOVER. 245 | *Minor Bugfixes. 246 | 247 | -v0.42 248 | *UPDATED dovi_tool to v1.5.1. 249 | *UPDATED hdr10plus_tool to v1.2.2. 250 | *Fixed bad Bottom entry after analysing in RPU Output in INJECTOR. 251 | 252 | -v0.41b 253 | *Complete reworked Injector. If input file is in mp4/mkv container crop borders will automatically set. 254 | *Fixed wrong FPS Bug with Injector / Check Release. 255 | *Fixed Minor Bugs. 256 | 257 | -v0.41a 258 | *Cropping values from RPU.bin will shown in INJECTOR. 259 | *New Function in DEMUXER called CHECK RPU CROPPING VALUES. 260 | You can fix wrong cropped RPUs directcly. 261 | Works only with Profile 8 MKVs/MP4s and RAW Streams. 262 | 263 | -v0.41 264 | *Add MKVtoMP4 Script. 265 | *UPDATED mkvtoolnix to v 67.0.0.0. 266 | ** Scripts renamed, use DDVT_Options Script for creating new Shell Extensions. 267 | 268 | -v0.40e 269 | *Fixed container FPS error in INJECTOR. 270 | 271 | -v0.40d 272 | *UPDATED MediaInfo to v22.02. 273 | *UPDATED mkvtoolnix to v 66.0.0.0. 274 | *UPDATED dovi_tool to v1.4.7. 275 | *Fixed Minor Bugs. 276 | 277 | -v0.40c 278 | *RAW Stream Support for all Scripts. 279 | *Turn off Autodetect Borders Feature for RAW Streams. 280 | *DV and HDR10+ Metadata can now replaced in Stream. 281 | 282 | -v0.40b 283 | *Fixed major Bug by demuxing Profile7 files. 284 | 285 | -v0.40a 286 | *Fixed number bug in Demuxer. 287 | *Fixed Frameinfo RPU bug. 288 | 289 | -v0.40 290 | *Support for HEVC RAW streams in DDVT Demuxer. 291 | *Support for HEVC RAW streams in DDVT Remover. 292 | *Fixed DV remove Bug in DDVT Remover. 293 | *New Context Menus (create them with DDVT Options). 294 | 295 | -v0.39 296 | *Fixed HDR10+ converting without HDR metadata strings. 297 | 298 | -v0.38 299 | *UPDATED MP4Box.exe. 300 | *Added MP4 Mux Support in Injector (only if Input file is MP4 und only for Profile8). 301 | *Added DDVT REMOVER.cmd (Remove HDR10+ and/or DoVi Metadata from MP4/MKV Container). 302 | *Minor Bugfixes. 303 | 304 | -v0.37c 305 | *Fixed wrong ID by video track if muxing with INJECTOR. 306 | *UPDATED FFMPEG to v5.0. 307 | 308 | -v0.37b 309 | *Minor Bugfixes. 310 | *UPDATED mkvtoolnix to v 65.0.0.0. 311 | 312 | -v0.37a - FIXED 313 | *Fixed troubleshooting with profile switch in Profile 7 options. 314 | 315 | -v0.37a 316 | *Added AutoDetect Borders in AA Editor (works only with containers). 317 | *Added Profile 8 to Profile 7 Conversion. 318 | 319 | -v0.37 320 | *UPDATED dovi_tool to v1.4.6. 321 | *Added DDVT_FRAMEINFO.cmd. 322 | 323 | -v0.36 324 | *HDR10+ Demuxing / Injecting Support. 325 | 326 | -v0.35a 327 | *Minor Bugfixes. 328 | *Changed colors of any strings. 329 | 330 | -v0.35 331 | *Added Active Area Editor in Injector. 332 | *UPDATED hdr10plus_tool to v1.2.2. 333 | 334 | -v0.33a 335 | *Fixed bad strings if opened without file. 336 | 337 | -v0.33 338 | *Multiple Instances Support. 339 | *Injector RAW File Support. -------------------------------------------------------------------------------- /DDVT_DEMUXER.cmd: -------------------------------------------------------------------------------- 1 | @echo off & setlocal 2 | mode con cols=125 lines=57 3 | FOR /F "tokens=2 delims==" %%A IN ('findstr /C:"VERSION=" "%~dp0DDVT_OPTIONS.cmd"') DO set "VERSION=%%A" 4 | TITLE DDVT Demuxer [QfG] v%VERSION% 5 | 6 | set PasswordChars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 7 | set PasswordLength=5 8 | call :CreatePassword Password 9 | 10 | set "sfkpath=%~dp0tools\sfk.exe" rem Path to sfk.exe 11 | set "jqpath=%~dp0tools\jq-win64.exe" rem Path to jq.exe 12 | set "FFMPEGpath=%~dp0tools\ffmpeg.exe" rem Path to ffmpeg.exe 13 | set "FFPROBEpath=%~dp0tools\ffprobe.exe" rem Path to ffprobe.exe 14 | set "MP4BOXpath=%~dp0tools\mp4box.exe" rem Path to mp4box.exe 15 | set "MEDIAINFOpath=%~dp0tools\mediainfo.exe" rem Path to mediainfo.exe 16 | set "DO_VI_TOOLpath=%~dp0tools\dovi_tool.exe" rem Path to dovi_tool.exe 17 | set "DOVI_METApath=%~dp0tools\dovi_meta.exe" rem Path to dovi_meta.exe 18 | set "HDR10P_TOOLpath=%~dp0tools\hdr10plus_tool.exe" rem Path to hdr10plus_tool.exe 19 | 20 | rem --- Hardcoded settings. Can be changed manually --- 21 | set "CONVERT=PROFILE 8.1 HDR10" 22 | :: PROFILE 8.1 HDR10 / PROFILE 7 MEL / PROFILE 8.4 HLG / NO - Predefined convert profiles for RPU extraction. 23 | set "CHGHDR10P=YES" 24 | :: YES / NO - Convert HDR10+ Metadata to DV RPU. 25 | set "REMHDR10P=NO" 26 | :: YES / NO - Remove HDR10+ Metadata from BL. 27 | set "SAVHDR10P=NO" 28 | :: YES / NO - Save HDR10+ Metadata as JSON. 29 | set "SKIPHDR10P=NO" 30 | :: YES / NO - Skip validation test for HDR10+ Metadata. 31 | set "CM_VERSION=V40" 32 | :: V40 / V29 - Set CMv for converting HDR10+ Metadata to RPU. 33 | set "CROP=NO" 34 | :: YES / NO - If yes the Active Area from the RPU will set to 0,0,0,0. Helpful for cropped videos. 35 | set "BL=NO" 36 | :: YES / NO - Save BL in target folder. 37 | set "EL=NO" 38 | :: YES / NO - Save EL in target folder. 39 | set "RPU=YES" 40 | :: YES / NO - Save RPU in target folder. 41 | 42 | rem --- Hardcoded settings. Cannot be changed --- 43 | set "INPUTFILE=%~dpnx1" 44 | set "INPUTFILEPATH=%~dp1" 45 | set "INPUTFILENAME=%~n1" 46 | set "INPUTFILEEXT=%~x1" 47 | set "TMP_FOLDER=SAME AS SOURCE" 48 | set "TARGET_FOLDER=SAME AS SOURCE" 49 | set "MKVTOOLNIX_FOLDER=INCLUDED" 50 | set "MP4Extract=FALSE" 51 | set "MKVExtract=FALSE" 52 | set "HDR_Info=No HDR Infos found" 53 | set "HDR=FALSE" 54 | set "HDR10P=FALSE" 55 | set "DV=FALSE" 56 | set "HDR10P=FALSE" 57 | set "ELFILE=FALSE" 58 | set "DV=FALSE" 59 | set "REMHDR10PString=" 60 | set "SKIPHDR10PString=" 61 | set "EXTSTRING=" 62 | set "RESOLUTION=N/A" 63 | set "HDR=N/A" 64 | set "CODEC_NAME=N/A" 65 | set "FRAMERATE=N/A" 66 | set "FRAMES=N/A" 67 | set "RAW_FILE=FALSE" 68 | set "RPU_FILE=FALSE" 69 | set "DEMUX_RPU=FALSE" 70 | set /a "ERRORCOUNT=0" 71 | 72 | setlocal EnableDelayedExpansion 73 | set "WAIT="!sfkpath!" sleep" 74 | set "GREEN="!sfkpath!" color green" 75 | set "RED="!sfkpath!" color red" 76 | set "YELLOW="!sfkpath!" color yellow" 77 | set "WHITE="!sfkpath!" color white" 78 | set "CYAN="!sfkpath!" color cyan" 79 | set "MAGENTA="!sfkpath!" color magenta" 80 | set "GREY="!sfkpath!" color grey" 81 | 82 | ::Check for INI and Load Settings 83 | if exist "%~dp0DDVT_OPTIONS.ini" ( 84 | FOR /F "delims=" %%A IN ('findstr /C:"TEMP Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 85 | set "TMP_FOLDER=%%A" 86 | set "TMP_FOLDER=!TMP_FOLDER:~12!" 87 | ) 88 | FOR /F "delims=" %%A IN ('findstr /C:"TARGET Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 89 | set "TARGET_FOLDER=%%A" 90 | set "TARGET_FOLDER=!TARGET_FOLDER:~14!" 91 | ) 92 | FOR /F "delims=" %%A IN ('findstr /C:"MKVTOOLNIX Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 93 | set "MKVTOOLNIX_FOLDER=%%A" 94 | set "MKVTOOLNIX_FOLDER=!MKVTOOLNIX_FOLDER:~18!" 95 | ) 96 | ) 97 | if "%TMP_FOLDER%"=="SAME AS SOURCE" ( 98 | set "TMP_FOLDER=%~dp1DDVT_%Password%_TMP" 99 | ) else ( 100 | set "TMP_FOLDER=!TMP_FOLDER!\DDVT_%Password%_TMP" 101 | ) 102 | if "!TARGET_FOLDER!"=="SAME AS SOURCE" ( 103 | set "TARGET_FOLDER=%~dp1" 104 | set "TARGET_FOLDER=!TARGET_FOLDER:~0,-1!" 105 | ) 106 | if "!MKVTOOLNIX_FOLDER!"=="INCLUDED" set "MKVTOOLNIX_FOLDER=%~dp0tools" 107 | set "MKVMERGEpath=!MKVTOOLNIX_FOLDER!\mkvmerge.exe" 108 | 109 | if not exist "%sfkpath%" set "MISSINGFILE=%sfkpath%" & goto :CORRUPTFILE 110 | if not exist "%FFMPEGpath%" set "MISSINGFILE=%FFMPEGpath%" & goto :CORRUPTFILE 111 | if not exist "%FFPROBEpath%" set "MISSINGFILE=%FFPROBEpath%" & goto :CORRUPTFILE 112 | if not exist "%JQpath%" set "MISSINGFILE=%JQpath%" & goto :CORRUPTFILE 113 | if not exist "%MP4BOXpath%" set "MISSINGFILE=%MP4BOXpath%" & goto :CORRUPTFILE 114 | if not exist "%MEDIAINFOpath%" set "MISSINGFILE=%MEDIAINFOpath%" & goto :CORRUPTFILE 115 | if not exist "%DO_VI_TOOLpath%" set "MISSINGFILE=%DO_VI_TOOLpath%" & goto :CORRUPTFILE 116 | if not exist "%HDR10P_TOOLpath%" set "MISSINGFILE=%HDR10P_TOOLpath%" & goto :CORRUPTFILE 117 | if not exist "%DOVI_METApath%" set "MISSINGFILE=%DOVI_METApath%" & goto :CORRUPTFILE 118 | if not exist "%MKVMERGEpath%" set "MISSINGFILE=%MKVMERGEpath%" & goto :CORRUPTFILE 119 | 120 | if /i "%~x1"==".hevc" set "RAW_FILE=TRUE" & goto CHECK 121 | if /i "%~x1"==".h265" set "RAW_FILE=TRUE" & goto CHECK 122 | if /i "%~x1"==".m2ts" set "RAW_FILE=TRUE" & goto CHECK 123 | if /i "%~x1"==".mkv" set "MKVExtract=TRUE" & goto CHECK 124 | if /i "%~x1"==".mp4" set "MP4Extract=TRUE" & goto CHECK 125 | if /i "%~x1"==".bin" set "RPU_FILE=TRUE" & set "RPU=%~1" & goto CHECK 126 | 127 | if not "!INPUTFILE!"=="" goto :FALSEINPUT 128 | 129 | :CHECK 130 | CLS 131 | %GREEN% 132 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 133 | echo. 134 | %WHITE% 135 | echo ==================================== 136 | %GREEN% 137 | echo Dolby Vision Tool DEMUXER 138 | %WHITE% 139 | echo ==================================== 140 | %WHITE% 141 | echo. 142 | echo. 143 | echo == CHECK INPUT FILE ==================================================================================================== 144 | 145 | if "%~1"=="" ( 146 | %YELLOW% 147 | echo. 148 | echo No Input File. Use DDVT_DEMUXER.cmd "YourFilename.hevc/h265/mkv/mp4" 149 | echo. 150 | goto :EXIT 151 | ) 152 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 153 | echo. 154 | %CYAN% 155 | echo Analysing File. Please wait... 156 | if "!RPU_FILE!"=="FALSE" ( 157 | echo. 158 | set "INFOSTREAM=!INPUTFILE!" 159 | set "BL_INFOVIDEO=!INPUTFILE!" 160 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%VideoCount%% "!INFOSTREAM!""') do set "VIDEO_COUNT=%%A" 161 | if "!RAW_FILE!"=="TRUE" ( 162 | "!MKVMERGEpath!" --ui-language en --priority higher --output ^"!TMP_FOLDER!\Info.mkv^" --language 0:und --compression 0:none ^"^(^" ^"!INPUTFILE!^" ^"^)^" --split parts:00:00:00-00:00:01 -q 163 | if exist "!TMP_FOLDER!\Info.mkv" set "INFOSTREAM=!TMP_FOLDER!\Info.mkv" 164 | ) 165 | if "!VIDEO_COUNT!" NEQ "1" "!FFMPEGpath!" -loglevel panic -y -i "!INPUTFILE!" -map 0:0 -c:v copy -to 1 -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\BL_Info.mkv" 166 | if exist "!TMP_FOLDER!\BL_Info.mkv" ( 167 | set "BL_INFOVIDEO=!TMP_FOLDER!\BL_Info.mkv" 168 | ) 169 | ::SET HDR FORMAT 170 | if exist "!TMP_FOLDER!\Info.mkv" ( 171 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_String%% "!INFOSTREAM!">"!TMP_FOLDER!\Info.txt" 172 | FOR /F "delims=" %%A IN ('findstr /C:"Dolby Vision" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" 173 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10" 174 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10+" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10+" 175 | FOR /F "delims=" %%A IN ('findstr /C:"dvhe.05" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=IPT-PQ-C2" 176 | FOR /F "delims=" %%A IN ('findstr /C:"HLG" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HLG" 177 | ) 178 | if not defined HDRFormat ( 179 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_String%% "!INPUTFILE!">"!TMP_FOLDER!\Info.txt" 180 | FOR /F "delims=" %%A IN ('findstr /C:"Dolby Vision" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" 181 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10" 182 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10+" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10+" 183 | FOR /F "delims=" %%A IN ('findstr /C:"dvhe.05" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=IPT-PQ-C2" 184 | FOR /F "delims=" %%A IN ('findstr /C:"HLG" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HLG" 185 | ) 186 | if not defined HDRFormat set "HDRFormat=SDR" 187 | 188 | ::SET DV FORMAT 189 | if exist "!TMP_FOLDER!\Info.mkv" ( 190 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_Profile%% "!INFOSTREAM!">"!TMP_FOLDER!\Info.txt">nul 191 | FOR /F "delims=" %%A IN ('findstr /C:".08." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=8" 192 | FOR /F "delims=" %%A IN ('findstr /C:".07." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=7" 193 | FOR /F "delims=" %%A IN ('findstr /C:".06." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=6" 194 | FOR /F "delims=" %%A IN ('findstr /C:".05." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=5" 195 | FOR /F "delims=" %%A IN ('findstr /C:".04." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=4" 196 | FOR /F "delims=" %%A IN ('findstr /C:".03." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=3" 197 | ) 198 | if not defined DVprofile ( 199 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_Profile%% "!INPUTFILE!">"!TMP_FOLDER!\Info.txt">nul 200 | FOR /F "delims=" %%A IN ('findstr /C:".08." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=8" 201 | FOR /F "delims=" %%A IN ('findstr /C:".07." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=7" 202 | FOR /F "delims=" %%A IN ('findstr /C:".06." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=6" 203 | FOR /F "delims=" %%A IN ('findstr /C:".05." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=5" 204 | FOR /F "delims=" %%A IN ('findstr /C:".04." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=4" 205 | FOR /F "delims=" %%A IN ('findstr /C:".03." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=3" 206 | ) 207 | 208 | ::DUAL LAYER OPERATION 209 | if "!VIDEO_COUNT!" NEQ "1" ( 210 | set "LAYERTYPE= DL" 211 | "!FFPROBEpath!" "!INPUTFILE!" -show_streams -v 0 -of compact=p=0:nk=1 >"!TMP_FOLDER!\STREAMS.txt" 212 | FOR /F "delims=" %%A IN ('findstr /C:"1920|1080" "!TMP_FOLDER!\STREAMS.txt"') DO set "STREAMINFO=%%A" 213 | if exist "!TMP_FOLDER!\STREAMS.txt" del "!TMP_FOLDER!\STREAMS.txt" 214 | if defined STREAMINFO ( 215 | for /F "tokens=1 delims=|" %%A in ("!STREAMINFO!") do set "STREAMINFO=%%A" 216 | set "DT=-map 0:!STREAMINFO!" 217 | ) else ( 218 | set "DT=-map 0:1" 219 | ) 220 | ) 221 | 222 | ::DEMUX RPU SAMPLE 223 | if "!DVinput!"=="YES" ( 224 | if exist "!INFOSTREAM!" ( 225 | "!FFMPEGpath!" -loglevel panic -i "!INFOSTREAM!" -c:v copy -to 1 -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" extract-rpu -o "!TMP_FOLDER!\RPU.bin" - >nul 2>&1 226 | if exist "!TMP_FOLDER!\RPU.bin" ( 227 | FOR /F "usebackq" %%A IN ('"!TMP_FOLDER!\RPU.bin"') DO set "RPUSIZE=%%~zA" 228 | if "!RPUSIZE!" NEQ "0" ( 229 | set "RPU_EXIST=TRUE" 230 | ) else ( 231 | if exist "!TMP_FOLDER!\RPU.bin" del "!TMP_FOLDER!\RPU.bin" >nul 232 | set "RPU_EXIST=FALSE" 233 | ) 234 | ) else ( 235 | set "RPU_EXIST=FALSE" 236 | ) 237 | ) 238 | if "!RPU_EXIST!"=="FALSE" ( 239 | "!FFMPEGpath!" -loglevel panic -i "!INPUTFILE!" !DT! -c:v copy -to 1 -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" extract-rpu -o "!TMP_FOLDER!\RPU.bin" - >nul 2>&1 240 | if exist "!TMP_FOLDER!\RPU.bin" ( 241 | FOR /F "usebackq" %%A IN ('"!TMP_FOLDER!\RPU.bin"') DO set "RPUSIZE=%%~zA" 242 | if "!RPUSIZE!" NEQ "0" ( 243 | set "RPU_EXIST=TRUE" 244 | ) else ( 245 | set "RPU_EXIST=FALSE" 246 | ) 247 | ) else ( 248 | set "RPU_EXIST=FALSE" 249 | ) 250 | ) 251 | ) 252 | 253 | ::BEGIN MEDIAINFO 254 | FOR /F "tokens=1 delims= " %%A in ('""!MEDIAINFOpath!" --output=Video;%%MaxCLL%% "!INFOSTREAM!""') do set "MaxCLL=%%A" 255 | if not defined MaxCLL set "MaxCLL=0" 256 | FOR /F "tokens=1 delims= " %%A in ('""!MEDIAINFOpath!" --output=Video;%%MaxFALL%% "!INFOSTREAM!""') do set "MaxFALL=%%A" 257 | if not defined MaxFALL set "MaxFALL=0" 258 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%MasteringDisplay_Luminance%% "!INFOSTREAM!""') do set "Luminance=%%A" 259 | if not defined Luminance ( 260 | set "MinDML=1" 261 | set "MaxDML=1000" 262 | set "Luminance=N/A" 263 | ) else ( 264 | for /F "tokens=2" %%A in ("!Luminance!") do set "MinDML=%%A" 265 | for /F "tokens=* delims=0." %%A in ("!MinDML!") do set "MinDML=%%A" 266 | for /F "tokens=5" %%A in ("!Luminance!") do set "MaxDML=%%A" 267 | ) 268 | 269 | ::CODEC NAME 270 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%Format%%^-%%BitDepth%%Bit^-%%ColorSpace%%^-%%ChromaSubsampling%% "!BL_INFOVIDEO!""') do set "CODEC_NAME=%%A" 271 | if not defined CODEC_NAME set "CODEC_NAME=N/A" 272 | ::FRAMERATE 273 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameRate/String%% "!INPUTFILE!""') do set "FRAMERATE=%%A" 274 | for /F "tokens=1-2 delims=FPS " %%A in ("!FRAMERATE!") do set "FRAMERATE=%%A" 275 | ::RESOLUTION 276 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;"%%Width%%x x %%Height%%x" "!INPUTFILE!""') do set "RESOLUTION=%%A" 277 | for /F "tokens=1-4 delims=x " %%A in ("!RESOLUTION!") do ( 278 | if "!DVprofile!%%A%%B"=="719201080" set "ELFILE=TRUE" 279 | set "RESOLUTION=%%Ax%%B" 280 | ) 281 | ::FRAMES 282 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameCount%% "!BL_INFOVIDEO!""') do set "FRAMES=%%A" 283 | if "!HDRFormat!"=="HDR10" ( 284 | set "HDR=TRUE" 285 | %GREEN% 286 | echo HDR10 found. 287 | ) 288 | if "!HDRFormat!"=="HLG" ( 289 | set "HDR=TRUE" 290 | %GREEN% 291 | echo HLG found. 292 | ) 293 | if "!HDRFormat!"=="HDR10+" ( 294 | set "HDR=TRUE" 295 | set "HDR10P=TRUE" 296 | %GREEN% 297 | echo HDR10+ SEI found. 298 | ) 299 | if "!DVprofile!"=="8" ( 300 | set "HDR=TRUE" 301 | set "DV=TRUE" 302 | set "DV_Profile=8" 303 | %GREEN% 304 | echo Dolby Vision Profile 8 found. 305 | ) 306 | if "!DVprofile!"=="7" ( 307 | set "HDR=TRUE" 308 | set "DV=TRUE" 309 | set "DV_Profile=7" 310 | if "!RESOLUTION!"=="1920x1080" set "ELFILE=TRUE" 311 | if exist "!TMP_FOLDER!\RPU.bin" ( 312 | FOR /F "usebackq" %%A IN ('!TMP_FOLDER!\RPU.bin') DO set "RPUSIZE=%%~zA">nul 2>&1 313 | if "!RPUSIZE!" NEQ "0" ( 314 | "!DO_VI_TOOLpath!" info -s "!TMP_FOLDER!\RPU.bin">"!TMP_FOLDER!\RPUINFO.txt" 315 | if exist "!TMP_FOLDER!\RPUINFO.txt" ( 316 | FOR /F "delims=" %%A IN ('findstr /C:"Profile:" "!TMP_FOLDER!\RPUINFO.txt"') DO set "subprofile=%%A" 317 | if defined subprofile ( 318 | for /F "tokens=3 delims=:/ " %%A in ("!subprofile!") do set "subprofile= %%A" 319 | ) else ( 320 | set "subprofile=" 321 | ) 322 | ) 323 | ) 324 | ) 325 | %GREEN% 326 | if "!ELFILE!"=="TRUE" ( 327 | echo Dolby Vision Profile 7!subprofile!!LAYERTYPE! EL found. 328 | ) else ( 329 | echo Dolby Vision Profile 7!subprofile!!LAYERTYPE! found. 330 | ) 331 | set "DV_Profile=7!subprofile!!LAYERTYPE!" 332 | ) 333 | if "!DVprofile!"=="5" ( 334 | set "HDR=FALSE" 335 | set "DV=TRUE" 336 | set "DV_Profile=5" 337 | %GREEN% 338 | echo Dolby Vision Profile 5 found. 339 | ) 340 | if "!DVprofile!"=="4" ( 341 | set "HDR=TRUE" 342 | set "DV=TRUE" 343 | set "DV_Profile=4" 344 | %GREEN% 345 | echo Dolby Vision Profile 4 found. 346 | ) 347 | %GREEN% 348 | echo. 349 | if exist "!TMP_FOLDER!\Info.mkv" del "!TMP_FOLDER!\Info.mkv">nul 350 | if exist "!TMP_FOLDER!\BL.mkv" del "!TMP_FOLDER!\BL.mkv">nul 351 | if exist "!TMP_FOLDER!\RPU.bin" del "!TMP_FOLDER!\RPU.bin">nul 352 | if "!HDR!"=="TRUE" set "HDR_Info=!HDRFormat!" 353 | if "!HDR10P!"=="TRUE" set "HDR_Info=HDR10, !HDRFormat!" 354 | if "!DV!"=="TRUE" set "HDR_Info=Dolby Vision Profile !DV_Profile!" 355 | if "!HDR!!DV!"=="TRUETRUE" set "HDR_Info=!HDRFormat!, Dolby Vision Profile !DV_Profile!" 356 | if "!HDR10P!!DV!"=="TRUETRUE" set "HDR_Info=HDR10, !HDRFormat!, Dolby Vision Profile !DV_Profile!" 357 | if "!ELFILE!"=="TRUE" set "HDR_Info=Dolby Vision Profile !DV_Profile! Enhanced Layer [EL]" 358 | echo Analysing complete. 359 | ) else ( 360 | "!DO_VI_TOOLpath!" info -s "!RPU!" >"!TMP_FOLDER!\RPUINFO.txt" 361 | if not exist "!TMP_FOLDER!\RPUINFO.txt" ( 362 | %RED% 363 | echo. 364 | echo Corrupt RPU or not RPU File. 365 | echo. 366 | goto :EXIT 367 | ) 368 | %GREEN% 369 | echo. 370 | echo Analysing complete. 371 | ) 372 | 373 | ::FIND DV PROFILE FOR RPU 374 | if exist "!TMP_FOLDER!\RPUINFO.txt" ( 375 | FOR /F "delims=" %%A IN ('findstr /C:"Profile" "!TMP_FOLDER!\RPUINFO.txt"') DO set "RPUProfile=%%A" 376 | if defined RPUProfile ( 377 | for /F "tokens=2 delims=:/() " %%A in ("!RPUProfile!") do set "RPUProfile=%%A" 378 | ) else ( 379 | set "RPUProfile=N/A" 380 | ) 381 | if "!RPUProfile!"=="7" ( 382 | FOR /F "delims=" %%A IN ('findstr /C:"Profile" "!TMP_FOLDER!\RPUINFO.txt"') DO set "RPUSUBProfile=%%A" 383 | if defined RPUSUBProfile ( 384 | for /F "tokens=3 delims=:/() " %%A in ("!RPUSUBProfile!") do set "RPUSUBProfile=%%A" 385 | set "RPUProfile=!RPUProfile! !RPUSUBProfile!" 386 | ) else ( 387 | set "RPUProfile=N/A" 388 | ) 389 | ) 390 | ::FIND DM VERSION 391 | FOR /F "delims=" %%A IN ('findstr /C:"DM version" "!TMP_FOLDER!\RPUINFO.txt"') DO set "DM=%%A" 392 | if defined DM ( 393 | for /F "tokens=3 delims=:/()" %%A in ("!DM!") do set "DM=%%A" 394 | ) else ( 395 | set "DM=N/A" 396 | ) 397 | ) 398 | 399 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 400 | 401 | if "!HDRFormat!"=="HLG" set "CONVERT=PROFILE 8.1 HDR10" 402 | 403 | TIMEOUT 3 /NOBREAK>nul 404 | 405 | :START 406 | if "!RPU!"=="NO" set "CONVERT=NO" 407 | if "!RPU_FILE!"=="TRUE" goto :STARTRPU 408 | cls 409 | %GREEN% 410 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 411 | echo. 412 | %WHITE% 413 | echo ==================================== 414 | %GREEN% 415 | echo Dolby Vision Tool DEMUXER 416 | %WHITE% 417 | echo ==================================== 418 | echo. 419 | echo. 420 | echo == VIDEO INPUT ========================================================================================================= 421 | echo. 422 | %CYAN% 423 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 424 | echo Video Info = [Resolution = %RESOLUTION%] [Codec = %CODEC_NAME%] [Frames = %FRAMES%] [FPS = %FRAMERATE%] 425 | echo HDR Info = [%HDR_Info%] 426 | echo. 427 | %WHITE% 428 | if "!DVprofile!"=="8" goto :DV8 429 | if "!DVprofile!"=="7" goto :DV7 430 | if "!DVprofile!"=="5" goto :DV5 431 | if "!HDR10P!!DV!"=="TRUEFALSE" goto HDR10Plus 432 | %RED% 433 | echo No HDR10^+ ^/ Dolby Vision found. 434 | echo Abort Operation now. 435 | echo. 436 | goto :EXIT 437 | 438 | :STARTRPU 439 | cls 440 | %GREEN% 441 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 442 | echo. 443 | %WHITE% 444 | echo ==================================== 445 | %GREEN% 446 | echo Dolby Vision Tool DEMUXER 447 | %WHITE% 448 | echo ==================================== 449 | echo. 450 | echo. 451 | echo == RPU INPUT =========================================================================================================== 452 | echo. 453 | %CYAN% 454 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 455 | echo RPU Info = [Profile = %RPUProfile%] [DM = %DM%] [Frames = %FRAMES%] 456 | echo. 457 | %WHITE% 458 | echo == EXTRACTING ========================================================================================================== 459 | echo. 460 | call :RPU_EXTRACT 461 | goto :EXIT 462 | 463 | :HDR10Plus 464 | if "!CM_VERSION!"=="V40" set "CM_VERSION_text=4.0" 465 | if "!CM_VERSION!"=="V29" set "CM_VERSION_text=2.9" 466 | echo == MENU ================================================================================================================ 467 | echo. 468 | echo 1. SAVE BL : [%BL%] 469 | echo 2. SAVE HDR10+ Metadata : [%SAVHDR10P%] 470 | echo 3. Skip HDR10+ Validation : [%SKIPHDR10P%] 471 | echo 4. Remove HDR10+ Metadata from BL : [%REMHDR10P%] 472 | echo 5. Convert HDR10+ Metadata to DV : [%CHGHDR10P%] 473 | if "%CHGHDR10P%"=="YES" echo 6. Content Mapping Version : [%CM_VERSION_text%] 474 | echo. 475 | echo S. START 476 | echo. 477 | %GREEN% 478 | echo Change Settings and press [S] to start Extracting^^! 479 | if "%CHGHDR10P%"=="YES" ( 480 | CHOICE /C 123456S /N /M "Select a Letter 1,2,3,4,5,6,[S]tart" 481 | ) else ( 482 | CHOICE /C 12345S /N /M "Select a Letter 1,2,3,4,5,[S]tart" 483 | ) 484 | 485 | if "%CHGHDR10P%"=="YES" ( 486 | if "%ERRORLEVEL%"=="7" goto HDR10PlusEXT 487 | ) else ( 488 | if "%ERRORLEVEL%"=="6" goto HDR10PlusEXT 489 | ) 490 | if "%CHGHDR10P%"=="YES" ( 491 | if "%ERRORLEVEL%"=="6" ( 492 | if "%CM_VERSION%"=="V40" set "CM_VERSION=V29" 493 | if "%CM_VERSION%"=="V29" set "CM_VERSION=V40" 494 | ) 495 | ) 496 | if "%ERRORLEVEL%"=="5" ( 497 | if "%CHGHDR10P%"=="NO" set "CHGHDR10P=YES" 498 | if "%CHGHDR10P%"=="YES" set "CHGHDR10P=NO" 499 | ) 500 | if "%ERRORLEVEL%"=="4" ( 501 | if "%REMHDR10P%"=="YES" set "REMHDR10P=NO" 502 | if "%REMHDR10P%"=="NO" ( 503 | set "REMHDR10P=YES" 504 | set "BL=YES" 505 | ) 506 | ) 507 | if "%ERRORLEVEL%"=="3" ( 508 | if "%SKIPHDR10P%"=="NO" ( 509 | set "SKIPHDR10P=YES" 510 | set "SAVHDR10P=YES" 511 | ) 512 | if "%SKIPHDR10P%"=="YES" set "SKIPHDR10P=NO" 513 | ) 514 | if "%ERRORLEVEL%"=="2" ( 515 | if "%SAVHDR10P%"=="NO" set "SAVHDR10P=YES" 516 | if "%SAVHDR10P%"=="YES" ( 517 | set "SAVHDR10P=NO" 518 | set "SKIPHDR10P=NO" 519 | ) 520 | ) 521 | if "%ERRORLEVEL%"=="1" ( 522 | if "%BL%"=="NO" set "BL=YES" 523 | if "%BL%"=="YES" ( 524 | set "BL=NO" 525 | set "REMHDR10P=NO" 526 | ) 527 | ) 528 | goto START 529 | 530 | :HDR10PlusEXT 531 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 532 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 533 | cls 534 | %GREEN% 535 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 536 | echo. 537 | %WHITE% 538 | echo ==================================== 539 | %GREEN% 540 | echo Dolby Vision Tool DEMUXER 541 | %WHITE% 542 | echo ==================================== 543 | echo. 544 | echo. 545 | echo == SETTINGS ============================================================================================================ 546 | %CYAN% 547 | echo. 548 | echo SAVE BL : [%BL%] 549 | echo SAVE HDR10+ Metadata : [%SAVHDR10P%] 550 | echo Skip HDR10+ Validation : [%SKIPHDR10P%] 551 | echo Remove HDR10+ Metadata from BL : [%REMHDR10P%] 552 | echo Convert HDR10+ Metadata to DV : [%CHGHDR10P%] 553 | echo Content Mapping Version : [%CM_VERSION_text%] 554 | echo. 555 | 556 | call :SWITCHES 557 | if "%RAW_FILE%"=="FALSE" call :DEMUX 558 | if %BL%==YES call :DEMUX_BLEL 559 | if "%SAVHDR10P%%CHGHDR10P%"=="YESNO" call :SAVE_HDR10P 560 | if "%CHGHDR10P%"=="YES" call :CHG_HDR10P 561 | 562 | echo. 563 | goto :EXIT 564 | 565 | :DV8 566 | if "%HDR10P%"=="TRUE" goto DV8HDR10P 567 | echo == MENU ================================================================================================================ 568 | echo. 569 | echo 1. SAVE BL : [%BL%] 570 | echo 2. SAVE RPU : [%RPU%] 571 | echo 3. CONVERT RPU : [%CONVERT%] 572 | call :colortxt 0F "4. CROP RPU" & call :colortxt 0E "*" & call :colortxt 0F " : [%CROP%]" & call :colortxt 0E " *Whenever the final result doesn't have letterboxed bars set to [YES]." /n 573 | %WHITE% 574 | echo. 575 | echo S. START 576 | echo. 577 | %GREEN% 578 | echo Change Settings and press [S] to start Extracting^^! 579 | CHOICE /C 1234S /N /M "Select a Letter 1,2,3,4,[S]tart" 580 | 581 | if "%ERRORLEVEL%"=="5" goto DV8EXT 582 | if "%ERRORLEVEL%"=="4" ( 583 | if "%CROP%"=="YES" set "CROP=NO" 584 | if "%CROP%"=="NO" ( 585 | set "CROP=YES" 586 | set "RPU=YES" 587 | ) 588 | ) 589 | if "%ERRORLEVEL%"=="3" ( 590 | if "%CONVERT%"=="NO" set "CONVERT=PROFILE 7 MEL" 591 | if "%CONVERT%"=="PROFILE 7 MEL" set "CONVERT=PROFILE 8.1 HDR10" 592 | if "%CONVERT%"=="PROFILE 8.1 HDR10" set "CONVERT=PROFILE 8.4 HLG" 593 | if "%CONVERT%"=="PROFILE 8.4 HLG" set "CONVERT=NO" 594 | ) 595 | if "%ERRORLEVEL%"=="2" ( 596 | if "%RPU%"=="NO" set "RPU=YES" 597 | if "%RPU%"=="YES" ( 598 | set "RPU=NO" 599 | set "CROP=NO" 600 | ) 601 | ) 602 | if "%ERRORLEVEL%"=="1" ( 603 | if "%BL%"=="NO" set "BL=YES" 604 | if "%BL%"=="YES" set "BL=NO" 605 | ) 606 | goto START 607 | 608 | :DV8HDR10P 609 | echo == MENU ================================================================================================================ 610 | echo. 611 | echo 1. SAVE BL : [%BL%] 612 | echo 2. SAVE RPU : [%RPU%] 613 | echo 3. CONVERT RPU : [%CONVERT%] 614 | call :colortxt 0F "4. CROP RPU" & call :colortxt 0E "*" & call :colortxt 0F " : [%CROP%]" & call :colortxt 0E " *Whenever the final result doesn't have letterboxed bars set to [YES]." /n 615 | echo 5. Remove HDR10+ Metadata from BL : [%REMHDR10P%] 616 | echo 6. SAVE HDR10+ Metadata : [%SAVHDR10P%] 617 | %WHITE% 618 | echo. 619 | echo S. START 620 | echo. 621 | %GREEN% 622 | echo Change Settings and press [S] to start Extracting^^! 623 | CHOICE /C 123456S /N /M "Select a Letter 1,2,3,4,5,6,[S]tart" 624 | 625 | if "%ERRORLEVEL%"=="7" goto DV8EXT 626 | if "%ERRORLEVEL%"=="6" ( 627 | if "%SAVHDR10P%"=="NO" set "SAVHDR10P=YES" 628 | if "%SAVHDR10P%"=="YES" set "SAVHDR10P=NO" 629 | ) 630 | if "%ERRORLEVEL%"=="5" ( 631 | if "%REMHDR10P%"=="YES" set "REMHDR10P=NO" 632 | if "%REMHDR10P%"=="NO" ( 633 | set "REMHDR10P=YES" 634 | set "BL=YES" 635 | ) 636 | ) 637 | if "%ERRORLEVEL%"=="4" ( 638 | if "%CROP%"=="YES" set "CROP=NO" 639 | if "%CROP%"=="NO" ( 640 | set "CROP=YES" 641 | set "RPU=YES" 642 | ) 643 | ) 644 | if "%ERRORLEVEL%"=="3" ( 645 | if "%CONVERT%"=="NO" set "CONVERT=PROFILE 7 MEL" 646 | if "%CONVERT%"=="PROFILE 7 MEL" set "CONVERT=PROFILE 8.1 HDR10" 647 | if "%CONVERT%"=="PROFILE 8.1 HDR10" set "CONVERT=PROFILE 8.4 HLG" 648 | if "%CONVERT%"=="PROFILE 8.4 HLG" set "CONVERT=NO" 649 | ) 650 | if "%ERRORLEVEL%"=="2" ( 651 | if "%RPU%"=="NO" set "RPU=YES" 652 | if "%RPU%"=="YES" ( 653 | set "RPU=NO" 654 | set "CROP=NO" 655 | ) 656 | ) 657 | if "%ERRORLEVEL%"=="1" ( 658 | if "%BL%"=="NO" set "BL=YES" 659 | if "%BL%"=="YES" ( 660 | set "BL=NO" 661 | set "REMHDR10P=NO" 662 | ) 663 | ) 664 | goto START 665 | 666 | :DV8EXT 667 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 668 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 669 | cls 670 | %GREEN% 671 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 672 | echo. 673 | %WHITE% 674 | echo ==================================== 675 | %GREEN% 676 | echo Dolby Vision Tool DEMUXER 677 | %WHITE% 678 | echo ==================================== 679 | echo. 680 | echo. 681 | if "%HDR10P%"=="TRUE" ( 682 | echo == SETTINGS ============================================================================================================ 683 | %CYAN% 684 | echo. 685 | echo SAVE BL : [%BL%] 686 | echo CROP RPU : [%CROP%] 687 | echo CONVERT RPU : [%CONVERT%] 688 | echo Remove HDR10+ Metadata from BL : [%REMHDR10P%] 689 | echo SAVE HDR10+ Metadata : [%SAVHDR10P%] 690 | echo SAVE RPU : [%RPU%] 691 | %WHITE% 692 | ) else ( 693 | echo == SETTINGS ============================================================================================================ 694 | %CYAN% 695 | echo. 696 | echo SAVE BL : [%BL%] 697 | echo CROP RPU : [%CROP%] 698 | echo CONVERT RPU : [%CONVERT%] 699 | echo SAVE RPU : [%RPU%] 700 | %WHITE% 701 | ) 702 | echo. 703 | 704 | call :SWITCHES 705 | if "%RAW_FILE%"=="FALSE" call :DEMUX 706 | if "%HDR10P%%SAVHDR10P%"=="TRUEYES" call :SAVE_HDR10P 707 | if "%BL%"=="YES" call :DEMUX_BLEL 708 | if "%RPU%"=="YES" call :RPU_DEMUX 709 | 710 | goto :EXIT 711 | 712 | :DV7 713 | if "!ELFILE!"=="TRUE" ( 714 | set "BL=NO" 715 | set "EL=NO" 716 | ) 717 | if "%HDR10P%"=="TRUE" goto DV7HDR10P 718 | echo == MENU ================================================================================================================ 719 | echo. 720 | if "!ELFILE!"=="FALSE" call :colortxt 0F "1. SAVE BL" & call :colortxt 0E "*" & call :colortxt 0F " : [%BL%]" & call :colortxt 0E " *For creating a Dual layer Profile 7 Disc set to [YES]." /n 721 | if "!ELFILE!"=="FALSE" call :colortxt 0F "2. SAVE EL" & call :colortxt 0E "*" & call :colortxt 0F " : [%EL%]" & call :colortxt 0E " *For creating a Dual layer Profile 7 Disc set to [YES]." /n 722 | echo 3. SAVE RPU : [%RPU%] 723 | echo 4. CONVERT RPU : [%CONVERT%] 724 | call :colortxt 0F "5. CROP RPU" & call :colortxt 0E "*" & call :colortxt 0F " : [%CROP%]" & call :colortxt 0E " *Whenever the final result doesn't have letterboxed bars set to [YES]." /n 725 | echo. 726 | echo S. START 727 | echo. 728 | %GREEN% 729 | echo Change Settings and press [S] to start Extracting^^! 730 | CHOICE /C 12345S /N /M "Select a Letter 1,2,3,4,5,[S]tart" 731 | if "%ERRORLEVEL%"=="6" goto DV7EXT 732 | if "%ERRORLEVEL%"=="5" ( 733 | if "%CROP%"=="YES" set "CROP=NO" 734 | if "%CROP%"=="NO" ( 735 | set "CROP=YES" 736 | set "RPU=YES" 737 | ) 738 | ) 739 | if "%ERRORLEVEL%"=="4" ( 740 | if "%CONVERT%"=="NO" set "CONVERT=PROFILE 8.1 HDR10" 741 | if "%CONVERT%"=="PROFILE 8.1 HDR10" set "CONVERT=PROFILE 8.4 HLG" 742 | if "%CONVERT%"=="PROFILE 8.4 HLG" set "CONVERT=NO" 743 | ) 744 | if "%ERRORLEVEL%"=="3" ( 745 | if "%RPU%"=="NO" ( 746 | set "RPU=YES" 747 | set "CONVERT=PROFILE 8.1 HDR10" 748 | ) 749 | if "%RPU%"=="YES" ( 750 | set "RPU=NO" 751 | set "CROP=NO" 752 | set "CONVERT=NO" 753 | ) 754 | ) 755 | if "%ERRORLEVEL%"=="2" ( 756 | if "%EL%"=="NO" set "EL=YES" & set "RPU=NO" & set "CONVERT=NO" 757 | if "%EL%"=="YES" set "EL=NO" & set "RPU=YES" & set "CONVERT=PROFILE 8.1 HDR10" 758 | ) 759 | if "%ERRORLEVEL%"=="1" ( 760 | if "%BL%"=="NO" set "BL=YES" 761 | if "%BL%"=="YES" set "BL=NO" 762 | ) 763 | goto START 764 | 765 | :DV7HDR10P 766 | if "!ELFILE!"=="TRUE" ( 767 | set "BL=NO" 768 | set "EL=NO" 769 | ) 770 | echo == MENU ================================================================================================================ 771 | echo. 772 | if "!ELFILE!"=="FALSE" call :colortxt 0F "1. SAVE BL" & call :colortxt 0E "*" & call :colortxt 0F " : [%BL%]" & call :colortxt 0E " *For creating a Dual layer Profile 7 Disc set to [YES]." /n 773 | echo 2. Remove HDR10+ Metadata from BL : [%REMHDR10P%] 774 | echo 3. SAVE HDR10+ Metadata : [%SAVHDR10P%] 775 | echo 4. Skip HDR10+ Validation : [%SKIPHDR10P%] 776 | if "!ELFILE!"=="FALSE" call :colortxt 0F "5. SAVE EL" & call :colortxt 0E "*" & call :colortxt 0F " : [%EL%]" & call :colortxt 0E " *For creating a Dual layer Profile 7 Disc set to [YES]." /n 777 | echo 6. SAVE RPU : [%RPU%] 778 | echo 7. CONVERT RPU : [%CONVERT%] 779 | call :colortxt 0F "8. CROP RPU" & call :colortxt 0E "*" & call :colortxt 0F " : [%CROP%]" & call :colortxt 0E " *Whenever the final result doesn't have letterboxed bars set to [YES]." /n 780 | echo. 781 | echo S. START 782 | echo. 783 | %GREEN% 784 | echo Change Settings and press [S] to start Extracting^^! 785 | CHOICE /C 12345678S /N /M "Select a Letter 1,2,3,4,5,6,7,8,[S]tart" 786 | 787 | if "%ERRORLEVEL%"=="9" goto DV7EXT 788 | if "%ERRORLEVEL%"=="8" ( 789 | if "%CROP%"=="YES" set "CROP=NO" 790 | if "%CROP%"=="NO" ( 791 | set "CROP=YES" 792 | set "RPU=YES" 793 | ) 794 | ) 795 | if "%ERRORLEVEL%"=="7" ( 796 | if "%CONVERT%"=="NO" set "CONVERT=PROFILE 8.1 HDR10" 797 | if "%CONVERT%"=="PROFILE 8.1 HDR10" set "CONVERT=PROFILE 8.4 HLG" 798 | if "%CONVERT%"=="PROFILE 8.4 HLG" set "CONVERT=NO" 799 | ) 800 | if "%ERRORLEVEL%"=="6" ( 801 | if "%RPU%"=="NO" ( 802 | set "RPU=YES" 803 | set "CONVERT=PROFILE 8.1 HDR10" 804 | ) 805 | if "%RPU%"=="YES" ( 806 | set "RPU=NO" 807 | set "CROP=NO" 808 | set "CONVERT=NO" 809 | ) 810 | ) 811 | if "%ERRORLEVEL%"=="5" ( 812 | if "%EL%"=="NO" set "EL=YES" & set "RPU=NO" & set "CONVERT=NO" 813 | if "%EL%"=="YES" set "EL=NO" & set "RPU=YES" & set "CONVERT=PROFILE 8.1 HDR10" 814 | ) 815 | if "%ERRORLEVEL%"=="4" ( 816 | if "%SKIPHDR10P%"=="NO" ( 817 | set "SKIPHDR10P=YES" 818 | set "SAVHDR10P=YES" 819 | ) 820 | if "%SKIPHDR10P%"=="YES" set "SKIPHDR10P=NO" 821 | ) 822 | if "%ERRORLEVEL%"=="3" ( 823 | if "%SAVHDR10P%"=="NO" set "SAVHDR10P=YES" 824 | if "%SAVHDR10P%"=="YES" ( 825 | set "SAVHDR10P=NO" 826 | set "SKIPHDR10P=NO" 827 | ) 828 | ) 829 | if "%ERRORLEVEL%"=="2" ( 830 | if "%REMHDR10P%"=="YES" set "REMHDR10P=NO" 831 | if "%REMHDR10P%"=="NO" ( 832 | set "REMHDR10P=YES" 833 | set "BL=YES" 834 | ) 835 | ) 836 | if "%ERRORLEVEL%"=="1" ( 837 | if "%BL%"=="NO" set "BL=YES" 838 | if "%BL%"=="YES" ( 839 | set "BL=NO" 840 | set "REMHDR10P=NO" 841 | ) 842 | ) 843 | goto START 844 | 845 | :DV7EXT 846 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 847 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 848 | cls 849 | %GREEN% 850 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 851 | echo. 852 | %WHITE% 853 | echo ==================================== 854 | %GREEN% 855 | echo Dolby Vision Tool DEMUXER 856 | %WHITE% 857 | echo ==================================== 858 | echo. 859 | echo. 860 | if "%HDR10P%"=="TRUE" ( 861 | echo == SETTINGS ============================================================================================================ 862 | %CYAN% 863 | echo. 864 | if "!ELFILE!"=="FALSE" echo SAVE BL : [%BL%] 865 | echo Remove HDR10+ Metadata from BL : [%REMHDR10P%] 866 | echo SAVE HDR10+ Metadata : [%SAVHDR10P%] 867 | echo Skip HDR10+ Validation : [%SKIPHDR10P%] 868 | if "!ELFILE!"=="FALSE" echo SAVE EL : [%EL%] 869 | echo SAVE RPU : [%RPU%] 870 | echo CONVERT RPU : [%CONVERT%] 871 | echo CROP RPU : [%CROP%] 872 | %WHITE% 873 | ) else ( 874 | echo == SETTINGS ============================================================================================================ 875 | %CYAN% 876 | echo. 877 | if "!ELFILE!"=="FALSE" echo SAVE BL : [%BL%] 878 | if "!ELFILE!"=="FALSE" echo SAVE EL : [%EL%] 879 | echo SAVE RPU : [%RPU%] 880 | echo CONVERT RPU : [%CONVERT%] 881 | echo CROP RPU : [%CROP%] 882 | %WHITE% 883 | ) 884 | echo. 885 | 886 | call :SWITCHES 887 | if "%RAW_FILE%"=="FALSE" call :DEMUX 888 | if "%RAW_FILE%!VIDEO_COUNT!"=="TRUE2" call :DEMUX 889 | if "%HDR10P%%SAVHDR10P%"=="TRUEYES" call :SAVE_HDR10P 890 | if "%BL%%EL%" NEQ "NONO" call :DEMUX_BLEL 891 | if "%RPU%"=="YES" call :RPU_DEMUX 892 | 893 | goto :EXIT 894 | 895 | :DV5 896 | echo == MENU ================================================================================================================ 897 | echo. 898 | echo 1. CONVERT RPU : [%CONVERT%] 899 | call :colortxt 0F "2. CROP RPU" & call :colortxt 0E "*" & call :colortxt 0F " : [%CROP%]" & call :colortxt 0E " *Whenever the final result doesn't have letterboxed bars set to [YES]." /n 900 | echo. 901 | echo S. START 902 | echo. 903 | %GREEN% 904 | echo Change Settings and press [S] to start Extracting^^! 905 | CHOICE /C 12S /N /M "Select a Letter 1,2,[S]tart" 906 | 907 | if "%ERRORLEVEL%"=="3" goto DV5EXT 908 | if "%ERRORLEVEL%"=="2" ( 909 | if "%CROP%"=="NO" set "CROP=YES" 910 | if "%CROP%"=="YES" set "CROP=NO" 911 | ) 912 | if "%ERRORLEVEL%"=="1" ( 913 | if "%CONVERT%"=="NO" set "CONVERT=PROFILE 8.1 HDR10" 914 | if "%CONVERT%"=="PROFILE 8.1 HDR10" set "CONVERT=PROFILE 8.4 HLG" 915 | if "%CONVERT%"=="PROFILE 8.4 HLG" set "CONVERT=NO" 916 | ) 917 | goto START 918 | 919 | :DV5EXT 920 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 921 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 922 | cls 923 | %GREEN% 924 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 925 | echo. 926 | %WHITE% 927 | echo ==================================== 928 | %GREEN% 929 | echo Dolby Vision Tool DEMUXER 930 | %WHITE% 931 | echo ==================================== 932 | echo. 933 | echo. 934 | echo == SETTINGS ============================================================================================================ 935 | %CYAN% 936 | echo. 937 | echo CONVERT RPU : [%CONVERT%] 938 | echo CROP RPU : [%CROP%] 939 | echo. 940 | 941 | call :SWITCHES 942 | if "%RAW_FILE%"=="FALSE" call :DEMUX 943 | call :RPU_DEMUX 944 | 945 | goto :EXIT 946 | 947 | :SWITCHES 948 | if "!REMHDR10P!"=="YES" set "REMHDR10PString= --drop-hdr10plus" 949 | if "!SKIPHDR10P!"=="YES" set "SKIPHDR10PString= --skip-validation" 950 | if "!CONVERT!"=="NO" set "CONVERTSTRING=" 951 | if "!CONVERT!"=="PROFILE 8.1 HDR10" set "CONVERTSTRING=-m 2" 952 | if "!DVprofile!!CONVERT!"=="5PROFILE 8.1 HDR10" set "CONVERTSTRING=-m 3" 953 | if "!CONVERT!"=="PROFILE 8.4 HLG" set "CONVERTSTRING=-m 4" 954 | if "!BL!"=="NO" set "EXTSTRING=--el-only" 955 | if "!CROP!"=="YES" set "CROPSTRING=-c" 956 | goto :eof 957 | 958 | :DEMUX 959 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 960 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 961 | %WHITE% 962 | echo == DEMUXING ============================================================================================================ 963 | echo. 964 | %YELLOW% 965 | echo ATTENTION^^! You need a lot of HDD Space for this operation. 966 | PUSHD "!TMP_FOLDER!" 967 | if "!VIDEO_COUNT!"=="1" ( 968 | if "!DVProfile!"=="7" ( 969 | if "%BL%%REMHDR10P%%SAVHDR10P%"=="NONONO" ( 970 | %CYAN% 971 | echo. 972 | echo Please wait. Demuxing EL... 973 | %WHITE% 974 | "!FFMPEGpath!" -loglevel panic -stats -y -i "!INPUTFILE!" -c:v copy -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" demux !EXTSTRING! - 975 | if exist "!TMP_FOLDER!\EL.hevc" ( 976 | set "ELSTREAM=!TMP_FOLDER!\EL.hevc" 977 | %GREEN% 978 | echo EL Done. 979 | ) else ( 980 | %RED% 981 | echo EL Error. 982 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 983 | ) 984 | ) else ( 985 | %CYAN% 986 | echo. 987 | echo Please wait. Demuxing BL and EL... 988 | %WHITE% 989 | "!FFMPEGpath!" -loglevel panic -stats -y -i "!INPUTFILE!" -c:v copy -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\temp.hevc" 990 | if exist "!TMP_FOLDER!\temp.hevc" ( 991 | set "BLSTREAM=!TMP_FOLDER!\temp.hevc" 992 | set "ELSTREAM=!TMP_FOLDER!\temp.hevc" 993 | %GREEN% 994 | echo Done. 995 | ) else ( 996 | %RED% 997 | echo Error. 998 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 999 | ) 1000 | ) 1001 | ) else ( 1002 | %CYAN% 1003 | echo. 1004 | echo Please wait. Demuxing BL... 1005 | %WHITE% 1006 | "!FFMPEGpath!" -loglevel panic -stats -y -i "!INPUTFILE!" -c:v copy -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\temp.hevc" 1007 | if exist "!TMP_FOLDER!\temp.hevc" ( 1008 | set "BLSTREAM=!TMP_FOLDER!\temp.hevc" 1009 | set "ELSTREAM=!TMP_FOLDER!\temp.hevc" 1010 | %GREEN% 1011 | echo Done. 1012 | ) else ( 1013 | %RED% 1014 | echo Error. 1015 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1016 | ) 1017 | ) 1018 | ) else ( 1019 | if "%BL%%REMHDR10P%%SAVHDR10P%" NEQ "NONONO" ( 1020 | %CYAN% 1021 | echo. 1022 | echo Please wait. Demuxing BL... 1023 | %WHITE% 1024 | "!FFMPEGpath!" -loglevel panic -stats -y -i "!INPUTFILE!" -map 0:0 -c:v copy -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\BL.hevc" 1025 | if exist "!TMP_FOLDER!\BL.hevc" ( 1026 | if "%BL%"=="NO" del "!TMP_FOLDER!\BL.hevc">nul 1027 | if exist "!TMP_FOLDER!\BL.hevc" ( 1028 | set "BLSTREAM=!TMP_FOLDER!\BL.hevc" 1029 | %GREEN% 1030 | echo BL Done. 1031 | ) else ( 1032 | %RED% 1033 | echo BL Error. 1034 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1035 | ) 1036 | ) 1037 | ) 1038 | if "%EL%%RPU%" NEQ "NONO" ( 1039 | %CYAN% 1040 | echo. 1041 | echo Please wait. Demuxing EL... 1042 | %WHITE% 1043 | "!FFMPEGpath!" -loglevel panic -stats -y -i "!INPUTFILE!" !DT! -c:v copy -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\EL.hevc" 1044 | if exist "!TMP_FOLDER!\EL.hevc" ( 1045 | set "ELSTREAM=!TMP_FOLDER!\EL.hevc" 1046 | %GREEN% 1047 | echo EL Done. 1048 | ) else ( 1049 | %RED% 1050 | echo EL Error. 1051 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1052 | ) 1053 | ) 1054 | ) 1055 | 1056 | echo. 1057 | POPD 1058 | goto :eof 1059 | 1060 | :DEMUX_BLEL 1061 | %CYAN% 1062 | if "%BL%%EL%%REMHDR10P%"=="YESNOYES" echo Please wait. Processing BL without HDR10+ Metadata... 1063 | if "%BL%%EL%%REMHDR10P%"=="YESYESYES" echo Please wait. Processing BL without HDR10+ Metadata and EL... 1064 | if "%BL%%EL%%REMHDR10P%"=="YESNONO" echo Please wait. Processing BL... 1065 | if "%BL%%EL%%REMHDR10P%"=="YESYESNO" echo Please wait. Processing BL and EL... 1066 | if "%BL%%EL%"=="NOYES" echo Please wait. Processing EL... 1067 | if "%REMHDR10P%"=="NO" ( 1068 | set "NAMESTRING=BL" 1069 | ) else ( 1070 | set "NAMESTRING=BL no HDR10+" 1071 | ) 1072 | 1073 | PUSHD "!TARGET_FOLDER!" 1074 | 1075 | if "%BL%"=="YES" ( 1076 | if exist "!TMP_FOLDER!\BL.hevc" ( 1077 | if "%REMHDR10P%"=="YES" ( 1078 | "!HDR10P_TOOLpath!" remove "!TMP_FOLDER!\BL.hevc" -o "!TARGET_FOLDER!\!INPUTFILENAME!_[!NAMESTRING!].hevc" 1079 | ) else ( 1080 | copy "!TMP_FOLDER!\BL.hevc" "!TARGET_FOLDER!\!INPUTFILENAME!_[!NAMESTRING!].hevc">nul 1081 | ) 1082 | ) else ( 1083 | if exist "!TMP_FOLDER!\temp.hevc" ( 1084 | "!DO_VI_TOOLpath!"%REMHDR10PString% demux !EXTSTRING! "!TMP_FOLDER!\temp.hevc" 1085 | ren "!TARGET_FOLDER!\BL.hevc" "!INPUTFILENAME!_[!NAMESTRING!].hevc">nul 1086 | ) 1087 | ) 1088 | if exist "%TARGET_FOLDER%\!INPUTFILENAME!_[!NAMESTRING!].hevc" ( 1089 | %GREEN% 1090 | echo BL Done. 1091 | ) else ( 1092 | %RED% 1093 | echo BL Error. 1094 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1095 | ) 1096 | ) 1097 | 1098 | if "%EL%"=="YES" ( 1099 | if exist "!TMP_FOLDER!\EL.hevc" ( 1100 | copy "!TMP_FOLDER!\EL.hevc" "!TARGET_FOLDER!\!INPUTFILENAME!_[EL].hevc">nul 1101 | ) else ( 1102 | if exist "!TMP_FOLDER!\temp.hevc" ( 1103 | "!DO_VI_TOOLpath!" demux !EXTSTRING! "!TMP_FOLDER!\temp.hevc" 1104 | ren "!TARGET_FOLDER!\EL.hevc" "!INPUTFILENAME!_[EL].hevc" 1105 | ) 1106 | ) 1107 | if exist "%TARGET_FOLDER%\!INPUTFILENAME!_[EL].hevc" ( 1108 | %GREEN% 1109 | echo EL Done. 1110 | ) else ( 1111 | %RED% 1112 | echo EL Error. 1113 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1114 | ) 1115 | ) 1116 | if exist "!TARGET_FOLDER!\BL.hevc" del "!TARGET_FOLDER!\BL.hevc">nul 1117 | if exist "!TARGET_FOLDER!\EL.hevc" del "!TARGET_FOLDER!\EL.hevc">nul 1118 | echo. 1119 | POPD 1120 | 1121 | goto :eof 1122 | 1123 | :RPU_DEMUX 1124 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 1125 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 1126 | if "%CONVERT%"=="NO" set "CSTRING=_P!DVProfile!" 1127 | if "%CONVERT%"=="PROFILE 8.1 HDR10" set "CSTRING=_CONVERTED-P8.1" 1128 | if "%CONVERT%"=="PROFILE 8.4 HLG" set "CSTRING=_CONVERTED-P8.4" 1129 | if "%CONVERT%"=="PROFILE 7 MEL" set "CSTRING=_CONVERTED-P7MEL" 1130 | if "!ELSTREAM!"=="" ( 1131 | set "ELSTREAM=!INPUTFILE!" 1132 | %WHITE% 1133 | echo == DEMUXING ============================================================================================================ 1134 | echo. 1135 | ) 1136 | %CYAN% 1137 | echo Please wait. Demuxing DV Reference Processing Unit... 1138 | %WHITE% 1139 | "!DO_VI_TOOLpath!" %CROPSTRING% %CONVERTSTRING% extract-rpu "!ELSTREAM!" -o "!TARGET_FOLDER!\!INPUTFILENAME!_[RPU!CSTRING!].bin" 1140 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!_[RPU!CSTRING!].bin" ( 1141 | %GREEN% 1142 | echo Done. 1143 | echo. 1144 | ) else ( 1145 | %RED% 1146 | echo Error. 1147 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1148 | echo. 1149 | ) 1150 | goto :eof 1151 | 1152 | :RPU_EXTRACT 1153 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 1154 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 1155 | set "HEADERNAME=_[P!RPUProfile!]" 1156 | %CYAN% 1157 | echo Please wait. Extracting DV Reference Processing Unit... 1158 | %WHITE% 1159 | "!DOVI_METApath!" convert "!RPU!" "!TARGET_FOLDER!\!INPUTFILENAME!!HEADERNAME!.xml" 1160 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!!HEADERNAME!.xml" ( 1161 | %GREEN% 1162 | echo XML Done. 1163 | ) else ( 1164 | %RED% 1165 | echo XML Error. 1166 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1167 | ) 1168 | echo. 1169 | %WHITE% 1170 | "!DO_VI_TOOLpath!" export -i "!RPU!" -d all="!TMP_FOLDER!\info.json" 1171 | "!jqpath!" . "!TMP_FOLDER!\info.json">"!TARGET_FOLDER!\!INPUTFILENAME!!HEADERNAME!.json" 1172 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!!HEADERNAME!.json" ( 1173 | %GREEN% 1174 | echo JSON Done. 1175 | echo. 1176 | ) else ( 1177 | %RED% 1178 | echo JSON Error. 1179 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1180 | echo. 1181 | ) 1182 | goto :eof 1183 | 1184 | :CHG_HDR10P 1185 | %CYAN% 1186 | echo Please wait. Extracting HDR10+ SEI... 1187 | %WHITE% 1188 | "!HDR10P_TOOLpath!"%SKIPHDR10PString% extract "!BLSTREAM!" -o "!TMP_FOLDER!\HDR10Plus.json" 1189 | if exist "!TMP_FOLDER!\HDR10Plus.json" ( 1190 | if "%SAVHDR10P%"=="YES" copy "!TMP_FOLDER!\HDR10Plus.json" "!TARGET_FOLDER!\!INPUTFILENAME!_[HDR10+].json">nul 1191 | %GREEN% 1192 | echo Done. 1193 | echo. 1194 | ) else ( 1195 | %RED% 1196 | echo Error. 1197 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1198 | echo. 1199 | ) 1200 | %CYAN% 1201 | echo Please wait. Prefetching HDR10+ Metadata... 1202 | ( 1203 | echo { 1204 | echo "cm_version": "!CM_VERSION!", 1205 | echo "length": !FRAMES!, 1206 | echo "level6": { 1207 | echo "max_display_mastering_luminance": !MaxDML!, 1208 | echo "min_display_mastering_luminance": !MinDML!, 1209 | echo "max_content_light_level": !MaxCLL!, 1210 | echo "max_frame_average_light_level": !MaxFall! 1211 | echo } 1212 | echo } 1213 | )>"!TMP_FOLDER!\Extra.json" 1214 | if exist "!TMP_FOLDER!\Extra.json" ( 1215 | %GREEN% 1216 | echo Done. 1217 | echo. 1218 | ) else ( 1219 | %RED% 1220 | echo Error. 1221 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1222 | echo. 1223 | ) 1224 | %CYAN% 1225 | echo Please wait. Generate RPU.bin... 1226 | %WHITE% 1227 | "!DO_VI_TOOLpath!" generate -j "!TMP_FOLDER!\Extra.json" --hdr10plus-json "!TMP_FOLDER!\HDR10Plus.json" -o "!TARGET_FOLDER!\!INPUTFILENAME!_[HDR10+ RPU].bin" 1228 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!_[HDR10+ RPU].bin" ( 1229 | %GREEN% 1230 | echo Done. 1231 | echo. 1232 | ) else ( 1233 | %RED% 1234 | echo Error during RPU.bin creating. 1235 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1236 | echo. 1237 | ) 1238 | goto :eof 1239 | 1240 | :SAVE_HDR10P 1241 | if not exist "!TARGET_FOLDER!\!INPUTFILENAME!_[HDR10+].json" ( 1242 | %CYAN% 1243 | echo Please wait. Extracting HDR10+ SEI... 1244 | %WHITE% 1245 | "!HDR10P_TOOLpath!"%SKIPHDR10PString% extract "!BLSTREAM!" -o "!TARGET_FOLDER!\!INPUTFILENAME!_[HDR10+].json" 1246 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!_[HDR10+].json" ( 1247 | %GREEN% 1248 | echo Done. 1249 | echo. 1250 | ) else ( 1251 | %RED% 1252 | echo Error. 1253 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1254 | echo. 1255 | ) 1256 | ) 1257 | goto :eof 1258 | 1259 | :EXIT 1260 | %WHITE% 1261 | echo == CLEANING ============================================================================================================ 1262 | echo. 1263 | %CYAN% 1264 | echo Please wait. Cleaning Temp Folder... 1265 | if exist "!TARGET_FOLDER!\EL.hevc" if "%EL%"=="NO" ( 1266 | del "!TARGET_FOLDER!\EL.hevc">nul 1267 | if "%ERRORLEVEL%"=="0" ( 1268 | %GREEN% 1269 | echo Deleting EL.hevc - Done. 1270 | ) else ( 1271 | %RED% 1272 | echo Deleting EL.hevc - Error. 1273 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1274 | ) 1275 | ) 1276 | if exist "!TMP_FOLDER!" ( 1277 | RD /S /Q "!TMP_FOLDER!">nul 1278 | if "%ERRORLEVEL%"=="0" ( 1279 | %GREEN% 1280 | echo Deleting Temp Folder - Done. 1281 | ) else ( 1282 | %RED% 1283 | echo Deleting Temp Folder - Error. 1284 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 1285 | ) 1286 | ) 1287 | %WHITE% 1288 | setlocal DisableDelayedExpansion 1289 | %WHITE% 1290 | echo. 1291 | echo == EXIT ================================================================================================================ 1292 | echo. 1293 | if "%ERRORCOUNT%"=="0" ( 1294 | %GREEN% 1295 | echo All Operations successful. 1296 | %WHITE% 1297 | TIMEOUT 30 1298 | ) else ( 1299 | %RED% 1300 | echo SOME Operations failed. 1301 | %WHITE% 1302 | TIMEOUT 30 1303 | goto :ERROR 1304 | ) 1305 | exit 1306 | 1307 | :CORRUPTFILE 1308 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 1309 | START /B https://mega.nz/folder/x9FHlbbK#YQz_XsqcAXfZP2ciLeyyDg 1310 | set "NewLine=[System.Environment]::NewLine" 1311 | set "Line1=""%MISSINGFILE%"""" 1312 | set "Line2=Copy the file to the directory or download and extract DDVT_tools.rar" 1313 | setlocal DisableDelayedExpansion 1314 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('NEEDED FILE NOT FOUND!' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT Demuxer [QfG] v%VERSION%', 'Ok','Error')" 1315 | exit 1316 | 1317 | :FALSEINPUT 1318 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 1319 | set "NewLine=[System.Environment]::NewLine" 1320 | set "Line1=Unsupported Input File. Supported Files are:" 1321 | set "Line2=*.mkv | *.mp4 | *.m2ts | *.h265 | *.hevc | *.bin" 1322 | setlocal DisableDelayedExpansion 1323 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%INPUTFILENAME%%INPUTFILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT Demuxer [QfG] v%VERSION%', 'Ok','Info')" 1324 | exit 1325 | 1326 | :ERROR 1327 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 1328 | set "NewLine=[System.Environment]::NewLine" 1329 | set "Line1=%ERRORCOUNT% Error(s) during processing^! 1330 | set "Line2=Target file don''t exist or corrupt. 1331 | setlocal DisableDelayedExpansion 1332 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%INPUTFILENAME%%INPUTFILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT Demuxer [QfG] v%VERSION%', 'Ok','Error')" 1333 | exit 1334 | :CreatePassword 1335 | set TempVar=%PasswordChars% 1336 | set /a PWCharCount=0 1337 | 1338 | :CountLoop 1339 | set TempVar=%TempVar:~1% 1340 | set /a PWCharCount+=1 1341 | if not "%TempVar%"=="" goto CountLoop 1342 | set TempVar= 1343 | set Length=0 1344 | 1345 | :GenerateLoop 1346 | set /a i=%Random% %% PWCharCount 1347 | set /a Length+=1 1348 | set TempVar=%TempVar%!PasswordChars:~%i%,1! 1349 | if not "%Length%"=="%PasswordLength%" goto GenerateLoop 1350 | set %1=%TempVar% 1351 | goto :eof 1352 | 1353 | :colortxt 1354 | setlocal enableDelayedExpansion 1355 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1356 | 1357 | :colorPrint Color Str [/n] 1358 | setlocal 1359 | set "s=%~2" 1360 | call :colorPrintVar %1 s %3 1361 | exit /b 1362 | 1363 | :colorPrintVar Color StrVar [/n] 1364 | if not defined DEL call :initColorPrint 1365 | setlocal enableDelayedExpansion 1366 | pushd . 1367 | ': 1368 | cd \ 1369 | set "s=!%~2!" 1370 | :: The single blank line within the following IN() clause is critical - DO NOT REMOVE 1371 | for %%n in (^"^ 1372 | 1373 | ^") do ( 1374 | set "s=!s:\=%%~n\%%~n!" 1375 | set "s=!s:/=%%~n/%%~n!" 1376 | set "s=!s::=%%~n:%%~n!" 1377 | ) 1378 | for /f delims^=^ eol^= %%s in ("!s!") do ( 1379 | if "!" equ "" setlocal disableDelayedExpansion 1380 | if %%s==\ ( 1381 | findstr /a:%~1 "." "\'" nul 1382 | colorPrint.txt (echo %%s\..\') 1388 | findstr /a:%~1 /f:colorPrint.txt "." 1389 | "%temp%\'" set /p "=." 1400 | subst ': "%temp%" >nul 1401 | exit /b 1402 | 1403 | 1404 | :cleanupColorPrint 1405 | 2>nul del "%temp%\'" 1406 | 2>nul del "%temp%\colorPrint.txt" 1407 | >nul subst ': /d 1408 | exit /b -------------------------------------------------------------------------------- /DDVT_MEDIAINFO.cmd: -------------------------------------------------------------------------------- 1 | ::written by DonaldFaQ, THX to Jamal for the great idea! 2 | @echo off & setlocal 3 | FOR /F "tokens=2 delims==" %%A IN ('findstr /C:"VERSION=" "%~dp0DDVT_OPTIONS.cmd"') DO set "VERSION=%%A" 4 | TITLE DDVT MediaInfo [QfG] v%VERSION% 5 | set "TOOLTYPE=TEXT" 6 | if /i "%~2"=="-MSGBOX" set "TOOLTYPE=MSGBOX" 7 | if "%TOOLTYPE%"=="TEXT" ( 8 | mode con cols=125 lines=30 9 | ) else ( 10 | mode con cols=122 lines=15 11 | ) 12 | 13 | set PasswordChars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 14 | set PasswordLength=5 15 | call :CreatePassword Password 16 | 17 | cls 18 | 19 | set "sfkpath=%~dp0tools\sfk.exe" rem Path to sfk.exe 20 | set "FFMPEGpath=%~dp0tools\ffmpeg.exe" rem Path to ffmpeg.exe 21 | set "FFPROBEpath=%~dp0tools\ffprobe.exe" rem Path to ffprobe.exe 22 | set "MEDIAINFOpath=%~dp0tools\mediainfo.exe" rem Path to mediainfo.exe 23 | set "DO_VI_TOOLpath=%~dp0tools\dovi_tool.exe" rem Path to dovi_tool.exe 24 | set "LOGFILEpath=%~1_DDVT_MediaInfo.txt" rem Path where your logfile will be saved 25 | 26 | rem --- Hardcoded settings. Cannot be changed --- 27 | set "LOGFILE=YES" 28 | set "RAWFILE=TRUE" 29 | set "EL_INPUT=FALSE" 30 | set "RPU_EXIST=FALSE" 31 | set "RPU_STRING=" 32 | set "TMP_FOLDER=SAME AS SOURCE" 33 | set "MKVTOOLNIX_FOLDER=INCLUDED" 34 | set "LAYERTYPE=SL" 35 | set "Format=HEVC" 36 | set "DVinput=NO" 37 | set "DVBIN=NO" 38 | set "DVP7=NO" 39 | set "RPU=" 40 | 41 | setlocal EnableDelayedExpansion 42 | set "WAIT="!sfkpath!" sleep" 43 | set "GREEN="!sfkpath!" color green" 44 | set "RED="!sfkpath!" color red" 45 | set "YELLOW="!sfkpath!" color yellow" 46 | set "WHITE="!sfkpath!" color white" 47 | set "CYAN="!sfkpath!" color cyan" 48 | set "MAGENTA="!sfkpath!" color magenta" 49 | set "GREY="!sfkpath!" color grey" 50 | 51 | ::Check for INI and Load Settings 52 | if exist "%~dp0DDVT_OPTIONS.ini" ( 53 | FOR /F "delims=" %%A IN ('findstr /C:"TEMP Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 54 | set "TMP_FOLDER=%%A" 55 | set "TMP_FOLDER=!TMP_FOLDER:~12!" 56 | ) 57 | FOR /F "delims=" %%A IN ('findstr /C:"MKVTOOLNIX Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 58 | set "MKVTOOLNIX_FOLDER=%%A" 59 | set "MKVTOOLNIX_FOLDER=!MKVTOOLNIX_FOLDER:~18!" 60 | ) 61 | FOR /F "delims=" %%A IN ('findstr /C:"MEDIAINFO_LOGFILE=" "%~dp0DDVT_OPTIONS.ini"') DO ( 62 | set "LOGFILE=%%A" 63 | set "LOGFILE=!LOGFILE:~18!" 64 | ) 65 | ) 66 | 67 | if "%TMP_FOLDER%"=="SAME AS SOURCE" ( 68 | set "TMP_FOLDER=%tmp%\DDVT_%Password%_TMP" 69 | ) else ( 70 | set "TMP_FOLDER=!TMP_FOLDER!\DDVT_%Password%_TMP" 71 | ) 72 | if "!MKVTOOLNIX_FOLDER!"=="INCLUDED" set "MKVTOOLNIX_FOLDER=%~dp0tools" 73 | set "MKVMERGEpath=!MKVTOOLNIX_FOLDER!\mkvmerge.exe" 74 | 75 | if not exist "%sfkpath%" set "MISSINGFILE=%sfkpath%" & goto :CORRUPTFILE 76 | if not exist "%FFMPEGpath%" set "MISSINGFILE=%FFMPEGpath%" & goto :CORRUPTFILE 77 | if not exist "%FFPROBEpath%" set "MISSINGFILE=%FFPROBEpath%" & goto :CORRUPTFILE 78 | if not exist "%MEDIAINFOpath%" set "MISSINGFILE=%MEDIAINFOpath%" & goto :CORRUPTFILE 79 | if not exist "%DO_VI_TOOLpath%" set "MISSINGFILE=%DO_VI_TOOLpath%" & goto :CORRUPTFILE 80 | if not exist "%MKVMERGEpath%" set "MISSINGFILE=%MKVMERGEpath%" & goto :CORRUPTFILE 81 | 82 | ::PREPARE FOR OPTIONS 83 | set "FILE=%~dpnx1" 84 | set "FILEPATH=%~dp1" 85 | set "FILENAME=%~n1" 86 | set "FILEEXT=%~x1" 87 | 88 | ::CHECK FILETYPE 89 | if "!FILEEXT!"=="" goto :NOINPUT 90 | if "!FILEEXT!"==".mkv" set "RAWFILE=FALSE" & goto :PREPARE 91 | if "!FILEEXT!"==".ts" goto :PREPARE 92 | if "!FILEEXT!"==".m2ts" goto :PREPARE 93 | if "!FILEEXT!"==".mp4" goto :PREPARE 94 | if "!FILEEXT!"==".bin" set "RAWFILE=FALSE" & goto :PREPARE 95 | if "!FILEEXT!"==".xml" set "RAWFILE=FALSE" & goto :PREPARE 96 | if "!FILEEXT!"==".h265" goto :PREPARE 97 | if "!FILEEXT!"==".hevc" goto :PREPARE 98 | call :FALSEINPUT 99 | 100 | :PREPARE 101 | cls 102 | %GREEN% 103 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 104 | echo. 105 | %WHITE% 106 | echo ==================================== 107 | %GREEN% 108 | echo Dolby Vision Tool MEDIAINFO 109 | %WHITE% 110 | echo ==================================== 111 | echo. 112 | echo. 113 | echo == OPERATION =========================================================================================================== 114 | echo. 115 | %CYAN% 116 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 117 | echo Processing. Please wait... 118 | if /i "!FILEEXT!"==".bin" set "DVBIN=YES"& set "RPU=!FILEPATH!!FILENAME!.bin"& set "DVinput=YES"& set "RPU_EXIST=TRUE"& goto :SKIP 119 | if /i "!FILEEXT!"==".xml" ( 120 | "!DO_VI_TOOLpath!" generate --xml "!FILE!" --canvas-width 3840 --canvas-height 2160 --rpu-out "!TMP_FOLDER!\RPU.bin">nul 2>&1 121 | if exist "!TMP_FOLDER!\RPU.bin" ( 122 | set "RPU=!TMP_FOLDER!\RPU.bin" 123 | set "RPU_EXIST=TRUE" 124 | set "DVBIN=YES 125 | set "DVinput=YES" 126 | goto :SKIP 127 | ) else ( 128 | GOTO :CORRUPTRPU 129 | ) 130 | ) 131 | 132 | ::WRITE MEDIAINFO 133 | rem "!MEDIAINFOpath!" --full --Output=JSON "!FILE!">"!TMP_FOLDER!\mediainfo.json" 134 | echo. 135 | set "MI_INFOVIDEO=!FILE!" 136 | set "BL_INFOVIDEO=!FILE!" 137 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%VideoCount%% "!FILE!""') do set "VIDEO_COUNT=%%A" 138 | if "!VIDEO_COUNT!" NEQ "1" set "RAWFILE=TRUE" 139 | if "!RAWFILE!"=="TRUE" ( 140 | "!MKVMERGEpath!" --ui-language en --priority higher --output ^"!TMP_FOLDER!\Info.mkv^" --language 0:und --compression 0:none ^"^(^" ^"!FILE!^" ^"^)^" --split parts:00:00:00-00:00:01 -q 141 | if exist "!TMP_FOLDER!\Info.mkv" ( 142 | set "MI_INFOVIDEO=!TMP_FOLDER!\Info.mkv" 143 | set "BL_INFOVIDEO=!TMP_FOLDER!\Info.mkv" 144 | ) 145 | if "!VIDEO_COUNT!" NEQ "1" "!FFMPEGpath!" -loglevel panic -y -i "!FILE!" -map 0:0 -c:v copy -to 1 -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\BL_Info.mkv" 146 | if exist "!TMP_FOLDER!\BL_Info.mkv" ( 147 | set "BL_INFOVIDEO=!TMP_FOLDER!\BL_Info.mkv" 148 | ) 149 | ) 150 | 151 | ::SET HDR FORMAT 152 | if exist "!TMP_FOLDER!\Info.mkv" ( 153 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_String%% "!MI_INFOVIDEO!">"!TMP_FOLDER!\Info.txt" 154 | FOR /F "delims=" %%A IN ('findstr /C:"Dolby Vision" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" 155 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10" 156 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10+" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10+" 157 | FOR /F "delims=" %%A IN ('findstr /C:"dvhe.05" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=IPT-PQ-C2" 158 | FOR /F "delims=" %%A IN ('findstr /C:"HLG" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HLG" 159 | ) 160 | if not defined HDRFormat ( 161 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_String%% "!FILE!">"!TMP_FOLDER!\Info.txt" 162 | FOR /F "delims=" %%A IN ('findstr /C:"Dolby Vision" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" 163 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10" 164 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10+" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10+" 165 | FOR /F "delims=" %%A IN ('findstr /C:"dvhe.05" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=IPT-PQ-C2" 166 | FOR /F "delims=" %%A IN ('findstr /C:"HLG" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HLG" 167 | ) 168 | if not defined HDRFormat set "HDRFormat=SDR" 169 | 170 | ::SET DV FORMAT 171 | if exist "!TMP_FOLDER!\Info.mkv" ( 172 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_Profile%% "!MI_INFOVIDEO!">"!TMP_FOLDER!\Info.txt">nul 173 | FOR /F "delims=" %%A IN ('findstr /C:".08." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=8" 174 | FOR /F "delims=" %%A IN ('findstr /C:".07." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=7" 175 | FOR /F "delims=" %%A IN ('findstr /C:".06." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=6" 176 | FOR /F "delims=" %%A IN ('findstr /C:".05." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=5" 177 | FOR /F "delims=" %%A IN ('findstr /C:".04." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=4" 178 | FOR /F "delims=" %%A IN ('findstr /C:".03." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=3" 179 | ) 180 | if not defined DVprofile ( 181 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_Profile%% "!FILE!">"!TMP_FOLDER!\Info.txt">nul 182 | FOR /F "delims=" %%A IN ('findstr /C:".08." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=8" 183 | FOR /F "delims=" %%A IN ('findstr /C:".07." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=7" 184 | FOR /F "delims=" %%A IN ('findstr /C:".06." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=6" 185 | FOR /F "delims=" %%A IN ('findstr /C:".05." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=5" 186 | FOR /F "delims=" %%A IN ('findstr /C:".04." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=4" 187 | FOR /F "delims=" %%A IN ('findstr /C:".03." "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=3" 188 | ) 189 | 190 | ::DUAL LAYER OPERATION 191 | if "!VIDEO_COUNT!" NEQ "1" ( 192 | set "LAYERTYPE=DL" 193 | "!FFPROBEpath!" "!FILE!" -show_streams -v 0 -of compact=p=0:nk=1 >"!TMP_FOLDER!\STREAMS.txt" 194 | FOR /F "delims=" %%A IN ('findstr /C:"1920|1080" "!TMP_FOLDER!\STREAMS.txt"') DO set "STREAMINFO=%%A" 195 | if exist "!TMP_FOLDER!\STREAMS.txt" del "!TMP_FOLDER!\STREAMS.txt" 196 | if defined STREAMINFO ( 197 | for /F "tokens=1 delims=|" %%A in ("!STREAMINFO!") do set "STREAMINFO=%%A" 198 | set "DT=-map 0:!STREAMINFO!" 199 | ) else ( 200 | set "DT=-map 0:1" 201 | ) 202 | ) 203 | 204 | ::DEMUX RPU SAMPLE 205 | if "!DVinput!"=="YES" ( 206 | if exist "!MI_INFOVIDEO!" ( 207 | "!FFMPEGpath!" -loglevel panic -i "!MI_INFOVIDEO!" -c:v copy -to 1 -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" extract-rpu -o "!TMP_FOLDER!\RPU.bin" - >nul 2>&1 208 | if exist "!TMP_FOLDER!\RPU.bin" ( 209 | FOR /F "usebackq" %%A IN ('"!TMP_FOLDER!\RPU.bin"') DO set "RPUSIZE=%%~zA" 210 | if "!RPUSIZE!" NEQ "0" ( 211 | set "RPU=!TMP_FOLDER!\RPU.bin" 212 | set "RPU_EXIST=TRUE" 213 | set "RPU_STRING=" 214 | ) else ( 215 | if exist "!TMP_FOLDER!\RPU.bin" del "!TMP_FOLDER!\RPU.bin" >nul 216 | set "RPU_STRING=RPU FOUND BUT CANNOT DEMUXED FROM VIDEO" 217 | set "RPU_EXIST=FALSE" 218 | ) 219 | ) else ( 220 | set "RPU_STRING=RPU ERROR DURING DEMUXING. DOLBY VISION INFOS DISABLED" 221 | set "RPU_EXIST=FALSE" 222 | ) 223 | ) 224 | if "!RPU_EXIST!"=="FALSE" ( 225 | "!FFMPEGpath!" -loglevel panic -i "!FILE!" !DT! -c:v copy -to 1 -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" extract-rpu -o "!TMP_FOLDER!\RPU.bin" - >nul 2>&1 226 | if exist "!TMP_FOLDER!\RPU.bin" ( 227 | FOR /F "usebackq" %%A IN ('"!TMP_FOLDER!\RPU.bin"') DO set "RPUSIZE=%%~zA" 228 | if "!RPUSIZE!" NEQ "0" ( 229 | set "RPU=!TMP_FOLDER!\RPU.bin" 230 | set "RPU_EXIST=TRUE" 231 | set "RPU_STRING=" 232 | ) else ( 233 | set "RPU_STRING=RPU FOUND BUT CANNOT DEMUXED FROM VIDEO" 234 | set "RPU_EXIST=FALSE" 235 | ) 236 | ) else ( 237 | set "RPU_STRING=RPU ERROR DURING DEMUXING. DOLBY VISION INFOS DISABLED" 238 | set "RPU_EXIST=FALSE" 239 | ) 240 | ) 241 | ) 242 | 243 | :: CHECK FOR EL INPUT 244 | if "!DVprofile!!RESOLUTION!"=="71920 px x 1080 px" set "EL_INPUT=TRUE" 245 | 246 | ::GENERAL MEDIAINFO 247 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%Duration/String%% "!FILE!""') do set "DURATION=%%A" 248 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%FileSize_String4%% "!FILE!""') do set "FILESIZE=%%A" 249 | ::AUDIO COUNT 250 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%AudioCount%% "!FILE!""') do set "AUDIO_COUNT=%%A" 251 | if defined AUDIO_COUNT ( 252 | set "AUDIO_COUNT=!AUDIO_COUNT! Audio track(s)" 253 | ) 254 | ::TEXT COUNT 255 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%TextCount%% "!FILE!""') do set "TEXT_COUNT=%%A" 256 | if defined TEXT_COUNT ( 257 | set "TEXT_COUNT=!TEXT_COUNT! Subtitle(s)" 258 | ) 259 | 260 | ::BL MEDIAINFO 261 | 262 | ::CODEC NAME 263 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%Format%%^-%%BitDepth%%Bit^-%%ColorSpace%%^-%%ChromaSubsampling%% "!BL_INFOVIDEO!""') do set "CODEC_NAME=%%A" 264 | if not defined CODEC_NAME set "CODEC_NAME=N/A" 265 | ::MAXCll and MAXFall 266 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%MaxCLL%% "!BL_INFOVIDEO!""') do set "MaxCLL=%%A" 267 | if not defined MaxCLL set "MaxCLL=N/A" 268 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%MaxFALL%% "!BL_INFOVIDEO!""') do set "MaxFALL=%%A" 269 | if not defined MaxFALL set "MaxFALL=N/A" 270 | ::HDR METADATA 271 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%MasteringDisplay_ColorPrimaries%% "!BL_INFOVIDEO!""') do set "MDCP=%%A" 272 | if not defined MDCP set "MDCP=N/A" 273 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%MasteringDisplay_Luminance%% "!BL_INFOVIDEO!""') do set "Luminance=%%A" 274 | if not defined Luminance ( 275 | set "MinDML=N/A" 276 | set "MaxDML=N/A" 277 | set "Luminance=N/A" 278 | ) else ( 279 | for /F "tokens=2" %%A in ("!Luminance!") do set MinDML=%%A 280 | for /F "tokens=* delims=0." %%A in ("!MinDML!") do set "MinDML=%%A" 281 | for /F "tokens=5" %%A in ("!Luminance!") do set MaxDML=%%A 282 | ) 283 | 284 | ::VIDEO MEDIAINFO 285 | 286 | ::FRAMERATE 287 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameRate/String%% "!FILE!""') do set "FRAMERATE=%%A" 288 | for /F "tokens=1-2 delims=FPS" %%A in ("!FRAMERATE!") do ( 289 | set "FRAMERATE=%%AFPS" 290 | if "%%B" NEQ "" set "FRAMERATE=BL = %%AFPS | EL = %%BFPS" 291 | ) 292 | ::BITRATE 293 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%BitRate/String%% "!FILE!""') do set "BITRATE=%%A" 294 | for /F "tokens=1-2 delims=/s" %%A in ("!BITRATE!") do ( 295 | set "BITRATE=%%A/s" 296 | if "%%B" NEQ "" set "BITRATE=BL = %%A/s | EL = %%B/s" 297 | ) 298 | ::RESOLUTION 299 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;"%%Width%%x x %%Height%%x" "!FILE!""') do set "RESOLUTION=%%A" 300 | for /F "tokens=1-4 delims=x " %%A in ("!RESOLUTION!") do ( 301 | if "!DVprofile!%%A%%B"=="719201080" set "EL_INPUT=TRUE" 302 | set "RESOLUTION=%%A px x %%B px" 303 | if "%%C" NEQ "" set "RESOLUTION=BL = %%A px x %%B px | EL = %%C px x %%D px" 304 | ) 305 | ::STREAMSIZE 306 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%StreamSize_String4%% "!FILE!""') do set "STREAMSIZE=%%A" 307 | for /F "tokens=1-10 delims=iB" %%A in ("!STREAMSIZE!") do ( 308 | set "STREAMSIZE=%%AiB" 309 | if "%%B" NEQ "" set "STREAMSIZE=BL = %%AiB | EL = %%BiB" 310 | ) 311 | 312 | :SKIP 313 | ::RPU OPERATIONS 314 | 315 | if "!RPU_EXIST!"=="TRUE" ( 316 | "!DO_VI_TOOLpath!" info --input "!RPU!" -f 1 > "!TMP_FOLDER!\temp.rpu.json" 317 | "!DO_VI_TOOLpath!" info -s "!RPU!" > "!TMP_FOLDER!\RPUINFO.txt" 318 | 319 | ::FIND DM VERSION 320 | FOR /F "delims=" %%A IN ('findstr /C:"DM version" "!TMP_FOLDER!\RPUINFO.txt"') DO set "DM_STRING=%%A" 321 | if defined DM_STRING ( 322 | for /F "tokens=3 delims=:/()" %%A in ("!DM_STRING!") do set "DM=, %%A" 323 | for /F "tokens=2 delims=:" %%A in ("!DM_STRING!") do set "DM_FULL=%%A" 324 | set "DM_FULL=!DM_FULL:~1!" 325 | ) else ( 326 | set "DM=, DM NOT FOUND. CORRUPT RPU^?" 327 | set "DM_FULL=DM NOT FOUND. CORRUPT RPU^?" 328 | ) 329 | 330 | ::FIND DV PROFILE 331 | FOR /F "delims=" %%A IN ('findstr /C:"dovi_profile" "!TMP_FOLDER!\temp.rpu.json"') DO set "DVprofile=%%A" 332 | if defined DVprofile ( 333 | set "DVprofile=!DVprofile:*:=!" 334 | set "DVprofile=!DVprofile:~1,-1!" 335 | ) else ( 336 | set "DVprofile=N/A" 337 | if "!DVBIN!"=="YES" set "DVinput=CORRUPT" 338 | ) 339 | if "!DVprofile!"=="7" set "DVP7=YES" 340 | if "!DVinput!"=="CORRUPT" GOTO :CORRUPTRPU 341 | 342 | ::FIND MEL FEL 343 | FOR /F "delims=" %%A IN ('findstr /C:"el_type" "!TMP_FOLDER!\temp.rpu.json"') DO set "subprofile=%%A" 344 | if defined subprofile ( 345 | set "subprofile=!subprofile:*:=!" 346 | set "subprofile=!subprofile:~2,-2!" 347 | ) else ( 348 | set "subprofile=N/A ^(Corrupt^?^)" 349 | ) 350 | 351 | ::L1 352 | FOR /F "delims=" %%A IN ('findstr /C:"RPU mastering display:" "!TMP_FOLDER!\RPUINFO.txt"') DO set "RPUMDL_L1=%%A" 353 | if defined RPUMDL_L1 ( 354 | for /F "tokens=4 delims=:/ " %%A in ("!RPUMDL_L1!") do set RPUMinDML_L1=%%A 355 | for /F "tokens=5 delims=:/ " %%A in ("!RPUMDL_L1!") do set RPUMaxDML_L1=%%A 356 | set "RPULuminanceL1=min: !RPUMinDML_L1! cd/m2, max: !RPUMaxDML_L1! cd/m2" 357 | ) else ( 358 | set "RPULuminanceL1=N/A" 359 | ) 360 | FOR /F "delims=" %%A IN ('findstr /C:"RPU content light level" "!TMP_FOLDER!\RPUINFO.txt"') DO set "L1_STRING=%%A" 361 | if defined L1_STRING ( 362 | for /F "tokens=7 delims=:/ " %%A in ("!L1_STRING!") do set "RPUCLL_L1=%%A cd/m2" 363 | for /F "tokens=10 delims=:/ " %%A in ("!L1_STRING!") do set "RPUFALL_L1=%%A cd/m2" 364 | ) else ( 365 | set "RPUCLL_L1=N/A" 366 | set "RPUFALL_L1=N/A" 367 | ) 368 | 369 | ::L2 370 | FOR /F "delims=" %%A IN ('findstr /C:"L2 trims" "!TMP_FOLDER!\RPUINFO.txt"') DO set "L2_TRIMS=%%A" 371 | if defined L2_TRIMS ( 372 | set "L2_TRIMS=!L2_TRIMS:~12!" 373 | ) else ( 374 | set "L2_TRIMS=N/A" 375 | ) 376 | 377 | ::L5 378 | FOR /F "delims=" %%A IN ('findstr /C:"Level5" "!TMP_FOLDER!\temp.rpu.json"') DO set "L5_FOUND=%%A" 379 | if defined L5_FOUND ( 380 | FOR /F "tokens=2 delims=:, " %%A IN ('findstr /C:"active_area_left_offset" "!TMP_FOLDER!\temp.rpu.json"') DO set "RPU_INPUT_AA_LC=%%A" 381 | FOR /F "tokens=2 delims=:, " %%A IN ('findstr /C:"active_area_right_offset" "!TMP_FOLDER!\temp.rpu.json"') DO set "RPU_INPUT_AA_RC=%%A" 382 | FOR /F "tokens=2 delims=:, " %%A IN ('findstr /C:"active_area_top_offset" "!TMP_FOLDER!\temp.rpu.json"') DO set "RPU_INPUT_AA_TC=%%A" 383 | FOR /F "tokens=2 delims=:, " %%A IN ('findstr /C:"active_area_bottom_offset" "!TMP_FOLDER!\temp.rpu.json"') DO set "RPU_INPUT_AA_BC=%%A" 384 | ) else ( 385 | if "!DVprofile!" NEQ "5" ( 386 | set "L5_STRING_TXT=L5 Metadata not found. L5 Fix recommended" 387 | ) else ( 388 | set "L5_STRING_TXT=N/A" 389 | ) 390 | ) 391 | 392 | ::L6 393 | FOR /F "delims=" %%A IN ('findstr /C:"L6 metadata:" "!TMP_FOLDER!\RPUINFO.txt"') DO set "L6METADATA=%%A" 394 | if defined L6METADATA ( 395 | for /F "tokens=5 delims=:/ " %%A in ("!L6METADATA!") do set "RPUMinDML_L6=%%A" 396 | for /F "tokens=6 delims=:/ " %%A in ("!L6METADATA!") do set "RPUMaxDML_L6=%%A" 397 | for /F "tokens=9 delims=:/ " %%A in ("!L6METADATA!") do set "RPUCLL_L6=%%A cd/m2" 398 | for /F "tokens=12 delims=:/ " %%A in ("!L6METADATA!") do set "RPUFALL_L6=%%A cd/m2" 399 | set "RPULuminanceL6=min: !RPUMinDML_L6! cd/m2, max: !RPUMaxDML_L6! cd/m2" 400 | ) else ( 401 | set "RPULuminanceL6=N/A" 402 | set "RPUCLL_L6=N/A" 403 | set "RPUFALL_L6=N/A" 404 | ) 405 | 406 | ::L9 407 | FOR /F "delims=" %%A IN ('findstr /C:"source_primary_index" "!TMP_FOLDER!\temp.rpu.json"') DO set "L9_FOUND=%%A" 408 | if defined L9_FOUND ( 409 | for /F "tokens=2 delims=:/ " %%A in ("!L9_FOUND!") do set "L9MDP=%%A" 410 | if "!L9MDP!"=="0" set "L9MDP=Display P3" 411 | if "!L9MDP!"=="2" set "L9MDP=BT.2020" 412 | ) 413 | ) 414 | 415 | ::BEGIN DISPLAYING 416 | if "!TOOLTYPE!"=="MSGBOX" ( 417 | if exist "!TMP_FOLDER!" rmdir /Q /S "!TMP_FOLDER!">nul 418 | CALL :OUTPUT_msgBOX 419 | ) 420 | if "!LOGFILE!"=="YES" CALL :OUTPUT_LOGFILE 421 | if "!TOOLTYPE!"=="TEXT" CALL :OUTPUT_TEXT 422 | if "!LOGFILE!"=="YES" ( 423 | if exist "!TMP_FOLDER!\logfile.txt" copy "!TMP_FOLDER!\logfile.txt" "!LOGFILEpath!">nul 424 | ) 425 | if exist "!TMP_FOLDER!" rmdir /Q /S "!TMP_FOLDER!">nul 426 | setlocal DisableDelayedExpansion 427 | pause>nul 428 | exit 429 | 430 | :OUTPUT_TEXT 431 | mode con cols=125 lines=57 432 | if "!subprofile!"=="FEL" set "subprofile= :colortxt 0A "FEL" 433 | if "!subprofile!"=="MEL" set "subprofile= :colortxt 06 "MEL" 434 | if defined L5_FOUND ( 435 | set "L5_STRING=call :colortxt 0F " Left: !RPU_INPUT_AA_LC! px, Top: !RPU_INPUT_AA_TC! px, Right: !RPU_INPUT_AA_RC! px, Bottom: !RPU_INPUT_AA_BC! px"" 436 | ) else ( 437 | if "!DVprofile!"=="8" ( 438 | set "L5_STRING=call :colortxt 06 " L5 Metadata not found. L5 Fix recommended [DDVT SyncCheck]."" 439 | ) else ( 440 | set "L5_STRING=call :colortxt 0F " N/A"" 441 | ) 442 | ) 443 | cls 444 | %GREEN% 445 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 446 | echo. 447 | %WHITE% 448 | echo ==================================== 449 | %GREEN% 450 | echo Dolby Vision Tool MEDIAINFO 451 | %WHITE% 452 | echo ==================================== 453 | echo. 454 | echo. 455 | echo == SUMMARY ============================================================================================================= 456 | echo. 457 | call :colortxt 0E "Filename " & call :colortxt 0F ": !FILENAME!!FILEEXT!" /n 458 | if defined FILESIZE ( 459 | echo. 460 | call :colortxt 0E "Filesize " & call :colortxt 0F ": !FILESIZE!" /n 461 | ) 462 | if defined DURATION ( 463 | echo. 464 | call :colortxt 0E "Duration " & call :colortxt 0F ": !DURATION!" /n 465 | ) 466 | echo. 467 | ::DV P7 INFOLINE 468 | if "!EL_INPUT!!DVinput!!DVP7!!DVBIN!"=="FALSEYESYESNO" call :colortxt 0E "Video " & call :colortxt 0F ": Base Layer (" & call :colortxt 0A "!HDRFormat!" & call :colortxt 0F ") + Enhanced Layer (" & call :colortxt 0A "Dolby Vision Profile 7 " & call :colortxt 0F "[" & call !subprofile! & call :colortxt 0F "]" & call :colortxt 0A " !LAYERTYPE!" & call :colortxt 0F ") + RPU (" & call :colortxt 0A "!DM:~2!" & call :colortxt 0F ")" /n 469 | ::DV P5/P8 INFOLINE 470 | if "!EL_INPUT!!DVinput!!DVP7!!DVBIN!"=="FALSEYESNONO" call :colortxt 0E "Video " & call :colortxt 0F ": Base Layer (" & call :colortxt 0A "!HDRFormat!" & call :colortxt 0F ") + RPU (" & call :colortxt 0A "Dolby Vision Profile !DVprofile!!DM!" & call :colortxt 0F ")" /n 471 | ::EL INFOLINE 472 | if "!EL_INPUT!!DVinput!"=="TRUEYES" call :colortxt 0E "Video " & call :colortxt 0F ": Enhanced Layer (" & call :colortxt 0A "Dolby Vision Profile 7 " & call :colortxt 0F "[" & call !subprofile! & call :colortxt 0F "]" & call :colortxt 0F ") + RPU (" & call :colortxt 0A "!DM:~2!" & call :colortxt 0F ")" /n 473 | ::DV RPU/XML INFOLINE 474 | if "!DVinput!!DVBIN!"=="YESYES" call :colortxt 0E "RPU " & call :colortxt 0F ": Reference Processing Unit Binary (" & call :colortxt 0A "Dolby Vision Profile !DVprofile!!DM!" & call :colortxt 0F ")" /n 475 | ::NO_DV 476 | if "!DVinput!!DVBIN!"=="NONO" call :colortxt 0E "Video " & call :colortxt 0F ": !CODEC_NAME!" & call :colortxt 0F " (" & call :colortxt 0A "!HDRFormat!" & call :colortxt 0F ")" /n 477 | 478 | ::RPU STATUS MESSAGE 479 | if "!RPU_STRING!" NEQ "" call :colortxt 06 " !RPU_STRING!" /n 480 | 481 | ::EL LAYER STATUS MESSAGE 482 | if "!EL_INPUT!!DVinput!"=="TRUEYES" call :colortxt 06 " Enhanced Layer needs muxing into HDR10 Base Layer to work correctly" /n 483 | 484 | ::DV5 NO FALLBACK INFO 485 | if "!DVprofile!"=="5" ( 486 | call :colortxt 06 " No HDR10 Fallback with Dolby Vision Profile 5" /n 487 | ) 488 | ::BASE LAYER INFO 489 | if "!DVBIN!"=="NO" ( 490 | if "!DVinput!"=="YES" ( 491 | echo. 492 | %YELLOW% 493 | echo Base Layer 494 | %WHITE% 495 | echo Codec : !CODEC_NAME! 496 | echo Mastering DCP : !MDCP! 497 | echo Mastering DL : !Luminance! 498 | echo MaxCLL : !MaxCLL! 499 | echo MaxFALL : !MaxFALL! 500 | ) 501 | ) 502 | ::RPU INFO 503 | 504 | if "!DVinput!!RPU_EXIST!"=="YESTRUE" ( 505 | echo. 506 | %YELLOW% 507 | if "!DVBIN!"=="NO" echo RPU 508 | %WHITE% 509 | echo DM Version : !DM_FULL! 510 | echo L1-Mastering DL : !RPULuminanceL1! 511 | echo L1-MaxCLL : !RPUCLL_L1! 512 | echo L1-MaxFALL : !RPUFALL_L1! 513 | echo L2-Trims : !L2_TRIMS! 514 | call :colortxt 0F "L5-Active Area :" & !L5_STRING! /n 515 | echo L6-Mastering DL : !RPULuminanceL6! 516 | echo L6-MaxCLL : !RPUCLL_L6! 517 | echo L6-MaxFALL : !RPUFALL_L6! 518 | if defined L9_FOUND echo L9-Mastering DCP : !L9MDP! 519 | ) 520 | ::MEDIAINFO 521 | if "!DVBIN!"=="NO" ( 522 | if defined RESOLUTION ( 523 | echo. 524 | call :colortxt 0E "Resolution " & call :colortxt 0F ": !RESOLUTION!" /n 525 | ) 526 | if defined BITRATE ( 527 | echo. 528 | call :colortxt 0E "Video Bitrate " & call :colortxt 0F ": !BITRATE!" /n 529 | ) 530 | if defined STREAMSIZE ( 531 | echo. 532 | call :colortxt 0E "Video Size " & call :colortxt 0F ": !STREAMSIZE!" /n 533 | ) 534 | if defined FRAMERATE ( 535 | echo. 536 | call :colortxt 0E "Framerate " & call :colortxt 0F ": !FRAMERATE!" /n 537 | ) 538 | if defined AUDIO_COUNT ( 539 | echo. 540 | call :colortxt 0E "Audio " & call :colortxt 0F ": !AUDIO_COUNT!" /n 541 | ) 542 | if defined TEXT_COUNT ( 543 | echo. 544 | call :colortxt 0E "Subtitles " & call :colortxt 0F ": !TEXT_COUNT!" /n 545 | ) 546 | ) 547 | 548 | echo. 549 | echo ======================================================================================================================== 550 | %GREEN% 551 | echo. 552 | echo Finish^^! 553 | goto :eof 554 | 555 | :OUTPUT_msgBOX 556 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 557 | set "NewLine=[System.Environment]::NewLine" 558 | if "!EL_INPUT!!DVinput!!DVP7!!DVBIN!"=="FALSEYESYESNO" set "Line1=BL ^(!HDRFormat!^) ^+ EL ^(Dolby Vision Profile 7 ^[!subprofile!^] !LAYERTYPE!^) ^+ RPU ^(!DM:~2!^)" 559 | if "!EL_INPUT!!DVinput!!DVP7!!DVBIN!"=="FALSEYESNONO" set "Line1=BL ^(!HDRFormat!^) ^+ RPU ^(Dolby Vision Profile !DVprofile!!DM!^)" 560 | if "!EL_INPUT!!DVinput!"=="TRUEYES" set "Line1=EL ^(Dolby Vision Profile 7 ^[!subprofile!^]^) ^+ RPU ^(!DM:~2!^) EL NEEDS MUXING INTO HDR10 BL TO WORK CORRECTLY" 561 | if "!DVinput!!DVBIN!"=="YESYES" set "Line1=RPU ^(Dolby Vision Profile !DVprofile!!DM!^)" 562 | if "!DVinput!!DVBIN!"=="NONO" set "Line1=!CODEC_NAME! ^(!HDRFormat!^)" 563 | if "!DVinput!"=="YES" set "Line2=DOLBY VISION RPU^^!" 564 | if "!DVBIN!!DVinput!"=="YESNO" call :CORRUPTRPU 565 | if "!DVinput!!DVBIN!"=="YESNO" set "Line2=DOLBY VISION=[ YES ] | HDR FALLBACK=[ YES ]" 566 | if "!DVinput!!DVprofile!!DVBIN!"=="YES5NO" set "Line2=DOLBY VISION [ YES ] | HDR FALLBACK=[ NO ]" 567 | if "!DVinput!!DVBIN!"=="NONO" set "Line2=DOLBY VISION=[ NO ]" 568 | setlocal DisableDelayedExpansion 569 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%FILENAME%%FILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT QuickInfo v%VERSION%', 'Ok','Info')" 570 | exit 571 | 572 | :OUTPUT_LOGFILE 573 | if "!DL!"=="TRUE" set "LAYERTYPE=DL" 574 | if defined L5_FOUND ( 575 | set "L5_STRING=Left: !RPU_INPUT_AA_LC! px, Top: !RPU_INPUT_AA_TC! px, Right: !RPU_INPUT_AA_RC! px, Bottom: !RPU_INPUT_AA_BC! px" 576 | ) else ( 577 | if "!DVprofile!"=="8" ( 578 | set "L5_STRING=L5 Metadata not found. L5 Fix recommended [DDVT SyncCheck]." 579 | ) else ( 580 | set "L5_STRING=N/A" 581 | ) 582 | ) 583 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG>"!TMP_FOLDER!\logfile.txt" 584 | echo.>>"!TMP_FOLDER!\logfile.txt" 585 | echo ====================================>>"!TMP_FOLDER!\logfile.txt" 586 | echo Dolby Vision Tool MEDIAINFO>>"!TMP_FOLDER!\logfile.txt" 587 | echo ====================================>>"!TMP_FOLDER!\logfile.txt" 588 | echo.>>"!TMP_FOLDER!\logfile.txt" 589 | echo.>>"!TMP_FOLDER!\logfile.txt" 590 | echo == LOGFILE START =======================================================================================================>>"!TMP_FOLDER!\logfile.txt" 591 | echo.>>"!TMP_FOLDER!\logfile.txt" 592 | echo Filename : !FILENAME!!FILEEXT!>>"!TMP_FOLDER!\logfile.txt" 593 | if defined FILESIZE ( 594 | echo.>>"!TMP_FOLDER!\logfile.txt" 595 | echo Filesize : !FILESIZE!>>"!TMP_FOLDER!\logfile.txt" 596 | ) 597 | if defined DURATION ( 598 | echo.>>"!TMP_FOLDER!\logfile.txt" 599 | echo Duration : !DURATION!>>"!TMP_FOLDER!\logfile.txt" 600 | ) 601 | echo.>>"!TMP_FOLDER!\logfile.txt" 602 | ::DV P7 INFOLINE 603 | if "!DVinput!!DVP7!!DVBIN!"=="YESYESNO" echo Video ^: Base Layer ^(!HDRFormat!^) ^+ Enhanced Layer ^(Dolby Vision Profile 7 ^[!subprofile!^] !LAYERTYPE!^) ^+ RPU ^(!DM:~2!^)>>"!TMP_FOLDER!\logfile.txt" 604 | ::DV P5/P8 INFOLINE 605 | if "!DVinput!!DVP7!!DVBIN!"=="YESNONO" echo Video ^: Base Layer ^(!HDRFormat!^) ^+ RPU ^(Dolby Vision Profile !DVprofile!!DM!^)>>"!TMP_FOLDER!\logfile.txt" 606 | ::EL INFOLINE 607 | if "!EL_INPUT!!DVinput!"=="TRUEYES" echo Video ^: Enhanced Layer ^(Dolby Vision Profile 7 ^[!subprofile!^]^) ^+ RPU ^(!DM:~2!^)>>"!TMP_FOLDER!\logfile.txt" 608 | ::DV P7 RPU/XML INFOLINE 609 | if "!DVinput!!DVBIN!"=="YESYES" echo RPU ^: Reference Processing Unit Binary ^(Dolby Vision Profile !DVprofile!!DM!^)>>"!TMP_FOLDER!\logfile.txt" 610 | ::NO_DV 611 | if "!DVinput!!DVBIN!"=="NONO" echo Video ^: !CODEC_NAME! ^(!HDRFormat!^)>>"!TMP_FOLDER!\logfile.txt" 612 | 613 | ::RPU STATUS MESSAGE 614 | if "!RPU_STRING!" NEQ "" echo !RPU_STRING!>>"!TMP_FOLDER!\logfile.txt" 615 | 616 | ::EL LAYER STATUS MESSAGE 617 | if "!EL_INPUT!!DVinput!"=="TRUEYES" echo Enhanced Layer needs muxing into HDR10 Base Layer to work correctly>>"!TMP_FOLDER!\logfile.txt" 618 | 619 | ::DV5 NO FALLBACK INFO 620 | if "!DVprofile!"=="5" echo ^No ^HDR10 ^Fallback ^with ^Dolby ^Vision ^Profile ^5>>"!TMP_FOLDER!\logfile.txt" 621 | 622 | ::BASE LAYER INFO 623 | if "!DVBIN!"=="NO" ( 624 | if "!DVinput!"=="YES" ( 625 | echo.>>"!TMP_FOLDER!\logfile.txt" 626 | echo Base Layer>>"!TMP_FOLDER!\logfile.txt" 627 | echo Codec : !CODEC_NAME!>>"!TMP_FOLDER!\logfile.txt" 628 | echo Mastering DCP : !MDCP!>>"!TMP_FOLDER!\logfile.txt" 629 | echo Mastering DL : !Luminance!>>"!TMP_FOLDER!\logfile.txt" 630 | echo MaxCLL : !MaxCLL!>>"!TMP_FOLDER!\logfile.txt" 631 | echo MaxFALL : !MaxFALL!>>"!TMP_FOLDER!\logfile.txt" 632 | ) 633 | ) 634 | 635 | ::RPU INFO 636 | if "!DVinput!!RPU_EXIST!"=="YESTRUE" ( 637 | echo.>>"!TMP_FOLDER!\logfile.txt" 638 | echo RPU>>"!TMP_FOLDER!\logfile.txt" 639 | echo DM Version : !DM_FULL!>>"!TMP_FOLDER!\logfile.txt" 640 | echo L1-Mastering DL : !RPULuminanceL1!>>"!TMP_FOLDER!\logfile.txt" 641 | echo L1-MaxCLL : !RPUCLL_L1!>>"!TMP_FOLDER!\logfile.txt" 642 | echo L1-MaxFALL : !RPUFALL_L1!>>"!TMP_FOLDER!\logfile.txt" 643 | echo L2-Trims : !L2_TRIMS!>>"!TMP_FOLDER!\logfile.txt" 644 | echo L5-Active Area : !L5_STRING!>>"!TMP_FOLDER!\logfile.txt" 645 | echo L6-Mastering DL : !RPULuminanceL6!>>"!TMP_FOLDER!\logfile.txt" 646 | echo L6-MaxCLL : !RPUCLL_L6!>>"!TMP_FOLDER!\logfile.txt" 647 | echo L6-MaxFALL : !RPUFALL_L6!>>"!TMP_FOLDER!\logfile.txt" 648 | if defined L9_FOUND echo L9-Mastering DCP : !L9MDP!>>"!TMP_FOLDER!\logfile.txt" 649 | ) 650 | ::MEDIAINFO 651 | if "!DVBIN!"=="NO" ( 652 | if defined RESOLUTION ( 653 | echo.>>"!TMP_FOLDER!\logfile.txt" 654 | echo Resolution : !RESOLUTION!>>"!TMP_FOLDER!\logfile.txt" 655 | ) 656 | if defined BITRATE ( 657 | echo.>>"!TMP_FOLDER!\logfile.txt" 658 | echo Video Bitrate : !BITRATE!>>"!TMP_FOLDER!\logfile.txt" 659 | ) 660 | if defined STREAMSIZE ( 661 | echo.>>"!TMP_FOLDER!\logfile.txt" 662 | echo Video Size : !STREAMSIZE!>>"!TMP_FOLDER!\logfile.txt" 663 | ) 664 | if defined FRAMERATE ( 665 | echo.>>"!TMP_FOLDER!\logfile.txt" 666 | echo Framerate : !FRAMERATE!>>"!TMP_FOLDER!\logfile.txt" 667 | ) 668 | if "!RAWFILE!!EL_INPUT!!DVBIN!"=="FALSEFALSENO" ( 669 | if defined AUDIO_COUNT ( 670 | echo.>>"!TMP_FOLDER!\logfile.txt" 671 | echo Audio : !AUDIO_COUNT!>>"!TMP_FOLDER!\logfile.txt" 672 | ) 673 | if defined TEXT_COUNT ( 674 | echo.>>"!TMP_FOLDER!\logfile.txt" 675 | echo Subtitles : !TEXT_COUNT!>>"!TMP_FOLDER!\logfile.txt" 676 | ) 677 | ) 678 | ) 679 | echo.>>"!TMP_FOLDER!\logfile.txt" 680 | echo == LOGFILE END =========================================================================================================>>"!TMP_FOLDER!\logfile.txt" 681 | goto :eof 682 | 683 | :CORRUPTVIDEO 684 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 685 | set "NewLine=[System.Environment]::NewLine" 686 | set "Line1=NO VIDEO INFORMATIONS FOUND OR CORRUPT INPUT FILE^!" 687 | rmdir /Q /S "!TMP_FOLDER!">nul 688 | setlocal DisableDelayedExpansion 689 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%FILENAME%%FILEEXT%' + %NewLine% + %NewLine% + '%Line1%', 'DDVT MediaInfo [QfG] v%VERSION%', 'Ok','Warning')" 690 | exit 691 | 692 | :CORRUPTRPU 693 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 694 | set "NewLine=[System.Environment]::NewLine" 695 | set "Line1=CORRUPT DOLBY VISION XML / RPU BINARY FILE^!" 696 | rmdir /Q /S "!TMP_FOLDER!">nul 697 | setlocal DisableDelayedExpansion 698 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%FILENAME%%FILEEXT%' + %NewLine% + %NewLine% + '%Line1%', 'DDVT MediaInfo [QfG] v%VERSION%', 'Ok','Warning')" 699 | exit 700 | 701 | :FALSEINPUT 702 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 703 | set "NewLine=[System.Environment]::NewLine" 704 | set "Line1=Unsupported Input File. Supported Files are:" 705 | set "Line2=*.mkv | *.ts | *.m2ts | *.mp4 | *.bin | *.xml | *.h265 | *.hevc" 706 | setlocal DisableDelayedExpansion 707 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%FILENAME%%FILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT MediaInfo [QfG] v%VERSION%', 'Ok','Info')" 708 | exit 709 | 710 | :NOINPUT 711 | cls 712 | %GREEN% 713 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 714 | echo. 715 | %WHITE% 716 | echo ==================================== 717 | %GREEN% 718 | echo Dolby Vision Tool MEDIAINFO 719 | %WHITE% 720 | echo ==================================== 721 | echo. 722 | echo. 723 | echo == CHECK INPUT FILE ==================================================================================================== 724 | %YELLOW% 725 | echo. 726 | echo No Input File. Use^: 727 | echo. 728 | echo DDVT_MEDIAINFO.cmd "YourFilename.mkv/ts/m2ts/mp4/bin/xml/hevc/h265" 729 | echo. 730 | echo or use for simple Dolby Vision check^: 731 | echo. 732 | echo DDVT_MEDIAINFO.cmd "YourFilename.mkv/ts/m2ts/mp4/bin/xml/hevc/h265" -MSGBOX 733 | echo. 734 | %WHITE% 735 | echo ======================================================================================================================== 736 | setlocal DisableDelayedExpansion 737 | TIMEOUT 30 738 | exit 739 | 740 | :CORRUPTFILE 741 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 742 | START /B https://mega.nz/folder/x9FHlbbK#YQz_XsqcAXfZP2ciLeyyDg 743 | set "NewLine=[System.Environment]::NewLine" 744 | set "Line1=""%MISSINGFILE%"""" 745 | set "Line2=Copy the file to the directory or download and extract DDVT_tools.rar" 746 | setlocal DisableDelayedExpansion 747 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('NEEDED FILE NOT FOUND!' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT MediaInfo [QfG] v%VERSION%', 'Ok','Error')" 748 | exit 749 | 750 | :CreatePassword 751 | set TempVar=%PasswordChars% 752 | set /a PWCharCount=0 753 | 754 | :CountLoop 755 | set TempVar=%TempVar:~1% 756 | set /a PWCharCount+=1 757 | if not "%TempVar%"=="" goto CountLoop 758 | set TempVar= 759 | set Length=0 760 | 761 | :GenerateLoop 762 | set /a i=%Random% %% PWCharCount 763 | set /a Length+=1 764 | set TempVar=%TempVar%!PasswordChars:~%i%,1! 765 | if not "%Length%"=="%PasswordLength%" goto GenerateLoop 766 | set %1=%TempVar% 767 | goto :eof 768 | 769 | :colortxt 770 | setlocal enableDelayedExpansion 771 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 772 | 773 | :colorPrint Color Str [/n] 774 | setlocal 775 | set "s=%~2" 776 | call :colorPrintVar %1 s %3 777 | exit /b 778 | 779 | :colorPrintVar Color StrVar [/n] 780 | if not defined DEL call :initColorPrint 781 | setlocal enableDelayedExpansion 782 | pushd . 783 | ': 784 | cd \ 785 | set "s=!%~2!" 786 | ::The single blank line within the following IN() clause is critical - DO NOT REMOVE 787 | for %%n in (^"^ 788 | 789 | ^") do ( 790 | set "s=!s:\=%%~n\%%~n!" 791 | set "s=!s:/=%%~n/%%~n!" 792 | set "s=!s::=%%~n:%%~n!" 793 | ) 794 | for /f delims^=^ eol^= %%s in ("!s!") do ( 795 | if "!" equ "" setlocal disableDelayedExpansion 796 | if %%s==\ ( 797 | findstr /a:%~1 "." "\'" nul 798 | colorPrint.txt (echo %%s\..\') 804 | findstr /a:%~1 /f:colorPrint.txt "." 805 | "%temp%\'" set /p "=." 815 | subst ': "%temp%" >nul 816 | exit /b 817 | 818 | :cleanupColorPrint 819 | 2>nul del "%temp%\'" 820 | 2>nul del "%temp%\colorPrint.txt" 821 | >nul subst ': /d 822 | exit /b -------------------------------------------------------------------------------- /DDVT_MKVTOMP4.cmd: -------------------------------------------------------------------------------- 1 | @echo off & setlocal 2 | mode con cols=125 lines=57 3 | FOR /F "tokens=2 delims==" %%A IN ('findstr /C:"VERSION=" "%~dp0DDVT_OPTIONS.cmd"') DO set "VERSION=%%A" 4 | TITLE DDVT MKVtoMP4 [QfG] v%VERSION% 5 | 6 | set PasswordChars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 7 | set PasswordLength=5 8 | call :CreatePassword Password 9 | 10 | set "sfkpath=%~dp0tools\sfk.exe" rem Path to sfk.exe 11 | set "FFMPEGpath=%~dp0tools\ffmpeg.exe" rem Path to ffmpeg.exe 12 | set "FFPROBEpath=%~dp0tools\ffprobe.exe" rem Path to ffprobe.exe 13 | set "MP4FPSMODpath=%~dp0tools\mp4fpsmod.exe" rem Path to mp4fpsmod.exe 14 | set "MP4BOXpath=%~dp0tools\mp4box.exe" rem Path to mp4box.exe 15 | set "MP4MUXERpath=%~dp0tools\mp4muxer.exe" rem Path to mp4muxer.exe 16 | set "MEDIAINFOpath=%~dp0tools\mediainfo.exe" rem Path to mediainfo.exe 17 | set "DO_VI_TOOLpath=%~dp0tools\dovi_tool.exe" rem Path to dovi_tool.exe 18 | set "HDR10P_TOOLpath=%~dp0tools\hdr10plus_tool.exe" rem Path to hdr10plus_tool.exe 19 | 20 | rem --- Hardcoded settings. Can be changed manually --- 21 | set "AUDIOCODEC=Untouched" 22 | :: Untouched / eAC-3 @640k / AC-3 @640k / AAC @High Quality - Set default Audiocodec 23 | 24 | rem --- Hardcoded settings. Cannot be changed --- 25 | set "INPUTFILE=%~dpnx1" 26 | set "INPUTFILEPATH=%~dp1" 27 | set "INPUTFILENAME=%~n1" 28 | set "INPUTFILEEXT=%~x1" 29 | set "DIRFOUND=FALSE" 30 | set "FAKEP5ALLOWED=FALSE" 31 | set "FAKEP5=NO" 32 | set "TMP_FOLDER=SAME AS SOURCE" 33 | set "TARGET_FOLDER=SAME AS SOURCE" 34 | set "MKVTOOLNIX_FOLDER=INCLUDED" 35 | set "HDR_Info=No HDR Infos found" 36 | set "RESOLUTION=N/A" 37 | set "HDR=N/A" 38 | set "CODEC_NAME=N/A" 39 | set "FRAMERATE=N/A" 40 | set "FRAMES=N/A" 41 | set "DIR=FALSE" 42 | set /a "ERRORCOUNT=0" 43 | 44 | setlocal EnableDelayedExpansion 45 | set "WAIT="!sfkpath!" sleep" 46 | set "GREEN="!sfkpath!" color green" 47 | set "RED="!sfkpath!" color red" 48 | set "YELLOW="!sfkpath!" color yellow" 49 | set "WHITE="!sfkpath!" color white" 50 | set "CYAN="!sfkpath!" color cyan" 51 | set "MAGENTA="!sfkpath!" color magenta" 52 | set "GREY="!sfkpath!" color grey" 53 | 54 | :: Check for INI and Load Settings 55 | IF EXIST "%~dp0DDVT_OPTIONS.ini" ( 56 | FOR /F "delims=" %%A IN ('findstr /C:"TEMP Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 57 | set "TMP_FOLDER=%%A" 58 | set "TMP_FOLDER=!TMP_FOLDER:~12!" 59 | ) 60 | FOR /F "delims=" %%A IN ('findstr /C:"TARGET Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 61 | set "TARGET_FOLDER=%%A" 62 | set "TARGET_FOLDER=!TARGET_FOLDER:~14!" 63 | ) 64 | FOR /F "delims=" %%A IN ('findstr /C:"MKVTOOLNIX Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 65 | set "MKVTOOLNIX_FOLDER=%%A" 66 | set "MKVTOOLNIX_FOLDER=!MKVTOOLNIX_FOLDER:~18!" 67 | ) 68 | ) 69 | 70 | if "!TARGET_FOLDER!"=="SAME AS SOURCE" ( 71 | set "TARGET_FOLDER=%~dp1" 72 | set "TARGET_FOLDER=!TARGET_FOLDER:~0,-1!" 73 | set "TARGET_FOLDER_TYPE=SOURCE" 74 | ) 75 | if "%TMP_FOLDER%"=="SAME AS SOURCE" ( 76 | set "TMP_FOLDER=%~dp1DDVT_%Password%_TMP" 77 | ) else ( 78 | set "TMP_FOLDER=!TMP_FOLDER!\DDVT_%Password%_TMP" 79 | ) 80 | if "!MKVTOOLNIX_FOLDER!"=="INCLUDED" set "MKVTOOLNIX_FOLDER=%~dp0tools" 81 | set "MKVMERGEpath=!MKVTOOLNIX_FOLDER!\mkvmerge.exe" 82 | set "logfile=%TMP_FOLDER%\!INPUTFILENAME!.log" 83 | 84 | if not exist "%sfkpath%" set "MISSINGFILE=%sfkpath%" & goto :CORRUPTFILE 85 | if not exist "%FFMPEGpath%" set "MISSINGFILE=%FFMPEGpath%" & goto :CORRUPTFILE 86 | if not exist "%MKVMERGEpath%" set "MISSINGFILE=%MKVMERGEpath%" & goto :CORRUPTFILE 87 | if not exist "%FFPROBEpath%" set "MISSINGFILE=%FFPROBEpath%" & goto :CORRUPTFILE 88 | if not exist "%MP4BOXpath%" set "MISSINGFILE=%MP4BOXpath%" & goto :CORRUPTFILE 89 | if not exist "%MEDIAINFOpath%" set "MISSINGFILE=%MEDIAINFOpath%" & goto :CORRUPTFILE 90 | if not exist "%MP4FPSMODpath%" set "MISSINGFILE=%MP4FPSMODpath%" & goto :CORRUPTFILE 91 | if not exist "%DO_VI_TOOLpath%" set "MISSINGFILE=%DO_VI_TOOLpath%" & goto :CORRUPTFILE 92 | if not exist "%MP4MUXERpath%" set "MISSINGFILE=%MP4MUXERpath%" & goto :CORRUPTFILE 93 | if not exist "%HDR10P_TOOLpath%" set "MISSINGFILE=%HDR10P_TOOLpath%" & goto :CORRUPTFILE 94 | 95 | cls 96 | %GREEN% 97 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG 98 | echo. 99 | %WHITE% 100 | echo ==================================== 101 | %GREEN% 102 | echo Dolby Vision Tool MKVtoMP4 103 | %WHITE% 104 | echo ==================================== 105 | echo. 106 | %WHITE% 107 | echo. 108 | echo. 109 | echo == CHECK INPUT FILE ==================================================================================================== 110 | if "%~1"=="" ( 111 | %YELLOW% 112 | echo. 113 | echo No Input File. Use DDVT_MKVTOMP4.cmd "YourFilename.mkv" 114 | echo. 115 | goto EXIT 116 | ) 117 | 118 | dir /b/ad "%~1" >nul 2>nul && set DIRFOUND=TRUE 119 | if "!DIRFOUND!"=="TRUE" goto :MPREPARE 120 | if /i "%~x1"==".mkv" set "MKVExtract=TRUE" & goto CHECK 121 | 122 | goto :FALSEINPUT 123 | 124 | :CHECK 125 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 126 | echo. 127 | %CYAN% 128 | if "!DIRFOUND!"=="FALSE" echo Analysing File. Please wait... 129 | if "!DIRFOUND!"=="FALSE" echo. 130 | set "INPUTSTREAM=!INPUTFILE!" 131 | set "INFOSTREAM=!INPUTFILE!" 132 | 133 | set "VIDEO_COUNT=" 134 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%VideoCount%% "!INFOSTREAM!""') do set "VIDEO_COUNT=%%A" 135 | 136 | ::SET HDR FORMAT 137 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_String%% "!INFOSTREAM!">"!TMP_FOLDER!\Info.txt" 138 | FOR /F "delims=" %%A IN ('findstr /C:"Dolby Vision" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" 139 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10" 140 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10+" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10+" 141 | FOR /F "delims=" %%A IN ('findstr /C:"dvhe.05" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=IPT-PQ-C2" 142 | FOR /F "delims=" %%A IN ('findstr /C:"HLG" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HLG" 143 | 144 | ::SET DV FORMAT 145 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_Profile%% "!INFOSTREAM!">"!TMP_FOLDER!\Info.txt" 146 | FOR /F "delims=" %%A IN ('findstr /C:".08" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=8" 147 | FOR /F "delims=" %%A IN ('findstr /C:".07" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=7" 148 | FOR /F "delims=" %%A IN ('findstr /C:".06" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=6" 149 | FOR /F "delims=" %%A IN ('findstr /C:".05" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=5" 150 | FOR /F "delims=" %%A IN ('findstr /C:".04" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=4" 151 | FOR /F "delims=" %%A IN ('findstr /C:".03" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=3" 152 | 153 | ::DUAL LAYER OPERATION 154 | if "!VIDEO_COUNT!"=="2" ( 155 | set "LAYERTYPE= DL" 156 | set "DT=-map 0:1" 157 | "!FFMPEGpath!" -loglevel panic -i "!INFOSTREAM!" -map 0:0 -c:v copy -to 1 "!TMP_FOLDER!\BL.mkv">nul 2>&1 158 | ) 159 | if "!DVinput!"=="YES" "!FFMPEGpath!" -loglevel panic -i "!INFOSTREAM!" !DT! -c:v copy -to 1 -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" extract-rpu -o "!TMP_FOLDER!\RPU.bin" - >nul 2>&1 160 | if exist "!TMP_FOLDER!\BL.mkv" set "INFOSTREAM=!TMP_FOLDER!\BL.mkv" 161 | 162 | ::BEGIN MEDIAINFO 163 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%Width%%x%%Height%% "!INFOSTREAM!""') do set "RESOLUTION=%%A" 164 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%Format%%^-%%BitDepth%%Bit^-%%ColorSpace%%^-%%ChromaSubsampling%% "!INFOSTREAM!""') do set "CODEC_NAME=%%A" 165 | FOR /F "tokens=1,2 delims= " %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameRate_String%% "!INPUTSTREAM!""') do ( 166 | set "FRAMERATE=%%A" 167 | set "FRAMERATE_ORIG=%%A" 168 | ) 169 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameCount%% "!INPUTSTREAM!""') do set "FRAMES=%%A" 170 | if "!VIDEO_COUNT!"=="2" set "FRAMES=N/A DL" 171 | if "!HDRFormat!"=="HDR10" ( 172 | set "HDR=TRUE" 173 | %GREEN% 174 | if "!DIRFOUND!"=="FALSE" echo HDR10 found. 175 | ) 176 | if "!HDRFormat!"=="HLG" ( 177 | set "HDR=TRUE" 178 | %GREEN% 179 | if "!DIRFOUND!"=="FALSE" echo HLG found. 180 | ) 181 | if "!HDRFormat!"=="HDR10+" ( 182 | set "HDR=TRUE" 183 | set "HDR10P=TRUE" 184 | %GREEN% 185 | if "!DIRFOUND!"=="FALSE" echo HDR10+ SEI found. 186 | ) 187 | if "!DVprofile!"=="8" ( 188 | set "HDR=TRUE" 189 | set "DV=TRUE" 190 | set "DV_Profile=8" 191 | %GREEN% 192 | if "!DIRFOUND!"=="FALSE" echo Dolby Vision Profile 8 found. 193 | ) 194 | if "!DVprofile!"=="7" ( 195 | set "HDR=TRUE" 196 | set "DV=TRUE" 197 | set "DV_Profile=7" 198 | if "!RESOLUTION!"=="1920x1080" set "ELFILE=TRUE" 199 | if exist "!TMP_FOLDER!\RPU.bin" ( 200 | FOR /F "usebackq" %%A IN ('!TMP_FOLDER!\RPU.bin') DO set "RPUSIZE=%%~zA">nul 2>&1 201 | if "!RPUSIZE!" NEQ "0" ( 202 | "!DO_VI_TOOLpath!" info -s "!TMP_FOLDER!\RPU.bin">"!TMP_FOLDER!\RPUINFO.txt" 203 | if exist "!TMP_FOLDER!\RPUINFO.txt" ( 204 | FOR /F "delims=" %%A IN ('findstr /C:"Profile:" "!TMP_FOLDER!\RPUINFO.txt"') DO set "subprofile=%%A" 205 | if defined subprofile ( 206 | for /F "tokens=3 delims=:/ " %%A in ("!subprofile!") do set "subprofile= %%A" 207 | ) else ( 208 | set "subprofile=" 209 | ) 210 | ) 211 | ) 212 | ) 213 | %GREEN% 214 | if "!ELFILE!"=="FALSE" ( 215 | if "!DIRFOUND!"=="FALSE" echo Dolby Vision Profile 7!subprofile!!LAYERTYPE! found. 216 | ) else ( 217 | if "!DIRFOUND!"=="FALSE" echo Dolby Vision Profile 7!subprofile!!LAYERTYPE! EL Layer found. 218 | ) 219 | set "DV_Profile=7!subprofile!!LAYERTYPE!" 220 | ) 221 | if "!DVprofile!"=="5" ( 222 | set "HDR=FALSE" 223 | set "DV=TRUE" 224 | set "DV_Profile=5" 225 | %GREEN% 226 | if "!DIRFOUND!"=="FALSE" echo Dolby Vision Profile 5 found. 227 | ) 228 | if "!DVprofile!"=="4" ( 229 | set "HDR=TRUE" 230 | set "DV=TRUE" 231 | set "DV_Profile=4" 232 | %GREEN% 233 | if "!DIRFOUND!"=="FALSE" echo Dolby Vision Profile 4 found. 234 | ) 235 | %GREEN% 236 | if "!HDR!"=="TRUE" set "HDR_Info=!HDRFormat!" 237 | if "!HDR10P!"=="TRUE" set "HDR_Info=HDR10, !HDRFormat!" 238 | if "!DV!"=="TRUE" set "HDR_Info=Dolby Vision Profile !DV_Profile!" 239 | if "!HDR!!DV!"=="TRUETRUE" set "HDR_Info=!HDRFormat!, Dolby Vision Profile !DV_Profile!" 240 | if "!HDR10P!!DV!"=="TRUETRUE" set "HDR_Info=HDR10, !HDRFormat!, Dolby Vision Profile !DV_Profile!" 241 | echo. 242 | if "!DIRFOUND!"=="FALSE" echo Analysing complete. 243 | if "!DIRFOUND!"=="TRUE" goto :eof 244 | TIMEOUT 3 /NOBREAK>nul 245 | goto :START 246 | 247 | :MPREPARE 248 | set "SOURCE_FOLDER=%~1" 249 | set /A "FERRORCOUNT=0" & set "FERRORCOUNTC=08" 250 | set /A "DONECOUNT=0" & set "DONECOUNTC=08" 251 | set /A "SKIPCOUNT=0" & set "SKIPCOUNTC=08" 252 | set /A "PFILECOUNT=0" & set "PFILECOUNTC=08" 253 | for /F %%i in ('dir "!SOURCE_FOLDER!\*.mkv" /B /A-d') do set /A SOURCEFILES=!SOURCEFILES!+1>nul 254 | goto :START 255 | 256 | :START 257 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 258 | set "LOG_FILENAME=DDVT MKVtoMP4 (%~nx1)" 259 | if "!DV_Profile!"=="8" set "FAKEP5ALLOWED=TRUE" 260 | if "!DIRFOUND!"=="TRUE" set "FAKEP5ALLOWED=TRUE" 261 | cls 262 | %GREEN% 263 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG 264 | echo. 265 | %WHITE% 266 | echo ==================================== 267 | %GREEN% 268 | echo Dolby Vision Tool MKVtoMP4 269 | %WHITE% 270 | echo ==================================== 271 | echo. 272 | echo. 273 | if "!DIRFOUND!"=="FALSE" ( 274 | echo == VIDEO INPUT ========================================================================================================= 275 | echo. 276 | %CYAN% 277 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 278 | echo Video Info = [Resolution = !RESOLUTION!] [Codec = !CODEC_NAME!] [Frames = !FRAMES!] [FPS = !FRAMERATE!] 279 | echo HDR Info = [!HDR_Info!] 280 | ) else ( 281 | echo == MASS CONVERTER SETTINGS ============================================================================================= 282 | echo. 283 | call :colortxt 0B "Info = [MKV FILES PROCESS/SUM: " & call :colortxt !PFILECOUNTC! "!PFILECOUNT!" & call :colortxt 0B "/!SOURCEFILES!" & call :colortxt 0B "] [DONE: " & call :colortxt !DONECOUNTC! "!DONECOUNT!" & call :colortxt 0B "] [ERROR(S): " & call :colortxt !FERRORCOUNTC! "!FERRORCOUNT!" & call :colortxt 0B "] [SKIPPED: " & call :colortxt !SKIPCOUNTC! "!SKIPCOUNT!" & call :colortxt 0B "]" /n 284 | ) 285 | echo. 286 | %YELLOW% 287 | echo Be sure that there no picture based subtitles in your MKV file (PGS or VobSub)^^! 288 | echo Only textbased subtitles supported. 289 | echo. 290 | echo Please check your Audio Codec and the MP4 specifications. You can switch the 291 | echo Audio Codec if the source is not compatible with MP4 container. 292 | echo. 293 | %WHITE% 294 | echo == MENU ================================================================================================================ 295 | echo. 296 | echo 1. Audio Codec : [!AUDIOCODEC!] 297 | if "%FAKEP5ALLOWED%"=="TRUE" call :colortxt 0F "2. Fake Profile 5 : [%FAKEP5%]" & call :colortxt 0E "* *Set Option to [YES] for watching video on old [LG] or [SAMSUNG] TVs." /n 298 | echo. 299 | echo S. START 300 | echo. 301 | %GREEN% 302 | echo Change Settings and press [S] to start Converting^^! 303 | if "%FAKEP5ALLOWED%"=="TRUE" ( 304 | CHOICE /C 12S /N /M "Select a Letter 1,2,[S]tart" 305 | ) else ( 306 | CHOICE /C 1S /N /M "Select a Letter 1,[S]tart" 307 | ) 308 | if "%FAKEP5ALLOWED%"=="TRUE" ( 309 | if "%ERRORLEVEL%"=="3" ( 310 | if "%DIRFOUND%"=="TRUE" goto :MBEGIN 311 | if "%DIRFOUND%"=="FALSE" goto :BEGIN 312 | ) 313 | if "%ERRORLEVEL%"=="2" ( 314 | if "%FAKEP5%"=="YES" set "FAKEP5=NO" 315 | if "%FAKEP5%"=="NO" set "FAKEP5=YES" 316 | ) 317 | if "%ERRORLEVEL%"=="1" ( 318 | if "%AUDIOCODEC%"=="Untouched" set "AUDIOCODEC=eAC-3 @640k" 319 | if "%AUDIOCODEC%"=="eAC-3 @640k" set "AUDIOCODEC=AC-3 @640k" 320 | if "%AUDIOCODEC%"=="AC-3 @640k" set "AUDIOCODEC=AAC @High Quality" 321 | if "%AUDIOCODEC%"=="AAC @High Quality" set "AUDIOCODEC=Untouched" 322 | ) 323 | ) else ( 324 | if "%ERRORLEVEL%"=="2" goto BEGIN 325 | if "%ERRORLEVEL%"=="1" ( 326 | if "%AUDIOCODEC%"=="Untouched" set "AUDIOCODEC=eAC-3 @640k" 327 | if "%AUDIOCODEC%"=="eAC-3 @640k" set "AUDIOCODEC=AC-3 @640k" 328 | if "%AUDIOCODEC%"=="AC-3 @640k" set "AUDIOCODEC=AAC @High Quality" 329 | if "%AUDIOCODEC%"=="AAC @High Quality" set "AUDIOCODEC=Untouched" 330 | ) 331 | ) 332 | goto START 333 | 334 | :MBEGIN 335 | set "FAKEP5O=%FAKEP5%" 336 | if "!TARGET_FOLDER_TYPE!"=="SOURCE" set "TARGET_FOLDER=!TARGET_FOLDER!\%~n1" 337 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 338 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 339 | set "LOG_FILENAME=DDVT MKVtoMP4 (Folder=%~n1)" 340 | rem -------- LOGFILE ------------ 341 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG>"!logfile!" 342 | echo.>>"!logfile!" 343 | echo ====================================>>"!logfile!" 344 | echo Dolby Vision Tool MKVtoMP4>>"!logfile!" 345 | echo ====================================>>"!logfile!" 346 | echo.>>"!logfile!" 347 | echo.>>"!logfile!" 348 | echo.>>"!logfile!" 349 | echo == LOGFILE START =======================================================================================================>>"!logfile!" 350 | echo.>>"!logfile!" 351 | echo %date% %time%>>"!logfile!" 352 | echo.>>"!logfile!" 353 | for %%A in ("!SOURCE_FOLDER!\*.mkv") do ( 354 | set /A "PFILECOUNT=!PFILECOUNT!+1" 355 | if "!FERRORCOUNT!" NEQ "0" ( 356 | set "FERRORCOUNTC=0C" 357 | ) else ( 358 | set "FERRORCOUNTC=0A" 359 | ) 360 | if "!DONECOUNT!" NEQ "0" ( 361 | set "DONECOUNTC=0A" 362 | ) else ( 363 | set "DONECOUNTC=0E" 364 | ) 365 | if "!SKIPCOUNT!" NEQ "0" ( 366 | set "SKIPCOUNTC=0E" 367 | ) else ( 368 | set "SKIPCOUNTC=0A" 369 | ) 370 | if "!PFILECOUNT!" NEQ "0" set "PFILECOUNTC=0F" 371 | set "INPUTFILE=%%~dpnxA" 372 | set "INPUTFILEPATH=%%~dpA" 373 | set "INPUTFILENAME=%%~nA" 374 | set "INPUTFILEEXT=%%~xA" 375 | call :CHECK 376 | cls 377 | %GREEN% 378 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG 379 | echo. 380 | %WHITE% 381 | echo ==================================== 382 | %GREEN% 383 | echo Dolby Vision Tool MKVtoMP4 384 | %WHITE% 385 | echo ==================================== 386 | echo. 387 | echo. 388 | echo == MASS CONVERTER OPERATION ============================================================================================ 389 | echo. 390 | %CYAN% 391 | call :colortxt 0B "Info = [MKV FILES PROCESS/SUM: " & call :colortxt !PFILECOUNTC! "!PFILECOUNT!" & call :colortxt 0B "/!SOURCEFILES!" & call :colortxt 0B "] [DONE: " & call :colortxt !DONECOUNTC! "!DONECOUNT!" & call :colortxt 0B "] [ERROR(S): " & call :colortxt !FERRORCOUNTC! "!FERRORCOUNT!" & call :colortxt 0B "] [SKIPPED: " & call :colortxt !SKIPCOUNTC! "!SKIPCOUNT!" & call :colortxt 0B "]" /n 392 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 393 | echo Video Info = [Resolution = !RESOLUTION!] [Codec = !CODEC_NAME!] [Frames = !FRAMES!] [FPS = !FRAMERATE!] 394 | echo HDR Info = [!HDR_Info!] 395 | set "FAKEP5=%FAKEP5O%" 396 | if "!DV_Profile!" NEQ "8" set "FAKEP5=NO" 397 | call :BEGIN 398 | ) 399 | cls 400 | %GREEN% 401 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG 402 | echo. 403 | %WHITE% 404 | echo ==================================== 405 | %GREEN% 406 | echo Dolby Vision Tool MKVtoMP4 407 | %WHITE% 408 | echo ==================================== 409 | echo. 410 | echo. 411 | echo == MASS CONVERTER OPERATION ============================================================================================ 412 | echo. 413 | %CYAN% 414 | call :colortxt 0B "Info = [MKV FILES PROCESS/SUM: " & call :colortxt !PFILECOUNTC! "!PFILECOUNT!" & call :colortxt 0B "/!SOURCEFILES!" & call :colortxt 0B "] [DONE: " & call :colortxt !DONECOUNTC! "!DONECOUNT!" & call :colortxt 0B "] [ERROR(S): " & call :colortxt !FERRORCOUNTC! "!FERRORCOUNT!" & call :colortxt 0B "] [SKIPPED: " & call :colortxt !SKIPCOUNTC! "!SKIPCOUNT!" & call :colortxt 0B "]" /n 415 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 416 | echo Video Info = [Resolution = !RESOLUTION!] [Codec = !CODEC_NAME!] [Frames = !FRAMES!] [FPS = !FRAMERATE!] 417 | echo HDR Info = [!HDR_Info!] 418 | echo. 419 | %WHITE% 420 | echo ======================================================================================================================== 421 | echo. 422 | %GREEN% 423 | echo CONVERTING DONE^^!. 424 | echo. 425 | %YELLOW% 426 | echo Open logfile for detailed Infos. 427 | echo. 428 | echo.>>"!logfile!" 429 | echo == INFO ================================================================================================================>>"!logfile!" 430 | echo.>>"!logfile!" 431 | echo [PROCESSED FILES^: !PFILECOUNT!] [DONE^: !DONECOUNT!/!PFILECOUNT!] [SKIPPED^: !SKIPCOUNT!/!PFILECOUNT!] [ERROR^(S^)^: !FERRORCOUNT!/!PFILECOUNT!]>>"!logfile!" 432 | echo.>>"!logfile!" 433 | echo == LOGFILE END =========================================================================================================>>"!logfile!" 434 | echo.>>"!logfile!" 435 | echo %date% %time%>>"!logfile!" 436 | goto :EXIT 437 | 438 | :BEGIN 439 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 440 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 441 | set "WORKFILE=!INPUTFILE!" 442 | if "!DIRFOUND!"=="FALSE" ( 443 | rem -------- LOGFILE ------------ 444 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG>"!logfile!" 445 | echo.>>"!logfile!" 446 | echo ====================================>>"!logfile!" 447 | echo Dolby Vision Tool MKVtoMP4>>"!logfile!" 448 | echo ====================================>>"!logfile!" 449 | echo.>>"!logfile!" 450 | echo.>>"!logfile!" 451 | echo.>>"!logfile!" 452 | echo == LOGFILE START =======================================================================================================>>"!logfile!" 453 | echo.>>"!logfile!" 454 | echo %date% %time%>>"!logfile!" 455 | echo.>>"!logfile!" 456 | cls 457 | %GREEN% 458 | echo powered by quietvoids tools Copyright ^(c^) 2021-2025 QfG 459 | echo. 460 | %WHITE% 461 | echo ==================================== 462 | %GREEN% 463 | echo Dolby Vision Tool MKVtoMP4 464 | %WHITE% 465 | echo ==================================== 466 | echo. 467 | echo. 468 | echo == VIDEO INPUT ========================================================================================================= 469 | echo. 470 | %CYAN% 471 | echo Filename = [!INPUTFILENAME!] 472 | echo Video Info = [Resolution = !RESOLUTION!] [Codec = !CODEC_NAME!] [Frames = !FRAMES!] [FPS = !FRAMERATE!] 473 | echo HDR Info = [!HDR_Info!] 474 | ) 475 | echo. 476 | %WHITE% 477 | echo == CONVERTING ========================================================================================================== 478 | echo. 479 | set "duration=" 480 | if "%FRAMERATE%"=="23.976" set "duration=--fps 0:24000/1001" 481 | if "%FRAMERATE%"=="24.000" set "duration=--fps 0:24" 482 | if "%FRAMERATE%"=="25.000" set "duration=--fps 0:25" 483 | if "%FRAMERATE%"=="30.000" set "duration=--fps 0:30" 484 | if "%FRAMERATE%"=="48.000" set "duration=--fps 0:48" 485 | if "%FRAMERATE%"=="50.000" set "duration=--fps 0:50" 486 | if "%FRAMERATE%"=="60.000" set "duration=--fps 0:60" 487 | 488 | IF "%AUDIOCODEC%"=="Untouched" set "AUDIOCODECC=-c:a copy" & set "DRC=" 489 | IF "%AUDIOCODEC%"=="eAC-3 @640k" set "AUDIOCODECC=-c:a eac3 -b:a 640k" & set "DRC=-drc_scale 0" 490 | IF "%AUDIOCODEC%"=="AC-3 @640k" set "AUDIOCODECC=-c:a ac3 -b:a 640k" & set "DRC=-drc_scale 0" 491 | IF "%AUDIOCODEC%"=="AAC @High Quality" set "AUDIOCODECC=-c:a aac -vbr 5" & set "DRC=-drc_scale 0" 492 | 493 | if "!FAKEP5!"=="YES" ( 494 | %CYAN% 495 | echo Converting DV Profile 8 to fake Profile 5. Please wait... 496 | %WHITE% 497 | "!FFMPEGpath!" -loglevel panic -stats -y -i "!INPUTFILE!" -c:v copy -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\temp.hevc" 498 | if exist "!TMP_FOLDER!\temp.hevc" ( 499 | %CYAN% 500 | echo. 501 | echo Processing.Please wait... 502 | %WHITE% 503 | "!MP4MUXERpath!" --dv-profile 5 --input-file "!TMP_FOLDER!\temp.hevc" --output-file "!TMP_FOLDER!\temp.mp4">nul 504 | ) else ( 505 | %RED% 506 | echo Error. 507 | echo. 508 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 509 | ) 510 | if exist "!TMP_FOLDER!\temp.mp4" ( 511 | "!FFMPEGpath!" %DRC% -y -i "!INPUTFILE!" -i "!TMP_FOLDER!\temp.mp4" -strict experimental -loglevel panic -stats -map 1:v? -map 0:a? -map 0:s? -dn -map_chapters -1 -movflags +faststart -c:v copy !AUDIOCODECC! -c:s mov_text -strict -2 "!TARGET_FOLDER!\!INPUTFILENAME!.mp4" 512 | ) else ( 513 | %RED% 514 | echo Error. 515 | echo. 516 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 517 | ) 518 | ) else ( 519 | %CYAN% 520 | echo Converting MKV to MP4. Please wait... 521 | %WHITE% 522 | "!FFMPEGpath!" %DRC% -y -i "!INPUTFILE!" -strict experimental -loglevel panic -stats -map 0:v? -map 0:a? -map 0:s? -dn -map_chapters -1 -movflags +faststart -c:v copy !AUDIOCODECC! -c:s mov_text -strict -2 "!TARGET_FOLDER!\!INPUTFILENAME!.mp4" 523 | ) 524 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!.mp4" ( 525 | %GREEN% 526 | "!MP4FPSMODpath!" -i !duration! "!TARGET_FOLDER!\!INPUTFILENAME!.mp4" 527 | set /A DONECOUNT=!DONECOUNT!+1 528 | echo ^[!INPUTFILENAME!!INPUTFILEEXT!^] ^[AUDIO=!AUDIOCODEC!^] ^[FAKEP5=!FAKEP5!^] ^[CONVERT=DONE^] -^> ^[!INPUTFILENAME!.mp4^] >>"!logfile!" 529 | echo. 530 | ) else ( 531 | %RED% 532 | echo Error. 533 | echo ^[!INPUTFILENAME!!INPUTFILEEXT!^] ^[AUDIO=!AUDIOCODEC!^] ^[FAKEP5=!FAKEP5!^] ^[CONVERT=ERROR^^!^] >>"!logfile!" 534 | echo. 535 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 536 | set /A "FERRORCOUNT=!FERRORCOUNT!+1" 537 | ) 538 | if "!DIRFOUND!"=="TRUE" goto :eof 539 | echo.>>"!logfile!" 540 | echo == LOGFILE END =========================================================================================================>>"!logfile!" 541 | echo.>>"!logfile!" 542 | echo %date% %time%>>"!logfile!" 543 | goto :EXIT 544 | 545 | :EXIT 546 | if exist "!logfile!" move "!logfile!" "!TARGET_FOLDER!\!LOG_FILENAME!.log" >nul 547 | %WHITE% 548 | echo == CLEANING ============================================================================================================ 549 | echo. 550 | %CYAN% 551 | echo Please wait. Cleaning Temp Folder... 552 | if exist "!TMP_FOLDER!" ( 553 | RD /S /Q "!TMP_FOLDER!">nul 554 | if "%ERRORLEVEL%"=="0" ( 555 | %GREEN% 556 | echo Deleting Temp Folder - Done. 557 | ) else ( 558 | %RED% 559 | echo Deleting Temp Folder - Error. 560 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 561 | ) 562 | ) 563 | setlocal DisableDelayedExpansion 564 | ENDLOCAL 565 | %WHITE% 566 | echo. 567 | echo == EXIT ================================================================================================================ 568 | echo. 569 | if "%ERRORCOUNT%"=="0" ( 570 | %GREEN% 571 | echo All Operations successful. 572 | %WHITE% 573 | TIMEOUT 30 574 | ) else ( 575 | %RED% 576 | echo SOME Operations failed. 577 | %WHITE% 578 | TIMEOUT 30 579 | goto :ERROR 580 | ) 581 | exit 582 | 583 | :CORRUPTFILE 584 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 585 | START /B https://mega.nz/folder/x9FHlbbK#YQz_XsqcAXfZP2ciLeyyDg 586 | set "NewLine=[System.Environment]::NewLine" 587 | set "Line1=""%MISSINGFILE%"""" 588 | set "Line2=Copy the file to the directory or download and extract DDVT_tools.rar" 589 | setlocal DisableDelayedExpansion 590 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('NEEDED FILE NOT FOUND!' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT MKVtoMP4 [QfG] v%version%', 'Ok','Error')" 591 | exit 592 | 593 | :FALSEINPUT 594 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 595 | set "NewLine=[System.Environment]::NewLine" 596 | set "Line1=Unsupported Input File. Supported Files are:" 597 | set "Line2=*.mkv" 598 | setlocal DisableDelayedExpansion 599 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%INPUTFILENAME%%INPUTFILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT MKVtoMP4 [QfG] v%version%', 'Ok','Info')" 600 | exit 601 | 602 | :ERROR 603 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 604 | set "NewLine=[System.Environment]::NewLine" 605 | set "Line1=%ERRORCOUNT% Error(s) during processing^! 606 | set "Line2=Target file don''t exist or corrupt. 607 | setlocal DisableDelayedExpansion 608 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%INPUTFILENAME%%INPUTFILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT MKVtoMP4 [QfG] v%VERSION%', 'Ok','Error')" 609 | exit 610 | 611 | :CreatePassword 612 | set TempVar=%PasswordChars% 613 | set /a PWCharCount=0 614 | 615 | :CountLoop 616 | set TempVar=%TempVar:~1% 617 | set /a PWCharCount+=1 618 | if not "%TempVar%"=="" goto CountLoop 619 | set TempVar= 620 | set Length=0 621 | 622 | :GenerateLoop 623 | set /a i=%Random% %% PWCharCount 624 | set /a Length+=1 625 | set TempVar=%TempVar%!PasswordChars:~%i%,1! 626 | if not "%Length%"=="%PasswordLength%" goto GenerateLoop 627 | set %1=%TempVar% 628 | goto :eof 629 | 630 | :colortxt 631 | setlocal enableDelayedExpansion 632 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 633 | 634 | :colorPrint Color Str [/n] 635 | setlocal 636 | set "s=%~2" 637 | call :colorPrintVar %1 s %3 638 | exit /b 639 | 640 | :colorPrintVar Color StrVar [/n] 641 | if not defined DEL call :initColorPrint 642 | setlocal enableDelayedExpansion 643 | pushd . 644 | ': 645 | cd \ 646 | set "s=!%~2!" 647 | :: The single blank line within the following IN() clause is critical - DO NOT REMOVE 648 | for %%n in (^"^ 649 | 650 | ^") do ( 651 | set "s=!s:\=%%~n\%%~n!" 652 | set "s=!s:/=%%~n/%%~n!" 653 | set "s=!s::=%%~n:%%~n!" 654 | ) 655 | for /f delims^=^ eol^= %%s in ("!s!") do ( 656 | if "!" equ "" setlocal disableDelayedExpansion 657 | if %%s==\ ( 658 | findstr /a:%~1 "." "\'" nul 659 | colorPrint.txt (echo %%s\..\') 665 | findstr /a:%~1 /f:colorPrint.txt "." 666 | "%temp%\'" set /p "=." 677 | subst ': "%temp%" >nul 678 | exit /b 679 | 680 | :cleanupColorPrint 681 | 2>nul del "%temp%\'" 682 | 2>nul del "%temp%\colorPrint.txt" 683 | >nul subst ': /d 684 | exit /b 685 | -------------------------------------------------------------------------------- /DDVT_OPTIONS.cmd: -------------------------------------------------------------------------------- 1 | @echo off & setlocal 2 | mode con cols=125 lines=57 3 | set VERSION=0.65.3 beta 4 | TITLE DDVT OPTIONS [QfG] v%VERSION% 5 | 6 | rem --- Hardcoded settings. Can be changed manually --- 7 | set "sfkpath=%~dp0tools\sfk.exe" rem Path to sfk.exe 8 | 9 | rem --- Hardcoded settings. Cannot be changed --- 10 | set "TMP_FOLDER=SAME AS SOURCE" 11 | set "TARGET_FOLDER=SAME AS SOURCE" 12 | set "MKVTOOLNIX_FOLDER=INCLUDED" 13 | set "TOOLFOLDER=%~dp0" 14 | set "AVISYNTH_FOLDER=%ProgramFiles(x86)%\AviSynth+" 15 | set "LAVFILTERS_FOLDER=%ProgramFiles(x86)%\LAV Filters" 16 | set "MEDIAINFO_LOGFILE=YES" 17 | set "JSON_SUPPORT=YES" 18 | set "JSON_PROCESS=FIRST" 19 | set "FIX_SCENECUTS=YES" 20 | 21 | setlocal EnableDelayedExpansion 22 | 23 | set "NewLine=[System.Environment]::NewLine" 24 | set "Line1=Start the script with ADMINISTRATOR permissions to activate/deactivate the Windows SHELL EXTENSIONS. Without ADMINISTRATOR permissions you have insufficent rights changing Windows registry^!" 25 | START /MIN PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('!Line1!', 'DDVT OPTIONS [QfG] %VERSION%', 'Ok','Info')" 26 | 27 | set "WAIT="!sfkpath!" sleep" 28 | set "GREEN="!sfkpath!" color green" 29 | set "RED="!sfkpath!" color red" 30 | set "YELLOW="!sfkpath!" color yellow" 31 | set "WHITE="!sfkpath!" color white" 32 | set "CYAN="!sfkpath!" color cyan" 33 | set "MAGENTA="!sfkpath!" color magenta" 34 | set "GREY="!sfkpath!" color grey" 35 | 36 | ::Check for INI and Load Settings 37 | IF EXIST "!TOOLFOLDER!DDVT_OPTIONS.ini" ( 38 | FOR /F "delims=" %%A IN ('findstr /C:"TEMP Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 39 | set "TMP_FOLDER=%%A" 40 | set "TMP_FOLDER=!TMP_FOLDER:~12!" 41 | ) 42 | FOR /F "delims=" %%A IN ('findstr /C:"TARGET Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 43 | set "TARGET_FOLDER=%%A" 44 | set "TARGET_FOLDER=!TARGET_FOLDER:~14!" 45 | ) 46 | FOR /F "delims=" %%A IN ('findstr /C:"MKVTOOLNIX Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 47 | set "MKVTOOLNIX_FOLDER=%%A" 48 | set "MKVTOOLNIX_FOLDER=!MKVTOOLNIX_FOLDER:~18!" 49 | ) 50 | FOR /F "delims=" %%A IN ('findstr /C:"AVISYNTH+ Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 51 | set "AVISYNTH_FOLDER=%%A" 52 | set "AVISYNTH_FOLDER=!AVISYNTH_FOLDER:~17!" 53 | ) 54 | FOR /F "delims=" %%A IN ('findstr /C:"LAVFILTERS Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 55 | set "LAVFILTERS_FOLDER=%%A" 56 | set "LAVFILTERS_FOLDER=!LAVFILTERS_FOLDER:~18!" 57 | ) 58 | FOR /F "delims=" %%A IN ('findstr /C:"MEDIAINFO_LOGFILE=" "%~dp0DDVT_OPTIONS.ini"') DO ( 59 | set "MEDIAINFO_LOGFILE=%%A" 60 | set "MEDIAINFO_LOGFILE=!MEDIAINFO_LOGFILE:~18!" 61 | ) 62 | FOR /F "delims=" %%A IN ('findstr /C:"JSON_SUPPORT=" "%~dp0DDVT_OPTIONS.ini"') DO ( 63 | set "JSON_SUPPORT=%%A" 64 | echo "!JSON_SUPPORT!" 65 | set "JSON_SUPPORT=!JSON_SUPPORT:~13!" 66 | ) 67 | FOR /F "delims=" %%A IN ('findstr /C:"JSON_PROCESS=" "%~dp0DDVT_OPTIONS.ini"') DO ( 68 | set "JSON_PROCESS=%%A" 69 | set "JSON_PROCESS=!JSON_PROCESS:~13!" 70 | ) 71 | FOR /F "delims=" %%A IN ('findstr /C:"FIX_SCENECUTS=" "%~dp0DDVT_OPTIONS.ini"') DO ( 72 | set "FIX_SCENECUTS=%%A" 73 | set "FIX_SCENECUTS=!FIX_SCENECUTS:~14!" 74 | ) 75 | ) 76 | 77 | :MAINMENU 78 | if "!JSON_SUPPORT!"=="NO" set "JSON_PROCESS=DISABLED" 79 | if "!FIX_SCENECUTS!" NEQ "YES" ( 80 | set "COL_FIX_SCENECUTS=08" 81 | ) else ( 82 | set "COL_FIX_SCENECUTS=0A" 83 | ) 84 | if "!MEDIAINFO_LOGFILE!" NEQ "YES" ( 85 | set "COL_MEDIAINFO_LOGFILE=08" 86 | ) else ( 87 | set "COL_MEDIAINFO_LOGFILE=0A" 88 | ) 89 | if "!JSON_SUPPORT!" NEQ "YES" ( 90 | set "COL_JSON_SUPPORT=08" 91 | ) else ( 92 | set "COL_JSON_SUPPORT=0A" 93 | ) 94 | if "!JSON_PROCESS!"=="DISABLED" ( 95 | set "COL_JSON_PROCESS=08" 96 | ) else ( 97 | set "COL_JSON_PROCESS=0A" 98 | ) 99 | if "!TMP_FOLDER!"=="" set "TMP_FOLDER=SAME AS SOURCE" 100 | if "!TARGET_FOLDER!"=="" set "TARGET_FOLDER=SAME AS SOURCE" 101 | set "TMP_FOLDER_STRING=!TMP_FOLDER!\DDVT__TMP" 102 | set "TARGET_FOLDER_STRING=!TARGET_FOLDER!\_[]" 103 | set "MKVTOOLNIX_FOLDER_STRING=!MKVTOOLNIX_FOLDER!" 104 | if "!TMP_FOLDER!"=="SAME AS SOURCE" set "TMP_FOLDER_STRING=\DDVT__TMP" 105 | if "!TARGET_FOLDER!"=="SAME AS SOURCE" set "TARGET_FOLDER_STRING=\_[]" 106 | if "!MKVTOOLNIX_FOLDER!"=="INCLUDED" ( 107 | set "MKVTOOLNIX_FOLDER_STRING=\tools" 108 | set "MKVTOOLNIX_REAL_FOLDER=!TOOLFOLDER!tools" 109 | ) else ( 110 | set "MKVTOOLNIX_REAL_FOLDER=!MKVTOOLNIX_FOLDER!" 111 | ) 112 | if exist "!MKVTOOLNIX_REAL_FOLDER!\mkvextract.exe" ( 113 | set "MKVTOOLNIX_STAT=call :colortxt 0A "OK"" 114 | ) else ( 115 | set "MKVTOOLNIX_STAT=call :colortxt 0C "FAILED"" 116 | ) 117 | if exist "!AVISYNTH_FOLDER!\plugins+\DirectShowSource.dll" ( 118 | set "AVISYNTH_STAT=call :colortxt 0A "OK"" 119 | ) else ( 120 | set "AVISYNTH_STAT=call :colortxt 0C "FAILED"" 121 | ) 122 | if exist "!LAVFILTERS_FOLDER!\x64\LAVSplitter.ax" ( 123 | set "LAVFILTER_STAT=call :colortxt 0A "OK"" 124 | ) else ( 125 | set "LAVFILTER_STAT=call :colortxt 0C "FAILED"" 126 | ) 127 | cls 128 | %GREEN% 129 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 130 | echo. 131 | %WHITE% 132 | echo ==================================== 133 | %GREEN% 134 | echo Dolby Vision Tool OPTIONS 135 | %WHITE% 136 | echo ==================================== 137 | echo. 138 | %WHITE% 139 | echo. 140 | echo. 141 | echo == FOLDERS ============================================================================================================= 142 | echo. 143 | %CYAN% 144 | echo TEMP FOLDER = !TMP_FOLDER_STRING! 145 | echo OUTPUT FOLDER = !TARGET_FOLDER_STRING! 146 | call :colortxt 0B "MKVTOOLNIX FOLDER = !MKVTOOLNIX_FOLDER_STRING! [" & !MKVTOOLNIX_STAT! & call :colortxt 0B "]" /n 147 | call :colortxt 0B "AVISYNTH+ FOLDER = !AVISYNTH_FOLDER! [" & !AVISYNTH_STAT! & call :colortxt 0B "]" /n 148 | call :colortxt 0B "LAV Filters FOLDER = !LAVFILTERS_FOLDER! [" & !LAVFILTER_STAT! & call :colortxt 0B "]" /n 149 | echo. 150 | %WHITE% 151 | echo == OPTIONS MENU ======================================================================================================== 152 | echo. 153 | %GREEN% 154 | echo 1. Set TEMP Directory 155 | echo 2. Set OUTPUT Directory 156 | echo 3. Set MKVTOOLNIX Directory 157 | echo 4. Set AVISYNTH+ Directory [Also you can install AVISYNTH+ via this switch] 158 | echo 5. Set LAV Filters Directory [Also you can install LAV Filters via this switch] 159 | %WHITE% 160 | echo. 161 | call :colortxt 0F "M. MediaInfo Logfile [" & call :colortxt !COL_MEDIAINFO_LOGFILE! "!MEDIAINFO_LOGFILE!" & call :colortxt 0F "]" /n 162 | call :colortxt 0F "C. Injector Custom Edit Support [" & call :colortxt !COL_JSON_SUPPORT! "!JSON_SUPPORT!" & call :colortxt 0F "]" /n 163 | call :colortxt 0F "P. Injector Custom Edit Processing [" & call :colortxt !COL_JSON_PROCESS! "!JSON_PROCESS!" & call :colortxt 0F "]" /n 164 | call :colortxt 0F "F. Fix Scenecut Flags [" & call :colortxt !COL_FIX_SCENECUTS! "!FIX_SCENECUTS!" & call :colortxt 0F "]" /n 165 | echo. 166 | echo 6. Create Shell Extensions 167 | echo 7. Delete Shell Extensions 168 | echo. 169 | %GREEN% 170 | echo S. SAVE SETTINGS 171 | %WHITE% 172 | echo E. Exit 173 | echo. 174 | %GREEN% 175 | echo Change Settings or press [E] to Exit^^! 176 | CHOICE /C 12345MCPF67SE /N /M "Select a Letter 1,2,3,4,5,M,C,P,F,6,7,[S]ave,[E]xit" 177 | 178 | if "%ERRORLEVEL%"=="13" goto EXIT 179 | if "%ERRORLEVEL%"=="12" ( 180 | ( 181 | echo :: INI File for DDVT. Do not modify, using DDVT_OPTIONS.cmd. 182 | echo. 183 | echo -------------------------- 184 | echo TEMP Folder=!TMP_FOLDER! 185 | echo TARGET Folder=!TARGET_FOLDER! 186 | echo MKVTOOLNIX Folder=!MKVTOOLNIX_FOLDER! 187 | echo AVISYNTH+ Folder=!AVISYNTH_FOLDER! 188 | echo LAVFILTERS Folder=!LAVFILTERS_FOLDER! 189 | echo MEDIAINFO_LOGFILE=!MEDIAINFO_LOGFILE! 190 | echo JSON_SUPPORT=!JSON_SUPPORT! 191 | echo JSON_PROCESS=!JSON_PROCESS! 192 | echo FIX_SCENECUTS=!FIX_SCENECUTS! 193 | echo -------------------------- 194 | )>"!TOOLFOLDER!DDVT_OPTIONS.ini" 195 | echo. 196 | %GREEN% 197 | echo Settings Saved. 198 | %WAIT% 1000 199 | ) 200 | if "%ERRORLEVEL%"=="11" ( 201 | reg delete "HKCR\*\Shell\DDVT Demuxer" /f>nul 2>&1 202 | reg delete "HKCR\*\Shell\DDVT Injector" /f>nul 2>&1 203 | reg delete "HKCR\*\Shell\MenuDDVT" /f>nul 2>&1 204 | reg delete "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /f>nul 2>&1 205 | reg delete "HKCU\Software\Classes\*\Shell\QFG_DVFINDER" /f>nul 2>&1 206 | reg delete "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO" /f>nul 2>&1 207 | reg delete "HKCU\Software\Classes\*\Shell\DDVT MEDIAINFO" /f>nul 2>&1 208 | reg delete "HKCU\Software\Classes\Directory\shell\05MKVTOMP4" /f>nul 2>&1 209 | echo. 210 | %GREEN% 211 | echo Registry strings deleted. 212 | %WAIT% 1000 213 | ) 214 | if "%ERRORLEVEL%"=="10" ( 215 | reg delete "HKCR\*\Shell\DDVT Demuxer" /f>nul 2>&1 216 | reg delete "HKCR\*\Shell\DDVT Injector" /f>nul 2>&1 217 | reg delete "HKCR\*\Shell\MenuDDVT" /f>nul 2>&1 218 | reg delete "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /f>nul 2>&1 219 | reg delete "HKCU\Software\Classes\*\Shell\QFG_DVFINDER" /f>nul 2>&1 220 | reg delete "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO" /f>nul 2>&1 221 | reg delete "HKCU\Software\Classes\*\Shell\DDVT MEDIAINFO" /f>nul 2>&1 222 | reg delete "HKCU\Software\Classes\Directory\shell\05MKVTOMP4" /f>nul 2>&1 223 | reg add "HKCU\Software\Classes\Directory\shell\05MKVTOMP4" /ve /d "Convert MKVs to MP4 in Folder" /f>nul 2>&1 224 | reg add "HKCU\Software\Classes\Directory\shell\05MKVTOMP4" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\MKVTOMP4.ico\",0" /f>nul 2>&1 225 | reg add "HKCU\Software\Classes\Directory\shell\05MKVTOMP4" /v "Position" /t REG_SZ /d "Top" /f>nul 2>&1 226 | reg add "HKCU\Software\Classes\Directory\shell\05MKVTOMP4\command" /ve /d "\"!TOOLFOLDER!DDVT_MKVTOMP4.cmd\" ""%%1""" /f>nul 2>&1 227 | reg add "HKCU\Software\Classes\*\Shell\DDVT MEDIAINFO" /ve /d "DDVT MediaInfo" /f>nul 2>&1 228 | reg add "HKCU\Software\Classes\*\Shell\DDVT MEDIAINFO" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\MEDIAINFO.ico\",0" /f>nul 2>&1 229 | reg add "HKCU\Software\Classes\*\Shell\DDVT MEDIAINFO" /v "Position" /t REG_SZ /d "Top" /f>nul 2>&1 230 | reg add "HKCU\Software\Classes\*\Shell\DDVT MEDIAINFO\command" /ve /d "\"!TOOLFOLDER!DDVT_MEDIAINFO.cmd\" ""%%1""" /f>nul 2>&1 231 | reg add "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO" /ve /d "DDVT QuickInfo" /f>nul 2>&1 232 | reg add "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\QUICKINFO.ico\",0" /f>nul 2>&1 233 | reg add "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO" /v "Position" /t REG_SZ /d "Top" /f>nul 2>&1 234 | reg add "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO\command" /ve /d "\"!TOOLFOLDER!DDVT_MEDIAINFO.cmd\" ""%%1\"" -MSGBOX" /f>nul 2>&1 235 | if "!ERRORLEVEL!"=="1" reg add "HKCU\Software\Classes\*\Shell\DDVT QUICKINFO\command" /ve /d "\"!TOOLFOLDER!DDVT_MEDIAINFO.cmd\" ""%%1"" -MSGBOX" /f>nul 2>&1 236 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /ve /d "DDVT" /f>nul 2>&1 237 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\DDVT.ico\",0" /f>nul 2>&1 238 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /v "ExtendedSubCommandsKey" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\DDVT.ico\",0" /f>nul 2>&1 239 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\Background\Shell\MenuDDVT\ContextMenu" /f>nul 2>&1 240 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT" /v "Position" /t REG_SZ /d "Top" /f>nul 2>&1 241 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT\ContextMenu\shell\01HYBRID" /ve /d "Profile 8 Hybrid" /f>nul 2>&1 242 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT\ContextMenu\shell\01HYBRID" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\HYBRID.ico\",0" /f>nul 2>&1 243 | reg add "HKLM\Software\Classes\Directory\Background\Shell\MenuDDVT\ContextMenu\shell\01HYBRID\command" /ve /d "\"!TOOLFOLDER!DDVT_HYBRID.cmd\" " /f>nul 2>&1 244 | reg add "HKCR\*\Shell\MenuDDVT" /ve /d "DDVT" /f>nul 2>&1 245 | reg add "HKCR\*\Shell\MenuDDVT" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\DDVT.ico\",0" /f>nul 2>&1 246 | reg add "HKCR\*\Shell\MenuDDVT" /v "ExtendedSubCommandsKey" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\DDVT.ico\",0" /f>nul 2>&1 247 | reg add "HKCR\*\Shell\MenuDDVT" /v "ExtendedSubCommandsKey" /t REG_SZ /d "*\Shell\MenuDDVT\ContextMenu" /f>nul 2>&1 248 | reg add "HKCR\*\Shell\MenuDDVT" /v "Position" /t REG_SZ /d "Top" /f>nul 2>&1 249 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\01DEMUXER" /ve /d "Demuxer" /f>nul 2>&1 250 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\01DEMUXER" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\DEMUXER.ico\",0" /f>nul 2>&1 251 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\01DEMUXER\command" /ve /d "\"!TOOLFOLDER!DDVT_DEMUXER.cmd\" ""%%1""" /f>nul 2>&1 252 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\02INJECTOR" /ve /d "Injector" /f>nul 2>&1 253 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\02INJECTOR" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\INJECTOR.ico\",0" /f>nul 2>&1 254 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\02INJECTOR\command" /ve /d "\"!TOOLFOLDER!DDVT_INJECTOR.cmd\" ""%%1""" /f>nul 2>&1 255 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\03HYBRID" /ve /d "Profile 8 Hybrid" /f>nul 2>&1 256 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\03HYBRID" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\HYBRID.ico\",0" /f>nul 2>&1 257 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\03HYBRID\command" /ve /d "\"!TOOLFOLDER!DDVT_HYBRID.cmd\" ""%%1""" /f>nul 2>&1 258 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\04REMOVER" /ve /d "Remover" /f>nul 2>&1 259 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\04REMOVER" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\REMOVER.ico\",0" /f>nul 2>&1 260 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\04REMOVER\command" /ve /d "\"!TOOLFOLDER!DDVT_REMOVER.cmd\" ""%%1""" /f>nul 2>&1 261 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\05FILEINFO" /ve /d "FileInfo" /f>nul 2>&1 262 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\05FILEINFO" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\QUICKINFO.ico\",0" /f>nul 2>&1 263 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\05FILEINFO\command" /ve /d "\"!TOOLFOLDER!DDVT_FILEINFO.cmd\" ""%%1""" /f>nul 2>&1 264 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\06FILECHECK" /ve /d "SyncCheck" /f>nul 2>&1 265 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\06FILECHECK" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\SYNCCHECK.ico\",0" /f>nul 2>&1 266 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\06FILECHECK\command" /ve /d "\"!TOOLFOLDER!DDVT_FILEINFO.cmd\" ""%%1\"" -CHECK" /f>nul 2>&1 267 | if "!ERRORLEVEL!"=="1" reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\06FILECHECK\command" /ve /d "\"!TOOLFOLDER!DDVT_FILEINFO.cmd\" ""%%1"" -CHECK" /f>nul 2>&1 268 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\07MKVTOMP4" /ve /d "MKV to MP4" /f>nul 2>&1 269 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\07MKVTOMP4" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\MKVTOMP4.ico\",0" /f>nul 2>&1 270 | reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\07MKVTOMP4\command" /ve /d "\"!TOOLFOLDER!DDVT_MKVTOMP4.cmd\" ""%%1""" /f>nul 2>&1 271 | if exist "!TOOLFOLDER!DDVT_GENERATOR.cmd" reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\08GENERATE" /ve /d "RPU Generator" /f>nul 2>&1 272 | if exist "!TOOLFOLDER!DDVT_GENERATOR.cmd" reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\08GENERATE" /v "Icon" /t REG_SZ /d "\"!TOOLFOLDER!tools\ICONS\GENERATOR.ico\",0" /f>nul 2>&1 273 | if exist "!TOOLFOLDER!DDVT_GENERATOR.cmd" reg add "HKCR\*\Shell\MenuDDVT\ContextMenu\shell\08GENERATE\command" /ve /d "\"!TOOLFOLDER!DDVT_GENERATOR.cmd\" ""%%1""" /f>nul 2>&1 274 | echo. 275 | %GREEN% 276 | echo Registry strings set. 277 | %WAIT% 1000 278 | ) 279 | if "%ERRORLEVEL%"=="9" ( 280 | if "%FIX_SCENECUTS%"=="YES" set "FIX_SCENECUTS=NO" 281 | if "%FIX_SCENECUTS%"=="NO" set "FIX_SCENECUTS=YES" 282 | ) 283 | if "%ERRORLEVEL%"=="8" ( 284 | if "%JSON_PROCESS%"=="FIRST" set "JSON_PROCESS=LAST" 285 | if "%JSON_PROCESS%"=="LAST" set "JSON_PROCESS=FIRST" 286 | ) 287 | if "%ERRORLEVEL%"=="7" ( 288 | if "%JSON_SUPPORT%"=="YES" set "JSON_SUPPORT=NO" & set "JSON_PROCESS=DISABLED" 289 | if "%JSON_SUPPORT%"=="NO" set "JSON_SUPPORT=YES" & set "JSON_PROCESS=FIRST" 290 | ) 291 | if "%ERRORLEVEL%"=="6" ( 292 | if "%MEDIAINFO_LOGFILE%"=="YES" set "MEDIAINFO_LOGFILE=NO" 293 | if "%MEDIAINFO_LOGFILE%"=="NO" set "MEDIAINFO_LOGFILE=YES" 294 | ) 295 | if "%ERRORLEVEL%"=="5" ( 296 | %YELLOW% 297 | echo. 298 | echo If you must install LAV Filters leave blank and hit [ENTER]^ for installing^^! 299 | echo Don't forget to [S]AVE your settings after editing^^! 300 | %WHITE% 301 | set /p "LAVFILTERS_FOLDER=:>" || "!TOOLFOLDER!tools\Install\LAVFilters-0.79.2-Installer.exe" 302 | goto MAINMENU 303 | ) 304 | if "%ERRORLEVEL%"=="4" ( 305 | %YELLOW% 306 | echo. 307 | echo If you must install AVISYNTH+ leave blank and hit [ENTER]^ for installing^^! 308 | echo Don't forget to [S]AVE your settings after editing^^! 309 | %WHITE% 310 | set /p "AVISYNTH_FOLDER=:>" || "!TOOLFOLDER!tools\Install\AviSynthPlus_3.7.3_20230715.exe" 311 | goto MAINMENU 312 | ) 313 | if "%ERRORLEVEL%"=="3" ( 314 | %YELLOW% 315 | echo. 316 | echo If you will use the INCLUDED MKVTOOLNIX SET leave blank an press [ENTER]^^! 317 | echo Don't forget to [S]AVE your settings after editing^^! 318 | %WHITE% 319 | set /p "MKVTOOLNIX_FOLDER=:>" || SET "MKVTOOLNIX_FOLDER=INCLUDED" 320 | ) 321 | if "%ERRORLEVEL%"=="2" ( 322 | %YELLOW% 323 | echo. 324 | echo If you will use the STANDARD SOURCE folder leave blank an press [ENTER]^^! 325 | echo Don't forget to [S]AVE your settings after editing^^! 326 | %WHITE% 327 | set /p "TARGET_FOLDER=Type in your OUTPUT Folder and press [ENTER]:" || SET "TARGET_FOLDER=SAME AS SOURCE" 328 | ) 329 | if "%ERRORLEVEL%"=="1" ( 330 | %YELLOW% 331 | echo. 332 | echo If you will use the STANDARD TEMP folder leave blank an press [ENTER]^^! 333 | echo Don't forget to [S]AVE your settings after editing^^! 334 | %WHITE% 335 | set /p "TMP_FOLDER=Type in your TEMP Folder and press [ENTER]:" || SET "TMP_FOLDER=SAME AS SOURCE" 336 | ) 337 | goto MAINMENU 338 | 339 | :colortxt 340 | setlocal enableDelayedExpansion 341 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 342 | 343 | :colorPrint Color Str [/n] 344 | setlocal 345 | set "s=%~2" 346 | call :colorPrintVar %1 s %3 347 | exit /b 348 | 349 | :colorPrintVar Color StrVar [/n] 350 | if not defined DEL call :initColorPrint 351 | setlocal enableDelayedExpansion 352 | pushd . 353 | ': 354 | cd \ 355 | set "s=!%~2!" 356 | :: The single blank line within the following IN() clause is critical - DO NOT REMOVE 357 | for %%n in (^"^ 358 | 359 | ^") do ( 360 | set "s=!s:\=%%~n\%%~n!" 361 | set "s=!s:/=%%~n/%%~n!" 362 | set "s=!s::=%%~n:%%~n!" 363 | ) 364 | for /f delims^=^ eol^= %%s in ("!s!") do ( 365 | if "!" equ "" setlocal disableDelayedExpansion 366 | if %%s==\ ( 367 | findstr /a:%~1 "." "\'" nul 368 | colorPrint.txt (echo %%s\..\') 374 | findstr /a:%~1 /f:colorPrint.txt "." 375 | "%temp%\'" set /p "=." 386 | subst ': "%temp%" >nul 387 | exit /b 388 | 389 | 390 | :cleanupColorPrint 391 | 2>nul del "%temp%\'" 392 | 2>nul del "%temp%\colorPrint.txt" 393 | >nul subst ': /d 394 | exit /b 395 | 396 | :EXIT 397 | %WHITE% 398 | setlocal DisableDelayedExpansion 399 | ENDLOCAL 400 | echo. 401 | echo == EXIT ================================================================================================================ 402 | echo. 403 | exit -------------------------------------------------------------------------------- /DDVT_REMOVER.cmd: -------------------------------------------------------------------------------- 1 | @echo off & setlocal 2 | mode con cols=125 lines=35 3 | FOR /F "tokens=2 delims==" %%A IN ('findstr /C:"VERSION=" "%~dp0DDVT_OPTIONS.cmd"') DO set "VERSION=%%A" 4 | TITLE DDVT Remover [QfG] v%VERSION% 5 | 6 | set PasswordChars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 7 | set PasswordLength=5 8 | call :CreatePassword Password 9 | 10 | set "sfkpath=%~dp0tools\sfk.exe" rem Path to sfk.exe 11 | set "MP4BOXpath=%~dp0tools\mp4box.exe" rem Path to mp4box.exe 12 | set "MEDIAINFOpath=%~dp0tools\mediainfo.exe" rem Path to mediainfo.exe 13 | set "FFMPEGpath=%~dp0tools\ffmpeg.exe" rem Path to ffmpeg.exe 14 | set "DO_VI_TOOLpath=%~dp0tools\dovi_tool.exe" rem Path to dovi_tool.exe 15 | set "HDR10Plus_TOOLpath=%~dp0tools\hdr10plus_tool.exe" rem Path to hdr10plus_tool.exe 16 | 17 | rem --- Hardcoded settings. Can be changed manually --- 18 | set "REM_HDR10P=YES 19 | :: YES / NO - Remove HDR10+ Metadata from file. 20 | set "REM_DV=NO 21 | :: YES / NO - Remove DV Metadata from file. 22 | 23 | rem --- Hardcoded settings. Cannot be changed --- 24 | set "INPUTFILE=%~dpnx1" 25 | set "INPUTFILEPATH=%~dp1" 26 | set "INPUTFILENAME=%~n1" 27 | set "INPUTFILEEXT=%~x1" 28 | set "TMP_FOLDER=SAME AS SOURCE" 29 | set "TARGET_FOLDER=SAME AS SOURCE" 30 | set "MKVTOOLNIX_FOLDER=INCLUDED" 31 | set "MP4Extract=FALSE" 32 | set "MKVExtract=FALSE" 33 | set "HDR_Info=No HDR Infos found" 34 | set "RAW_FILE=FALSE" 35 | set "ELFILE=FALSE" 36 | set "HDR=FALSE" 37 | set "HDR10P=FALSE" 38 | set "DV=FALSE" 39 | set "HDR=No HDR Infos found" 40 | set "RESOLUTION=N/A" 41 | set "CODEC_NAME=N/A" 42 | set "FRAMERATE=N/A" 43 | set "FRAMES=N/A" 44 | set /a ERRORCOUNT=0" 45 | 46 | setlocal EnableDelayedExpansion 47 | set "WAIT="!sfkpath!" sleep" 48 | set "GREEN="!sfkpath!" color green" 49 | set "RED="!sfkpath!" color red" 50 | set "YELLOW="!sfkpath!" color yellow" 51 | set "WHITE="!sfkpath!" color white" 52 | set "CYAN="!sfkpath!" color cyan" 53 | set "MAGENTA="!sfkpath!" color magenta" 54 | set "GREY="!sfkpath!" color grey" 55 | 56 | ::Check for INI and Load Settings 57 | if exist "%~dp0DDVT_OPTIONS.ini" ( 58 | FOR /F "delims=" %%A IN ('findstr /C:"TEMP Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 59 | set "TMP_FOLDER=%%A" 60 | set "TMP_FOLDER=!TMP_FOLDER:~12!" 61 | ) 62 | FOR /F "delims=" %%A IN ('findstr /C:"TARGET Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 63 | set "TARGET_FOLDER=%%A" 64 | set "TARGET_FOLDER=!TARGET_FOLDER:~14!" 65 | ) 66 | FOR /F "delims=" %%A IN ('findstr /C:"MKVTOOLNIX Folder=" "%~dp0DDVT_OPTIONS.ini"') DO ( 67 | set "MKVTOOLNIX_FOLDER=%%A" 68 | set "MKVTOOLNIX_FOLDER=!MKVTOOLNIX_FOLDER:~18!" 69 | ) 70 | ) 71 | if "%TMP_FOLDER%"=="SAME AS SOURCE" ( 72 | set "TMP_FOLDER=%~dp1DDVT_%Password%_TMP" 73 | ) else ( 74 | set "TMP_FOLDER=!TMP_FOLDER!\DDVT_%Password%_TMP" 75 | ) 76 | if "!TARGET_FOLDER!"=="SAME AS SOURCE" ( 77 | set "TARGET_FOLDER=%~dp1" 78 | set "TARGET_FOLDER=!TARGET_FOLDER:~0,-1!" 79 | ) 80 | if "!MKVTOOLNIX_FOLDER!"=="INCLUDED" set "MKVTOOLNIX_FOLDER=%~dp0tools" 81 | set "MKVMERGEpath=!MKVTOOLNIX_FOLDER!\mkvmerge.exe" 82 | 83 | if not exist "%sfkpath%" set "MISSINGFILE=%sfkpath%" & goto :CORRUPTFILE 84 | if not exist "%FFMPEGpath%" set "MISSINGFILE=%FFMPEGpath%" & goto :CORRUPTFILE 85 | if not exist "%MKVMERGEpath%" set "MISSINGFILE=%MKVMERGEpath%" & goto :CORRUPTFILE 86 | if not exist "%MP4BOXpath%" set "MISSINGFILE=%MP4BOXpath%" & goto :CORRUPTFILE 87 | if not exist "%MEDIAINFOpath%" set "MISSINGFILE=%MEDIAINFOpath%" & goto :CORRUPTFILE 88 | if not exist "%HDR10Plus_TOOLpath%" set "MISSINGFILE=%HDR10Plus_TOOLpath%" & goto :CORRUPTFILE 89 | if not exist "%DO_VI_TOOLpath%" set "MISSINGFILE=%DO_VI_TOOLpath%" & goto :CORRUPTFILE 90 | 91 | if /i "%~x1"==".hevc" set "RAW_FILE=TRUE" & goto CHECK 92 | if /i "%~x1"==".h265" set "RAW_FILE=TRUE" & goto CHECK 93 | if /i "%~x1"==".mkv" set "MKVExtract=TRUE" & goto CHECK 94 | if /i "%~x1"==".mp4" set "MP4Extract=TRUE" & goto CHECK 95 | 96 | if not "!INPUTFILE!"=="" goto :FALSEINPUT 97 | 98 | :CHECK 99 | cls 100 | %GREEN% 101 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 102 | echo. 103 | %WHITE% 104 | echo ==================================== 105 | %GREEN% 106 | echo Dolby Vision Tool REMOVER 107 | %WHITE% 108 | echo ==================================== 109 | echo. 110 | echo. 111 | echo == CHECK INPUT FILE ==================================================================================================== 112 | if "%~1"=="" ( 113 | %YELLOW% 114 | echo. 115 | echo No Input File. Use DDVT_REMOVER.cmd "YourFilename.hevc/h265/mkv/mp4" 116 | %WHITE% 117 | echo. 118 | goto :EXIT 119 | ) 120 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%VideoCount%% "!INPUTFILE!""') do set "VIDEO_COUNT=%%A" 121 | if "!VIDEO_COUNT!" NEQ "1" ( 122 | %YELLOW% 123 | echo. 124 | echo No Support for Dual Layer Container^^! 125 | %WHITE% 126 | echo. 127 | goto :EXIT 128 | ) 129 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 130 | echo. 131 | %CYAN% 132 | echo Analysing File. Please wait... 133 | echo. 134 | set "INPUTSTREAM=!INPUTFILE!" 135 | set "INFOSTREAM=!INPUTFILE!" 136 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=General;%%VideoCount%% "!INFOSTREAM!""') do set "VIDEO_COUNT=%%A" 137 | if "!RAW_FILE!!VIDEO_COUNT!"=="TRUE1" ( 138 | "!MKVMERGEpath!" --ui-language en --priority higher --output ^"!TMP_FOLDER!\Info.mkv^" --language 0:und --compression 0:none ^"^(^" ^"!INPUTFILE!^" ^"^)^" --split parts:00:00:00-00:00:01 -q 139 | if exist "!TMP_FOLDER!\Info.mkv" set "INFOSTREAM=!TMP_FOLDER!\Info.mkv" 140 | ) 141 | ::SET HDR FORMAT 142 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_String%% "!INFOSTREAM!">"!TMP_FOLDER!\Info.txt" 143 | FOR /F "delims=" %%A IN ('findstr /C:"Dolby Vision" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" 144 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10" 145 | FOR /F "delims=" %%A IN ('findstr /C:"HDR10+" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HDR10+" 146 | FOR /F "delims=" %%A IN ('findstr /C:"dvhe.05" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=IPT-PQ-C2" 147 | FOR /F "delims=" %%A IN ('findstr /C:"HLG" "!TMP_FOLDER!\Info.txt"') DO set "HDRFormat=HLG" 148 | 149 | ::SET DV FORMAT 150 | "!MEDIAINFOpath!" --output=Video;%%HDR_Format_Profile%% "!INFOSTREAM!">"!TMP_FOLDER!\Info.txt" 151 | FOR /F "delims=" %%A IN ('findstr /C:".08" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=8" 152 | FOR /F "delims=" %%A IN ('findstr /C:".07" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=7" 153 | FOR /F "delims=" %%A IN ('findstr /C:".06" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=6" 154 | FOR /F "delims=" %%A IN ('findstr /C:".05" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=5" 155 | FOR /F "delims=" %%A IN ('findstr /C:".04" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=4" 156 | FOR /F "delims=" %%A IN ('findstr /C:".03" "!TMP_FOLDER!\Info.txt"') DO set "DVinput=YES" & set "DVprofile=3" 157 | 158 | ::DUAL LAYER OPERATION 159 | if "!VIDEO_COUNT!"=="2" ( 160 | set "LAYERTYPE= DL" 161 | set "DT=-map 0:1" 162 | "!FFMPEGpath!" -loglevel panic -i "!INFOSTREAM!" -map 0:0 -c:v copy -to 1 "!TMP_FOLDER!\BL.mkv">nul 2>&1 163 | ) 164 | if "!DVinput!"=="YES" "!FFMPEGpath!" -loglevel panic -i "!INFOSTREAM!" !DT! -c:v copy -to 1 -bsf:v hevc_metadata -f hevc - | "!DO_VI_TOOLpath!" extract-rpu -o "!TMP_FOLDER!\RPU.bin" - >nul 2>&1 165 | if exist "!TMP_FOLDER!\BL.mkv" set "INFOSTREAM=!TMP_FOLDER!\BL.mkv" 166 | 167 | ::BEGIN MEDIAINFO 168 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%Width%%x%%Height%% "!INFOSTREAM!""') do set "RESOLUTION=%%A" 169 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%Format%%^-%%BitDepth%%Bit^-%%ColorSpace%%^-%%ChromaSubsampling%% "!INFOSTREAM!""') do set "CODEC_NAME=%%A" 170 | FOR /F "tokens=1,2 delims= " %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameRate_String%% "!INPUTSTREAM!""') do ( 171 | set "FRAMERATE=%%A" 172 | set "FRAMERATE_ORIG=%%A" 173 | ) 174 | FOR /F "delims=" %%A in ('""!MEDIAINFOpath!" --output=Video;%%FrameCount%% "!INPUTSTREAM!""') do set "FRAMES=%%A" 175 | if "!VIDEO_COUNT!"=="2" set "FRAMES=N/A DL" 176 | if "!HDRFormat!"=="HDR10" ( 177 | set "HDR=TRUE" 178 | %GREEN% 179 | echo HDR10 found. 180 | ) 181 | if "!HDRFormat!"=="HLG" ( 182 | set "HDR=TRUE" 183 | %GREEN% 184 | echo HLG found. 185 | ) 186 | if "!HDRFormat!"=="HDR10+" ( 187 | set "HDR=TRUE" 188 | set "HDR10P=TRUE" 189 | %GREEN% 190 | echo HDR10+ SEI found. 191 | ) 192 | if "!DVprofile!"=="8" ( 193 | set "HDR=TRUE" 194 | set "DV=TRUE" 195 | set "DV_Profile=8" 196 | %GREEN% 197 | echo Dolby Vision Profile 8 found. 198 | ) 199 | if "!DVprofile!"=="7" ( 200 | set "HDR=TRUE" 201 | set "DV=TRUE" 202 | set "DV_Profile=7" 203 | if "!RESOLUTION!"=="1920x1080" set "ELFILE=TRUE" 204 | if exist "!TMP_FOLDER!\RPU.bin" ( 205 | FOR /F "usebackq" %%A IN ('!TMP_FOLDER!\RPU.bin') DO set "RPUSIZE=%%~zA">nul 2>&1 206 | if "!RPUSIZE!" NEQ "0" ( 207 | "!DO_VI_TOOLpath!" info -s "!TMP_FOLDER!\RPU.bin">"!TMP_FOLDER!\RPUINFO.txt" 208 | if exist "!TMP_FOLDER!\RPUINFO.txt" ( 209 | FOR /F "delims=" %%A IN ('findstr /C:"Profile:" "!TMP_FOLDER!\RPUINFO.txt"') DO set "subprofile=%%A" 210 | if defined subprofile ( 211 | for /F "tokens=3 delims=:/ " %%A in ("!subprofile!") do set "subprofile= %%A" 212 | ) else ( 213 | set "subprofile=" 214 | ) 215 | ) 216 | ) 217 | ) 218 | %GREEN% 219 | if "!ELFILE!"=="TRUE" ( 220 | echo Dolby Vision Profile 7!subprofile!!LAYERTYPE! EL found. 221 | ) else ( 222 | echo Dolby Vision Profile 7!subprofile!!LAYERTYPE! found. 223 | ) 224 | set "DV_Profile=7!subprofile!!LAYERTYPE!" 225 | ) 226 | if "!DVprofile!"=="5" ( 227 | set "HDR=FALSE" 228 | set "DV=TRUE" 229 | set "DV_Profile=5" 230 | %GREEN% 231 | echo Dolby Vision Profile 5 found. 232 | ) 233 | if "!DVprofile!"=="4" ( 234 | set "HDR=TRUE" 235 | set "DV=TRUE" 236 | set "DV_Profile=4" 237 | %GREEN% 238 | echo Dolby Vision Profile 4 found. 239 | ) 240 | %GREEN% 241 | if exist "!TMP_FOLDER!\Info.mkv" del "!TMP_FOLDER!\Info.mkv">nul 242 | if exist "!TMP_FOLDER!\BL.mkv" del "!TMP_FOLDER!\BL.mkv">nul 243 | if exist "!TMP_FOLDER!\RPU.bin" del "!TMP_FOLDER!\RPU.bin">nul 244 | if "!HDR!"=="TRUE" set "HDR_Info=!HDRFormat!" 245 | if "!HDR10P!"=="TRUE" set "HDR_Info=HDR10, !HDRFormat!" 246 | if "!DV!"=="TRUE" set "HDR_Info=Dolby Vision Profile !DV_Profile!" 247 | if "!HDR!!DV!"=="TRUETRUE" set "HDR_Info=!HDRFormat!, Dolby Vision Profile !DV_Profile!" 248 | if "!HDR10P!!DV!"=="TRUETRUE" set "HDR_Info=HDR10, !HDRFormat!, Dolby Vision Profile !DV_Profile!" 249 | echo. 250 | echo Analysing complete. 251 | 252 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 253 | 254 | TIMEOUT 3 /NOBREAK>nul 255 | 256 | if "!HDR10P!!DV!"=="FALSEFALSE" ( 257 | %YELLOW% 258 | echo. 259 | echo No Dolby Vision or HDR10+ Metadata Found. 260 | echo Nothing to do^^! 261 | echo. 262 | goto :EXIT 263 | ) 264 | 265 | :START 266 | set "NAMESTRING=" 267 | if "!HDRFormat!"=="HDR10+" set "HDRFormat=HDR10" 268 | set "HDR_InfoO=%HDR_Info%" 269 | if "!HDR10P!!REM_HDR10P!"=="TRUEYES" set "HDR_InfoO=HDR10" 270 | if "!HDR10P!!REM_HDR10P!!DV!"=="TRUEYESTRUE" set "HDR_InfoO=HDR10, Dolby Vision Profile !DV_Profile!" 271 | if "!DV!!REM_DV!"=="TRUEYES" set "HDR_InfoO=!HDRFormat!" 272 | if "!DV!!REM_DV!!HDR10P!"=="TRUEYESTRUE" set "HDR_InfoO=HDR10, HDR10+" 273 | if "!HDR10P!!REM_HDR10P!!DV!!REM_DV!"=="TRUEYESTRUEYES" set "HDR_InfoO=!HDRFormat!" 274 | if "!HDR10P!!REM_HDR10P!"=="TRUEYES" set "NAMESTRING=_[No HDR10+]" 275 | if "!DV!!REM_DV!"=="TRUEYES" set "NAMESTRING=_[No DV]" 276 | if "!HDR10P!!REM_HDR10P!!DV!!REM_DV!"=="TRUEYESTRUEYES" set "NAMESTRING=_[No HDR10+ No DV]" 277 | 278 | cls 279 | %GREEN% 280 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 281 | echo. 282 | %WHITE% 283 | echo ==================================== 284 | %GREEN% 285 | echo Dolby Vision Tool REMOVER 286 | %WHITE% 287 | echo ==================================== 288 | echo. 289 | echo. 290 | echo == VIDEO INPUT ========================================================================================================= 291 | echo. 292 | %CYAN% 293 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 294 | echo Video Info = [Resolution = %RESOLUTION%] [Codec = %CODEC_NAME%] [Frames = %FRAMES%] [FPS = %FRAMERATE%] 295 | echo HDR Info = [%HDR_Info%] 296 | echo. 297 | %WHITE% 298 | echo == FILE OUTPUT ========================================================================================================= 299 | echo. 300 | %YELLOW% 301 | echo Filename = [!INPUTFILENAME!!NAMESTRING!!INPUTFILEEXT!] 302 | echo Video Info = [Resolution = %RESOLUTION%] [Codec = %CODEC_NAME%] [Frames = %FRAMES%] [FPS = %FRAMERATE%] 303 | echo HDR Info = [!HDR_InfoO!] 304 | echo. 305 | %WHITE% 306 | echo == MENU ================================================================================================================ 307 | echo. 308 | if "%HDR10P%"=="TRUE" echo 1. Remove HDR10+ : [%REM_HDR10P%] 309 | if "%DV%"=="TRUE" echo 2. Remove Dolby Vision : [%REM_DV%] 310 | echo. 311 | %WHITE% 312 | echo S. START 313 | echo. 314 | %GREEN% 315 | echo Change Settings and press [S] to start Extracting^^! 316 | if "%HDR10P%"=="TRUE" if "%DV%"=="TRUE" CHOICE /C 12S /N /M "Select a Letter 1,2,[S]tart" 317 | if "%HDR10P%"=="TRUE" if "%DV%"=="FALSE" CHOICE /C 12S /N /M "Select a Letter 1,[S]tart" 318 | if "%HDR10P%"=="FALSE" if "%DV%"=="TRUE" CHOICE /C 12S /N /M "Select a Letter 2,[S]tart" 319 | if "%ERRORLEVEL%"=="3" goto :OPERATION 320 | if "%ERRORLEVEL%"=="2" ( 321 | if "%REM_DV%"=="NO" set "REM_DV=YES" 322 | if "%REM_DV%"=="YES" set "REM_DV=NO" 323 | ) 324 | if "%ERRORLEVEL%"=="1" ( 325 | if "%REM_HDR10P%"=="NO" set "REM_HDR10P=YES" 326 | if "%REM_HDR10P%"=="YES" set "REM_HDR10P=NO" 327 | ) 328 | goto START 329 | 330 | :OPERATION 331 | mode con cols=125 lines=65 332 | if not exist "!TMP_FOLDER!" MD "!TMP_FOLDER!">nul 333 | if not exist "!TARGET_FOLDER!" MD "!TARGET_FOLDER!">nul 334 | cls 335 | %GREEN% 336 | echo powered by quietvoids tools Copyright (c) 2021-2025 QfG 337 | echo. 338 | %WHITE% 339 | echo ==================================== 340 | %GREEN% 341 | echo Dolby Vision Tool REMOVER 342 | %WHITE% 343 | echo ==================================== 344 | echo. 345 | echo. 346 | echo == VIDEO INPUT ========================================================================================================= 347 | echo. 348 | %CYAN% 349 | echo Filename = [!INPUTFILENAME!!INPUTFILEEXT!] 350 | echo Video Info = [Resolution = %RESOLUTION%] [Codec = %CODEC_NAME%] [Frames = %FRAMES%] [FPS = %FRAMERATE%] 351 | echo HDR Info = [%HDR_Info%] 352 | echo. 353 | %WHITE% 354 | echo == FILE OUTPUT ========================================================================================================= 355 | echo. 356 | %YELLOW% 357 | echo Filename = [!INPUTFILENAME!!NAMESTRING!!INPUTFILEEXT!] 358 | echo Video Info = [Resolution = %RESOLUTION%] [Codec = %CODEC_NAME%] [Frames = %FRAMES%] [FPS = %FRAMERATE%] 359 | echo HDR Info = [!HDR_InfoO!] 360 | echo. 361 | %WHITE% 362 | echo == REMOVING ============================================================================================================ 363 | echo. 364 | %CYAN% 365 | if "%HDR10P%"=="TRUE" echo Remove HDR10+ : [%REM_HDR10P%] 366 | if "%DV%"=="TRUE" echo Remove Dolby Vision : [%REM_DV%] 367 | if "%REM_HDR10P%%REM_DV%"=="NONO" echo All options set to [NO]. Exiting... & goto :EXIT 368 | if "%RAW_FILE%"=="FALSE" ( 369 | call :DEMUX 370 | ) else ( 371 | call :NODEMUX 372 | ) 373 | if "%HDR10P%%REM_HDR10P%"=="TRUEYES" call :REMOVE_HDR10+ 374 | if "%DV%%REM_DV%"=="TRUEYES" call :REMOVE_DV 375 | if "%RAW_FILE%"=="FALSE" ( 376 | call :MUX 377 | ) else ( 378 | call :POSTRAW 379 | ) 380 | goto :EXIT 381 | 382 | :NODEMUX 383 | %WHITE% 384 | echo. 385 | echo == COPYING ============================================================================================================= 386 | echo. 387 | %CYAN% 388 | echo Please wait. Copy Stream to Temp folder... 389 | copy "!INPUTFILE!" "!TMP_FOLDER!\temp.hevc">nul 390 | if exist "!TMP_FOLDER!\temp.hevc" ( 391 | %GREEN% 392 | echo Done. 393 | set "VIDEOSTREAM=!TMP_FOLDER!\temp.hevc" 394 | echo. 395 | ) else ( 396 | %RED% 397 | echo Error. 398 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 399 | echo. 400 | ) 401 | goto :eof 402 | 403 | :DEMUX 404 | %WHITE% 405 | echo. 406 | echo == DEMUXING ============================================================================================================ 407 | echo. 408 | %YELLOW% 409 | echo ATTENTION^^! You need a lot of HDD Space for this operation. 410 | echo. 411 | %CYAN% 412 | echo Please wait. Extracting Video Layer... 413 | %WHITE% 414 | "!FFMPEGpath!" -loglevel panic -stats -i "!INPUTFILE!" -c:v copy -bsf:v hevc_metadata -f hevc "!TMP_FOLDER!\temp.hevc" 415 | if exist "!TMP_FOLDER!\temp.hevc" ( 416 | %GREEN% 417 | echo Done. 418 | set "VIDEOSTREAM=!TMP_FOLDER!\temp.hevc" 419 | echo. 420 | ) else ( 421 | %RED% 422 | echo Error. 423 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 424 | echo. 425 | ) 426 | goto :eof 427 | 428 | :REMOVE_HDR10+ 429 | %WHITE% 430 | echo == REMOVING HDR10+ ===================================================================================================== 431 | echo. 432 | if "%REM_HDR10P%"=="YES" if "%HDR10P%"=="TRUE" ( 433 | %CYAN% 434 | echo Please wait. Removing HDR10+ SEI... 435 | %WHITE% 436 | PUSHD "!TMP_FOLDER!" 437 | "%HDR10Plus_TOOLpath%" remove "!VIDEOSTREAM!" -o "!TMP_FOLDER!\BL_NOHDR10P.hevc" 438 | POPD 439 | if "%ERRORLEVEL%"=="0" ( 440 | %GREEN% 441 | echo Done. 442 | set "VIDEOSTREAM=!TMP_FOLDER!\BL_NOHDR10P.hevc" 443 | echo. 444 | ) else ( 445 | %RED% 446 | echo Error. 447 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 448 | echo. 449 | ) 450 | ) 451 | goto :eof 452 | 453 | :REMOVE_DV 454 | %WHITE% 455 | echo == REMOVING Dolby Vision =============================================================================================== 456 | echo. 457 | %CYAN% 458 | echo Please wait. Removing Dolby Vision Metadata... 459 | %WHITE% 460 | PUSHD "!TMP_FOLDER!" 461 | "%DO_VI_TOOLpath%" demux "!VIDEOSTREAM!" 462 | POPD 463 | if "%ERRORLEVEL%"=="0" ( 464 | %GREEN% 465 | set "VIDEOSTREAM=!TMP_FOLDER!\BL.hevc" 466 | echo Done. 467 | echo. 468 | ) else ( 469 | %RED% 470 | echo Error. 471 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 472 | echo. 473 | ) 474 | goto :eof 475 | 476 | :POSTRAW 477 | %CYAN% 478 | echo Please wait. Moving RAW Stream to Target Folder... 479 | move "!VIDEOSTREAM!" "!TARGET_FOLDER!\!INPUTFILEO!!NAMESTRING!.hevc">nul 480 | if exist "!TARGET_FOLDER!\!INPUTFILEO!!NAMESTRING!.hevc ( 481 | %GREEN% 482 | echo Done. 483 | echo. 484 | ) else ( 485 | %RED% 486 | echo Error. 487 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 488 | echo. 489 | ) 490 | goto :eof 491 | 492 | :MUX 493 | %WHITE% 494 | echo == MUXING ============================================================================================================== 495 | echo. 496 | if "%MKVExtract%"=="TRUE" ( 497 | set "duration=" 498 | SETLOCAL ENABLEDELAYEDEXPANSION 499 | if "!FRAMERATE!"=="23.976" set "duration=--default-duration 0:24000/1001p --fix-bitstream-timing-information 0:1" 500 | if "!FRAMERATE!"=="24.000" set "duration=--default-duration 0:24p --fix-bitstream-timing-information 0:1" 501 | if "!FRAMERATE!"=="25.000" set "duration=--default-duration 0:25p --fix-bitstream-timing-information 0:1" 502 | if "!FRAMERATE!"=="30.000" set "duration=--default-duration 0:30p --fix-bitstream-timing-information 0:1" 503 | if "!FRAMERATE!"=="48.000" set "duration=--default-duration 0:48p --fix-bitstream-timing-information 0:1" 504 | if "!FRAMERATE!"=="50.000" set "duration=--default-duration 0:50p --fix-bitstream-timing-information 0:1" 505 | if "!FRAMERATE!"=="60.000" set "duration=--default-duration 0:60p --fix-bitstream-timing-information 0:1" 506 | %CYAN% 507 | echo Please wait. Muxing Videostream into Container... 508 | %YELLOW% 509 | echo Don't close the "Muxing !INPUTFILENAME! into MKV" cmd window. 510 | start /WAIT /MIN "Muxing !INPUTFILENAME! into MKV" "!MKVMERGEpath!" --ui-language en --priority higher --output ^"!TARGET_FOLDER!\!INPUTFILENAME!!NAMESTRING!.mkv^" --stop-after-video-ends --no-video ^"^(^" ^"!INPUTFILE!^" ^"^)^" --language 0:und --compression 0:none !duration! ^"^(^" ^"!VIDEOSTREAM!^" ^"^)^" --track-order 1:0 511 | if exist "!TARGET_FOLDER!\!INPUTFILENAME!!NAMESTRING!.mkv" ( 512 | %GREEN% 513 | echo Done. 514 | echo. 515 | ) else ( 516 | %RED% 517 | echo Error. 518 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 519 | echo. 520 | ) 521 | ) 522 | 523 | if "%MP4Extract%"=="TRUE" ( 524 | %CYAN% 525 | echo Please wait. Muxing !INPUTFILENAME! into MP4... 526 | %WHITE% 527 | "!MP4BOXpath!" -rem 1 "!INPUTFILE!" -out "!TMP_FOLDER!\temp.mp4" 528 | "!MP4BOXpath!" -add "!VIDEOSTREAM!:ID=1:fps=!FRAMERATE!:name=" "!TMP_FOLDER!\temp.mp4" -out "!TARGET_FOLDER!\!INPUTFILENAME!!NAMESTRING!.mp4" 529 | if exist "!TMP_FOLDER!\temp.mp4" del "!TMP_FOLDER!\temp.mp4" 530 | if "%ERRORLEVEL%"=="0" ( 531 | %GREEN% 532 | echo Done. 533 | echo. 534 | ) else ( 535 | %RED% 536 | echo Error. 537 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 538 | echo. 539 | ) 540 | ) 541 | goto :eof 542 | 543 | :EXIT 544 | %WHITE% 545 | echo == CLEANING ============================================================================================================ 546 | echo. 547 | %CYAN% 548 | echo Please wait. Cleaning and Moving files... 549 | if exist "!TMP_FOLDER!" ( 550 | RD /S /Q "!TMP_FOLDER!">nul 551 | if "%ERRORLEVEL%"=="0" ( 552 | %GREEN% 553 | echo Deleting Temp Folder - Done. 554 | ) else ( 555 | %RED% 556 | echo Deleting Temp Folder - Error. 557 | set /a "ERRORCOUNT=!ERRORCOUNT!+1" 558 | ) 559 | ) 560 | setlocal DisableDelayedExpansion 561 | ENDLOCAL 562 | %WHITE% 563 | echo. 564 | echo == EXIT ================================================================================================================ 565 | echo. 566 | if "%ERRORCOUNT%"=="0" ( 567 | %GREEN% 568 | echo All Operations successful. 569 | %WHITE% 570 | TIMEOUT 30 571 | ) else ( 572 | %RED% 573 | echo SOME Operations failed. 574 | %WHITE% 575 | TIMEOUT 30 576 | goto :ERROR 577 | ) 578 | exit 579 | 580 | :CORRUPTFILE 581 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 582 | START /B https://mega.nz/folder/x9FHlbbK#YQz_XsqcAXfZP2ciLeyyDg 583 | set "NewLine=[System.Environment]::NewLine" 584 | set "Line1=""%MISSINGFILE%"""" 585 | set "Line2=Copy the file to the directory or download and extract DDVT_tools.rar" 586 | setlocal DisableDelayedExpansion 587 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('NEEDED FILE NOT FOUND!' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT Remover [QfG] v%VERSION%', 'Ok','Error')" 588 | exit 589 | 590 | :FALSEINPUT 591 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 592 | set "NewLine=[System.Environment]::NewLine" 593 | set "Line1=Unsupported Input File. Supported Files are:" 594 | set "Line2=*.mkv | *.mp4 | *.h265 | *.hevc" 595 | setlocal DisableDelayedExpansion 596 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%INPUTFILENAME%%INPUTFILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT Remover [QfG] v%VERSION%', 'Ok','Info')" 597 | exit 598 | 599 | :ERROR 600 | if exist "!TMP_FOLDER!" RD /S /Q "!TMP_FOLDER!">nul 601 | set "NewLine=[System.Environment]::NewLine" 602 | set "Line1=%ERRORCOUNT% Error(s) during processing^! 603 | set "Line2=Target file don''t exist or corrupt. 604 | setlocal DisableDelayedExpansion 605 | START /B PowerShell -WindowStyle Hidden -Command "Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('%INPUTFILENAME%%INPUTFILEEXT%' + %NewLine% + %NewLine% + '%Line1%' + %NewLine% + %NewLine% + '%Line2%', 'DDVT Remover [QfG] v%VERSION%', 'Ok','Error')" 606 | exit 607 | 608 | :CreatePassword 609 | set TempVar=%PasswordChars% 610 | set /a PWCharCount=0 611 | 612 | :CountLoop 613 | set TempVar=%TempVar:~1% 614 | set /a PWCharCount+=1 615 | if not "%TempVar%"=="" goto CountLoop 616 | set TempVar= 617 | set Length=0 618 | 619 | :GenerateLoop 620 | set /a i=%Random% %% PWCharCount 621 | set /a Length+=1 622 | set TempVar=%TempVar%!PasswordChars:~%i%,1! 623 | if not "%Length%"=="%PasswordLength%" goto GenerateLoop 624 | set %1=%TempVar% 625 | goto :eof 626 | 627 | :colortxt 628 | setlocal enableDelayedExpansion 629 | ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 630 | 631 | :colorPrint Color Str [/n] 632 | setlocal 633 | set "s=%~2" 634 | call :colorPrintVar %1 s %3 635 | exit /b 636 | 637 | :colorPrintVar Color StrVar [/n] 638 | if not defined DEL call :initColorPrint 639 | setlocal enableDelayedExpansion 640 | pushd . 641 | ': 642 | cd \ 643 | set "s=!%~2!" 644 | :: The single blank line within the following IN() clause is critical - DO NOT REMOVE 645 | for %%n in (^"^ 646 | 647 | ^") do ( 648 | set "s=!s:\=%%~n\%%~n!" 649 | set "s=!s:/=%%~n/%%~n!" 650 | set "s=!s::=%%~n:%%~n!" 651 | ) 652 | for /f delims^=^ eol^= %%s in ("!s!") do ( 653 | if "!" equ "" setlocal disableDelayedExpansion 654 | if %%s==\ ( 655 | findstr /a:%~1 "." "\'" nul 656 | colorPrint.txt (echo %%s\..\') 662 | findstr /a:%~1 /f:colorPrint.txt "." 663 | "%temp%\'" set /p "=." 674 | subst ': "%temp%" >nul 675 | exit /b 676 | 677 | 678 | :cleanupColorPrint 679 | 2>nul del "%temp%\'" 680 | 2>nul del "%temp%\colorPrint.txt" 681 | >nul subst ': /d 682 | exit /b -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Donalds Dolby Vision Tool (DDVT) 2 | ================================== 3 | 4 | NEEDED 3RD PARTY TOOLS CAN BE FOUND HERE: 5 | 6 | [](https://mega.nz/folder/x9FHlbbK#YQz_XsqcAXfZP2ciLeyyDg) 7 | 8 | -------------------------------------------- 9 | CREDITS to quietvoid, yuseope, Atak_Snajpera 10 | -------------------------------------------- 11 | DESCRIPTION: 12 | ------------ 13 | A little toolbox that works with quietvoids dolby_vision and HDR10plus tool. 14 | For every function exists an own script. Script list: 15 | =========================================================================== 16 | 17 | - SCRIPT 18 | 19 | DESCRIPTION: 20 | ------------ 21 | Setting Menu. You can set folders for Output und Temp Directories. Contains a 22 | function to set / delete shell extensions for the tool. 23 | IF YOUR CHANGES TAKES NO EFFECT RUN AS ADMINISTRATOR! 24 | 25 | USAGE: 26 | ------ 27 | DDVT_OPTIONS 28 | 29 | =========================================================================== 30 | 31 | - SCRIPT 32 | 33 | DESCRIPTION: 34 | ------------ 35 | Creates a list of MediaInfos from videos. Also DoVi levels and profiles. 36 | Logfile can be turned ON/OFF via DDVT_OPTIONS.cmd. With the Switch -MSGBOX 37 | a small MS MSG box shows the main values (Quickcheck). 38 | 39 | USAGE: 40 | ------ 41 | DDVT_MEDIAINFO .hevc/mkv/mp4/ts/m2ts/bin/avi 42 | 43 | DDVT_MEDIAINFO .hevc/mkv/mp4/ts/m2ts/bin/avi -MSGBOX 44 | 45 | =========================================================================== 46 | 47 | - SCRIPT 48 | 49 | DESCRIPTION: 50 | ------------ 51 | Can demux EL/DL Layers, RPUs and HDR10+ metadata. Many subfunctions, like to 52 | convert RPUs and removing HDR10+ metadata. 53 | 54 | USAGE: 55 | ------ 56 | DDVT_DEMUXER .hevc/mkv/mp4/bin/m2ts 57 | 58 | =========================================================================== 59 | 60 | - SCRIPT 61 | 62 | DESCRIPTION: 63 | ------------ 64 | Can mux EL Layers or RPUs into Base Layer. Also can mux HDR10+ Matadata into 65 | file. Contains a little Editor for cropping functions. You can set Delays for 66 | HDR10+ Metadata or RPUs and many other features: 67 | 68 | FEATURES: 69 | --------- 70 | Start Script with sourcefile. Now you have following features: 71 | Drag 'n' Drop "EL.hevc" into script will start P7 build options. 72 | Drag 'n' Drop "RPU.bin" into script will start P8 build options. 73 | Drag 'n' Drop "HDR10Plus.json" into script will start HDR10+ build options. 74 | Drag 'n' Drop "EDIT.json" into script allows custom EDIT options. 75 | You can add DV, HDR10+ Metadata and Custom files to inject all in one step. 76 | Custom JSON Support can be disabled via options. 77 | 78 | Examples how to edit a JSON 79 | file can be found here: 80 | https://github.com/quietvoid/dovi_tool/tree/main/assets/editor_examples 81 | 82 | USAGE: 83 | ------ 84 | DDVT_INJECTOR .hevc/mkv/mp4/bin 85 | 86 | =========================================================================== 87 | 88 | - SCRIPT 89 | 90 | DESCRIPTION: 91 | ------------ 92 | Simply does what it means. Removes DV and/or HDR10+ metadata from streams. 93 | 94 | USAGE: 95 | ------ 96 | DDVT_REMOVER .hevc/mkv/mp4 97 | 98 | =========================================================================== 99 | 100 | - SCRIPT 101 | 102 | DESCRIPTION: 103 | ------------ 104 | Creates DV / HDR10+brightness metadata into a graph. The output is a PNG image. 105 | Also creates a JSON file next the sourcefile with RPU infos from the choosen frame. 106 | Usefull if you will check fast cropping values or CM Version. Use ALL for exporting 107 | all frames from an RPU to valid JSON file. Also a Json file with all scene cuts will 108 | be created. All files will be readable formatted. Attention! first frame of a 109 | videofile is frame 0 NOT frame 1! Can fix bad cropped RPUs, too. Also can be used with 110 | switch "-CHECK" for jumping directly to the SyncCheck area. 111 | 112 | USAGE: 113 | ------ 114 | DDVT_FILEINFO .hevc/mkv/mp4/bin 115 | 116 | DDVT_FILEINFO .hevc/mkv/mp4/bin -CHECK 117 | 118 | =========================================================================== 119 | 120 | - SCRIPT 121 | 122 | DESCRIPTION: 123 | ------------ 124 | A simple converter from mkv container to mk4 container. Containes an audio 125 | converter from not supported mp4 audio files to supported E-AC3, AC3, AAC. 126 | Attention: Works not with graphic based subtitles how PGS or VOBSUB. You must 127 | demux graphic based subtitles first. Works with single files or folders. 128 | 129 | USAGE: 130 | ------ 131 | DDVT_MKVTOMP4 .mkv 132 | DDVT_MKVTOMP4 133 | 134 | =========================================================================== 135 | 136 | - SCRIPT 137 | 138 | DESCRIPTION: 139 | ------------ 140 | Simple quick script to create a DV Profile 8 Hybrid Release. Only add HDR 141 | and DV File (No RAW file Support, only MKV/MP4 Container) set the options 142 | and Go. Completely simplified and the fastest script to Build Profile 8.1 Files. 143 | Also you can Input only a HDR10+ file without DV Input file and you create 144 | a Profile 8.1 DV file based on the HDR10+ Metadata. 145 | 146 | USAGE: 147 | ------ 148 | DDVT_HYBRID 149 | 150 | ========================================================================== 151 | 152 | Help and discussions on DOOM9 Forum. Thanks to the community for help and support. 153 | If you paid for this tool, fuck off the guy who sold it. I don't need money, if 154 | you will support this project, support the guys from the credits! 155 | 156 | =========================================================================== 157 | 158 | USEFUL LINKS: 159 | ------------- 160 | DOOM9 Forum Thread: 161 | https://forum.doom9.org/showthread.php?t=183479 162 | --------------------------------------------------------------------------------