JustPaste.it

1) MODE.I=  DoVi Inject/Convert/Edit/Re-sync TWO INPUTS (P8 Hybrid Maker/Injector)
2) MODE.F=  DoVi Fix/Edit/Extract/Verify/Info ONE INPUT
3) MODE.H=  DoVi Maker from HDR10 (Dolby Algo or MadVR or HDR10+)
4) MODE.7=  DoVi Profile 7 Input (MKV/BDMV)
5) MODE.B=  DoVi MKV Batch Muxer
6) MODE.P=  Plotter
7) MODE.S=  Screenshots & Player
8) MODE.M=  MIXED: Audio/Remover/Encoder/Playlist/Sample
9) Exit

Choice? [1,2,3,4,5,6,7,8,9]?1

     *********************
     * CHOOSE A WORKFLOW *
     *********************

1) Workflow.1= Base Layer video + any DoVi file
2) Workflow.2= Batch convert/inject
3) Workflow.3= back to the main menu

Choice? [1,2,3]?1
-------------------------------------------------------------------------------
-- This workflow inject / convert / edit DV from two input (BL + RPU)
-- Input can be MKV/TS/M2TS/MP4/HEVC/RPU/XML/HDR10plus.json/P5/P8/P7
-- Can inject any dynamic metadata to any base layer.
-- Can Crop, Edit L5/L6, convert RPU and Resync
-- If you want to inject P5 to P5, add "P5BL" in the base layer input filename
-------------------------------------------------------------------------------
  Drag and drop an HDR10 file(BL)(MKV/TS/M2TS/HEVC/H265) and press enter...
D:\HDR10.FLAC.mkv

  Drag and drop a Dolby Vision file (RPU/XML/MKV/MP4/TS/M2TS/HEVC/H265) and press enter...
"D:\p5 cropped.mkv"

  Do you want to edit L6... y or n ? (Default=n) and/or press enter...
y
  Do you want to re-sync the RPU? If yes, enter a frame number. E.G.: -24 or 24 and/or press enter...
-24
Parsing RPU file...
Exporting serialized RPU list...
Done.


        **************
        * INPUT INFO *
        **************

--> L5 Left offset: MISSING
--> L5 Right offset: MISSING
--> L5 Top offset: MISSING
--> L5 Bottom offset: MISSING
--> DoVi Profile: 5
--> L2 trims: YES (100nits)
--> DoVi source min_pq: 50 nits
--> DoVi source max_pq: 4000 nits
--> HDR10 BL input MDL: "min: 0.0001 cd/m2, max: 1000 cd/m2"


  Manual or Auto L5... a or m ? and/or press enter...

  Set the left border... choose a number and press enter...

  Set the right border... choose a number and press enter...

  Set the top border... choose a number and press enter...
280
  Set the bottom border... choose a number and press enter...
