Code: Select all
****************************
* DoVi_Scripts @RESET_9999 *
***************************
.
***************************************************************************************************************
*The output folder by default is the "Dolby-Vision-Tools" Folder, you can change it by editing this bat file
*Do not move the bat file out of the "Dolby-Vision-Tools" Folder. Make a shortcut instead.
*Select a mode, a workflow. Drag and drop an input file and wait...
***************************************************************************************************************
.
*****************
* CHOOSE A MODE *
*****************
.
Main Menu
1) MODE.XP= XML & RPU injector
2) MODE.P5= Profile 5 input to Profile 8 HYBRID MAKER
3) MODE.P7= Profile 7 input (BD/MKV/Convert/Mux/Demux/Inject)
4) MODE.H= HDR10(madVR) and HDR10plus to DoVi maker
5) MODE.B= Batch muxer: MKV to TS (DV/DD+/SUB)
6) MODE.M= MIXED: Remover/Audio/Playlist/MPV/Measurer/HDR10plus_injector and more...
7) MODE.F= RPU Fixer/Editor/Reader/Extractor/Sync-Inspect/
8) MODE.M4= MP4_muxer(P5/P7/P8)
9) Exit
Choice? [1,2,3,4,5,6,7,8,9]?4
*****************
* CHOOSE A MODE *
*****************
ECHO is off.
.
1) MODE.1= HDR10(madVR) or HDR10plus to DoVi maker
2) MODE.2= Batch convert up to 13 HDR10plus videos to DoVi
3) MODE.3= Inject DV from existing measurement file
4) MODE.4= Batch measure a folder with mkv HDR10 files (credit to manni)
5) MODE.5= Back to main menu
Choice? [1,2,3,4,5]?1
*********************
* CHOOSE A WORKFLOW *
*********************
.
1) Workflow.1= Convert 1 video + AUTO L5
2) Workflow.2= Convert 1 video + MANUAL L5
3) Workflow.3= Convert 1 video + MANUAL L5 + TrueHD_to_TrueHD.ac3 + DDP_1536kbps
4) Workflow.4= Convert 1 video + MANUAL L5 + TrueHD_to_TrueHD.ac3
5) Workflow.5= Convert 1 video + MANUAL L5 + DDP_1536kbps
6) Workflow.6= Convert 1 video + AUTO L5 + REMOVE HDR10plus (fire stick TV)
7) Workflow.7= Back to main menu
Choice? [1,2,3,4,5,6,7]?1
----------------------------------------------------------------------------------------------------
--This workflow will convert an HDR10 or HDR10plus video to DoVi and set L5 automatically
--The black bars detection may not be perfectly accurate. It's maybe better to measure them manually
----------------------------------------------------------------------------------------------------
Drag and drop your HDR10 or HDR10plus MKV/MP4/TS file and press enter...C:\D\Dolby-Vision-Tools\afgm-00001.ts
Do you want to crop RPU... y or n ? (y when HDR10-BL is cropped) and/or press enter...n
ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
[mpegts @ 0000023bec450540] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 0000023bec450540] start time for stream 4 is not set in estimate_timings_from_pts
[mpegts @ 0000023bec450540] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0000023bec450540] start time for stream 6 is not set in estimate_timings_from_pts
[mpegts @ 0000023bec450540] start time for stream 7 is not set in estimate_timings_from_pts
[mpegts @ 0000023bec450540] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0000023bec450540] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0000023bec450540] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0000023bec450540] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 0000023bec450540] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'C:\D\Dolby-Vision-Tools\afgm-00001.ts':
Duration: 02:18:01.28, start: 11.645667, bitrate: 54956 kb/s
Program 1
Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn
Stream #0:1[0x1100](eng): Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Stream #0:3[0x12a0](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:4[0x12a1](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:5[0x12a2](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:6[0x12a3](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:7[0x12a4](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Output #0, matroska, to 'I:\TEMP\chunk.mkv':
Metadata:
encoder : Lavf59.16.100
Stream #0:0: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn
Stream #0:1(eng): Audio: truehd ([255][255][255][255] / 0xFFFFFFFF), 48000 Hz, 7.1, s32 (24 bit)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 7175 fps=917 q=-1.0 Lsize= 2081513kB time=00:05:00.00 bitrate=56839.2kbits/s speed=38.3x
video:1908797kB audio:170105kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 0.125547%
Measuring the HDR10 video letterbox...
min: 0.0050 cd/m2, max: 4000 cd/m2
tsMuxeR version git-f4fa419. github.com/justdan96/tsMuxer
100.0% complete
Processed 0 video frames
100.0% complete
Flushing write buffer
Demux complete.
Demuxing time: 14 sec
SMPTE ST 2086
HDR10plus metadata not present. Generating DoVi from HDR10 with madVR...
Measuring video file "C:\D\Dolby-Vision-Tools\afgm-00001.ts" using D3D11 (native)...
Metadata:
Mastering display luminance: 0.005/4000, gamut: 0.68 0.32, 0.15 0.06, 0.265 0.69, 0.3127 0.329
MaxCLL: 10000, MaxFALL: 424 nits
Measurements:
Frames: 198552, MaxCLL 100%: 9500, 99.9%: 5486, MaxFALL: 419, AvgFALL: 23, AvgFMLL: 944 nits
Parsing madVR measurement file...
Generating metadata: Profile 8.1 (HDR10)...
Generated metadata for 198552 frames
Done.
EditConfig {
mode: 0,
remove_cmv4: false,
remove_mapping: false,
active_area: Some(
ActiveArea {
crop: false,
drop_l5: None,
presets: Some(
[
ActiveAreaOffsets {
id: 0,
left: 0,
right: 0,
top: 280,
bottom: 280,
},
],
),
edits: Some(
{
"all": 0,
},
),
},
),
remove: None,
duplicate: None,
min_pq: None,
max_pq: None,
level6: None,
level9: None,
level11: None,
}
Parsing RPU file...
Editing active area offsets...
Final metadata length: 198552
Writing RPU file...
EditConfig {
mode: 0,
remove_cmv4: false,
remove_mapping: false,
active_area: None,
remove: None,
duplicate: None,
min_pq: None,
max_pq: None,
level6: Some(
ExtMetadataBlockLevel6 {
max_display_mastering_luminance: 4000,
min_display_mastering_luminance: 50,
max_content_light_level: 10000,
max_frame_average_light_level: 424,
},
),
level9: None,
level11: None,
}
Parsing RPU file...
Final metadata length: 198552
Writing RPU file...
"left": 0
"right": 0
"top": 280
"bottom": 280
MDL.max: 4000
MDL.min: 50
Maxcll: 10000
Maxfall: 424
Display P3
injecting RPU-L6-L5.bin ...
Parsing RPU file...
Processing input video for frame order info...
Warning: mismatched lengths. video 0, RPU 198552
Metadata will be skipped at the end to match video length
Rewriting file with interleaved RPU NALs..
Parsing RPU file...
{
"dovi_profile": 8,
"header": {
"rpu_nal_prefix": 25,
"rpu_type": 2,
"rpu_format": 18,
"vdr_rpu_profile": 1,
"vdr_rpu_level": 0,
"vdr_seq_info_present_flag": true,
"chroma_resampling_explicit_filter_flag": false,
"coefficient_data_type": 0,
"coefficient_log2_denom": 23,
"vdr_rpu_normalized_idc": 1,
"bl_video_full_range_flag": false,
"bl_bit_depth_minus8": 2,
"el_bit_depth_minus8": 2,
"vdr_bit_depth_minus_8": 4,
"spatial_resampling_filter_flag": false,
"reserved_zero_3bits": 0,
"el_spatial_resampling_filter_flag": false,
"disable_residual_flag": true,
"vdr_dm_metadata_present_flag": true,
"use_prev_vdr_rpu_flag": false,
"prev_vdr_rpu_id": 0,
"vdr_rpu_id": 0,
"mapping_color_space": 0,
"mapping_chroma_format_idc": 0,
"num_pivots_minus_2": [
0,
0,
0
],
"pred_pivot_value": [
[
0,
1023
],
[
0,
1023
],
[
0,
1023
]
],
"nlq_method_idc": null,
"nlq_num_pivots_minus2": null,
"nlq_pred_pivot_value": null,
"num_x_partitions_minus1": 0,
"num_y_partitions_minus1": 0
},
"rpu_data_mapping": {
"mapping_idc": [
[
0
],
[
0
],
[
0
]
],
"mapping_param_pred_flag": [
[
false
],
[
false
],
[
false
]
],
"num_mapping_param_predictors": [
[
0
],
[
0
],
[
0
]
],
"diff_pred_part_idx_mapping_minus1": [
[],
[],
[]
],
"poly_order_minus1": [
[
0
],
[
0
],
[
0
]
],
"linear_interp_flag": [
[
false
],
[
false
],
[
false
]
],
"pred_linear_interp_value_int": [
[],
[],
[]
],
"pred_linear_interp_value": [
[],
[],
[]
],
"poly_coef_int": [
[
[
0,
1
]
],
[
[
0,
1
]
],
[
[
0,
1
]
]
],
"poly_coef": [
[
[
0,
0
]
],
[
[
0,
0
]
],
[
[
0,
0
]
]
],
"mmr_order_minus1": [
[],
[],
[]
],
"mmr_constant_int": [
[],
[],
[]
],
"mmr_constant": [
[],
[],
[]
],
"mmr_coef_int": [
[],
[],
[]
],
"mmr_coef": [
[],
[],
[]
]
},
"vdr_dm_data": {
"compressed": false,
"affected_dm_metadata_id": 0,
"current_dm_metadata_id": 0,
"scene_refresh_flag": 0,
"ycc_to_rgb_coef0": 9574,
"ycc_to_rgb_coef1": 0,
"ycc_to_rgb_coef2": 13802,
"ycc_to_rgb_coef3": 9574,
"ycc_to_rgb_coef4": -1540,
"ycc_to_rgb_coef5": -5348,
"ycc_to_rgb_coef6": 9574,
"ycc_to_rgb_coef7": 17610,
"ycc_to_rgb_coef8": 0,
"ycc_to_rgb_offset0": 16777216,
"ycc_to_rgb_offset1": 134217728,
"ycc_to_rgb_offset2": 134217728,
"rgb_to_lms_coef0": 7222,
"rgb_to_lms_coef1": 8771,
"rgb_to_lms_coef2": 390,
"rgb_to_lms_coef3": 2654,
"rgb_to_lms_coef4": 12430,
"rgb_to_lms_coef5": 1300,
"rgb_to_lms_coef6": 0,
"rgb_to_lms_coef7": 422,
"rgb_to_lms_coef8": 15962,
"signal_eotf": 65535,
"signal_eotf_param0": 0,
"signal_eotf_param1": 0,
"signal_eotf_param2": 0,
"signal_bit_depth": 12,
"signal_color_space": 0,
"signal_chroma_format": 0,
"signal_full_range_flag": 1,
"source_min_pq": 62,
"source_max_pq": 3696,
"source_diagonal": 42,
"cmv29_metadata": {
"num_ext_blocks": 3,
"ext_metadata_blocks": [
{
"Level1": {
"min_pq": 0,
"max_pq": 2962,
"avg_pq": 1447
}
},
{
"Level5": {
"active_area_left_offset": 0,
"active_area_right_offset": 0,
"active_area_top_offset": 280,
"active_area_bottom_offset": 280
}
},
{
"Level6": {
"max_display_mastering_luminance": 4000,
"min_display_mastering_luminance": 50,
"max_content_light_level": 10000,
"max_frame_average_light_level": 424
}
}
]
},
"cmv40_metadata": {
"num_ext_blocks": 3,
"ext_metadata_blocks": [
{
"Level9": {
"length": 1,
"source_primary_index": 0
}
},
{
"Level11": {
"content_type": 1,
"whitepoint": 0,
"reference_mode_flag": true,
"reserved_byte2": 0,
"reserved_byte3": 0
}
},
{
"Level254": {
"dm_mode": 0,
"dm_version_index": 2
}
}
]
}
},
"rpu_data_crc32": 1435246839
}
"The script has completed."
Press any key to continue . . .