280
reading input tracks format/id/language...
done.


        ***************
        * DEMUXING BL *
        ***************

Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'F:\temp.folder\BL.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --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-libaribb24 --enable-libaribcaption --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-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --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-libcodec2 --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      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
[matroska,webm @ 0000022a35ff9740] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 0000022a35ff9740] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from 'D:\p5 cropped.mkv':
  Metadata:
    encoder         : libebml v1.4.4 + libmatroska v1.7.1
  Duration: 00:05:00.14, start: 0.000000, bitrate: 29193 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x1600 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS             : 24802877
      DURATION        : 00:05:00.133000000
      NUMBER_OF_FRAMES: 7196
      NUMBER_OF_BYTES : 930520251
      _STATISTICS_WRITING_APP: mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Side data:
      DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s32p (24 bit) (default)
    Metadata:
      BPS             : 4304975
      DURATION        : 00:05:00.139000000
      NUMBER_OF_FRAMES: 28138
      NUMBER_OF_BYTES : 161511376
      _STATISTICS_WRITING_APP: mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS             : 57612
      DURATION        : 00:04:15.588000000
      NUMBER_OF_FRAMES: 167
      NUMBER_OF_BYTES : 1840636
      _STATISTICS_WRITING_APP: mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(fre): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS             : 39473
      DURATION        : 00:04:17.341000000
      NUMBER_OF_FRAMES: 159
      NUMBER_OF_BYTES : 1269774
      _STATISTICS_WRITING_APP: mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, hevc, to 'pipe:':
  Metadata:
    encoder         : Lavf60.16.100
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x1600 [SAR 1:1 DAR 12:5], q=2-31, 23.98 fps, 23.98 tbr, 23.98 tbn (default)
    Metadata:
      BPS             : 24802877
      DURATION        : 00:05:00.133000000
      NUMBER_OF_FRAMES: 7196
      NUMBER_OF_BYTES : 930520251
      _STATISTICS_WRITING_APP: mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Side data:
      DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[out#0/hevc @ 0000022a36068580] video:908731kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
size=  908731kB time=00:04:59.92 bitrate=24820.6kbits/s speed= 580x
Reordering metadata... Done.

---> Converting P5 RPU to P8...
Done.

---> Editing L6... MDL_min=1, MDL_max=1000, Maxcll= 198, Maxfall= 2
Done.

---> Editing L5... Left=0, Right=0, Top=280, Bottom=280
Done.


---> Removing 24 frames...
Done.


          *************
          * INJECTING *
          *************

Parsing RPU file...
Processing input video for frame order info...

Warning: mismatched lengths. video 2876, RPU 7172
Metadata will be skipped at the end to match video length

Rewriting file with interleaved RPU NALs..
Parsing RPU file...
Exporting scenes list...
Done.
mkvmerge v82.0 ('I'm The President') 64-bit
'D:\HDR10.FLAC_rem.hevc': Using the demultiplexer for the format 'HEVC/H.265'.
'D:\HDR10.FLAC.mkv': Using the demultiplexer for the format 'Matroska'.
'D:\HDR10.FLAC_rem.hevc' track 0: Using the output module for the format 'HEVC/H.265 (unframed)'.
'D:\HDR10.FLAC.mkv' track 1: Using the output module for the format 'FLAC'.
'D:\HDR10.FLAC.mkv' track 2: Using the output module for the format 'HDMV PGS'.
'D:\HDR10.FLAC.mkv' track 3: Using the output module for the format 'HDMV PGS'.
The file 'D:\HDR10.FLAC_DV.mkv' has been opened for writing.
'D:\HDR10.FLAC_rem.hevc' track 0: Extracted the aspect ratio information from the video bitstream and set the display dimensions to 3840/2160.
The cue entries (the index) are being written...
Multiplexing took 2 seconds.
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,
    "coefficient_log2_denom_length": 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_minus8": 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
  },
  "rpu_data_mapping": {
    "vdr_rpu_id": 0,
    "mapping_color_space": 0,
    "mapping_chroma_format_idc": 0,
    "num_x_partitions_minus1": 0,
    "num_y_partitions_minus1": 0,
    "curves": [
      {
        "num_pivots_minus2": 0,
        "pivots": [
          0,
          1023
        ],
        "mapping_idc": "Polynomial",
        "poly_order_minus1": [
          0
        ],
        "linear_interp_flag": [
          false
        ],
        "poly_coef_int": [
          [
            0,
            1
          ]
        ],
        "poly_coef": [
          [
            0,
            0
          ]
        ]
      },
      {
        "num_pivots_minus2": 0,
        "pivots": [
          0,
          1023
        ],
        "mapping_idc": "Polynomial",
        "poly_order_minus1": [
          0
        ],
        "linear_interp_flag": [
          false
        ],
        "poly_coef_int": [
          [
            0,
            1
          ]
        ],
        "poly_coef": [
          [
            0,
            0
          ]
        ]
      },
      {
        "num_pivots_minus2": 0,
        "pivots": [
          0,
          1023
        ],
        "mapping_idc": "Polynomial",
        "poly_order_minus1": [
          0
        ],
        "linear_interp_flag": [
          false
        ],
        "poly_coef_int": [
          [
            0,
            1
          ]
        ],
        "poly_coef": [
          [
            0,
            0
          ]
        ]
      }
    ]
  },
  "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": 4,
      "ext_metadata_blocks": [
        {
          "Level1": {
            "min_pq": 0,
            "max_pq": 2369,
            "avg_pq": 819
          }
        },
        {
          "Level2": {
            "target_max_pq": 2081,
            "trim_slope": 1653,
            "trim_offset": 2099,
            "trim_power": 1713,
            "trim_chroma_weight": 2048,
            "trim_saturation_gain": 1997,
            "ms_weight": 512
          }
        },
        {
          "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": 1000,
            "min_display_mastering_luminance": 1,
            "max_content_light_level": 198,
            "max_frame_average_light_level": 2
          }
        }
      ]
    }
  },
  "rpu_data_crc32": 2750527419
}
Parsing RPU file...

Summary:
  Frames: 7172
  Profile: 8
  DM version: 1 (CM v2.9)
  Scene/shot count: 4
  RPU mastering display: 0.0050/4000 nits
  RPU content light level (L1): MaxCLL: 198.81 nits, MaxFALL: 2.43 nits
  L6 metadata: Mastering display: 0.0001/1000 nits. MaxCLL: 198 nits, MaxFALL: 2 nits
  L2 trims: 100 nits
  L5: Left=0, Right=0, Top=280, Bottom=280
Copyright (c) 2013-2024 Dolby Laboratories, Inc. All Rights Reserved
02/21/2024/08:52:11.912000000 Metadata: Validation Summary:
=========================
Metadata version: "2.0.5"
Algorithm version: 2 1
Aspect Ratios (Canvas - Image): 1.77778 - 2.4
Frame Rate: 23.976fps
Mastering Monitor: 1000-nits, P3, D65, ST.2084, Full (ID 20): Bit Depth: 16bit - Diagonal: 42.00in - Application Type: ALL - Color Info: "pq(0.0001,1000) rgb computer p3d65"
Mastering Monitor Validation Test: PASS
Target Displays Validation Test: PASS
Level6 (MaxFALL - MaxCLL): 0.00 - 0.00
Color Encoding: "u16 444 pq(0,10000) rgb computer bt2020"
Color Encoding Validation Test: PASS
Overlapping Shots Validation Test: PASS
Gap between Shots Validation Test: PASS
Negative Shot duration Validation Test: PASS
Per-Frame Data out-of-range Validation Test: PASS
Number of Shots: 4
Frame Range: 0-7171
L2 Trim Count (TargetID, count): (1, 4)
L1 Metadata Validation Test: PASS
L2 Metadata Validation Test: PASS
=========================
02/21/2024/08:52:11.913000000 metafier: No issues found in the Metadata

The script has been completed. Do you want to quit or go back to main menu (q or m default=q)?