Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [center][b][color=red][size=3]Injecting Dolby Vision from WEB-DL to HDR10 Remux[/color][/b][/center][/size]
- [b][u]FFmpeg[/b][/u]
- https://github.com/BtbN/FFmpeg-Builds/releases - use this: ffmpeg-n4.4-151-g5e61fce832-win64-gpl-4.4.zip
- Install guide: https://www.easytechguides.com/install-ffmpeg/
- [b][u]dovi_tool[/b][/u]
- https://github.com/quietvoid/dovi_tool/releases - dovi_tool-0.5.0-x86_64-pc-windows-msvc.tar.gz (check often for updates)
- For this tutorial I pick Mortal Kombat (2021). This is a case where you need to work a bit more to match frames counting from WEB-DL to Remux. If it happens like movies from other sources (web and remux) are identical (frame on frame) you can skip the JSON.bin file and editing the RPU steps.
- Good luck!
- [color=green][b]
- Windows 10 x64 OS
- dovi_tool path: D:\ENCODE\
- Open Command Prompt in Windows
- D:
- cd ENCODE[/color][/b]
- [b][u]Extract HEVC from Remux[/b][/u]
- [color=green][b]ffmpeg -i D:\MOVIES\Mortal.Kombat.2021.2160p.Remux.HEVC.HDR.TrueHD.Atmos.7.1-playBD\Mortal.Kombat.2021.2160p.Remux.HEVC.HDR.TrueHD.Atmos.7.1-playBD.mkv -c:v copy D:\ENCODE\hdr.hevc[/color][/b]
- [b][u]Extracting RPU.bin and converting from Profile 5 to Profile 8 (dvhe.05.06 -> dvhe.08.06) which would give it both DV and HDR10 compatibility, also permiting a fallback to standard HDR for non supported devices.[/b][/u]
- [color=green][b]ffmpeg -i D:\MOVIES\Mortal.Kombat.2021.2160p.HMAX.WEB-DL.DDP5.1.DoVi.HEVC-cfandora.mp4 -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool -m 3 extract-rpu -[/color][/b]
- You'll get here a RPU.bin file located in same folder with dovi_tool.
- Now you need to sync and edit the RPU.bin to match the frame count of the HDR10 stream (Remux) using a .JSON file awell located in same folder.
- Create a text file into same folder with dovi_tool, open it with notepad++, insert the code from below, and do a Save As on it with the name "edited" being saved as type "JSON file".
- [b][u]JSON Code:[/b][/u] https://pastebin.com/0TQmmA8V
- [b][u]Editing RPU.bin file[/b][/u]
- [color=green][b]dovi_tool.exe editor -i RPU.bin -j edited.json --rpu-out RPU-edited.bin[/color][/b]
- [b][u]Injecting DoVI[/b][/u]
- [color=green][b]dovi_tool inject-rpu -i hdr.hevc --rpu-in RPU-edited.bin -o output.hevc[/color][/b]
- Now is time to pass that output.hevc trough mkvtoolnix with all the shits to do the Remux. Thats all. Enjoy!
- Please dont use it stright! More test to do.
- JSON files may be different from a movie to another so we need to do tests on more.
- [b]WEB-DL DoVi Mediainfo:[/b]
- [spoiler]
- Video
- ID : 1
- Format : HEVC
- Format/Info : High Efficiency Video Coding
- Format profile : Main 10@L5@Main
- HDR format : Dolby Vision, Version 1.0, dvhe.05.06, BL+RPU
- Codec ID : dvhe
- Codec ID/Info : High Efficiency Video Coding with Dolby Vision
- Duration : 1 h 50 min
- Bit rate : 17.9 Mb/s
- Width : 3 840 pixels
- Height : 2 160 pixels
- Display aspect ratio : 16:9
- Frame rate mode : Constant
- Frame rate : 23.976 (24000/1001) FPS
- Color space : YUV
- Chroma subsampling : 4:2:0
- Bit depth : 10 bits
- Bits/(Pixel*Frame) : 0.090
- Stream size : 13.7 GiB (96%)
- Writing library : x265 3.4hy:[Linux][GCC 7.5.0][64 bit] 10bit
- Encoding settings : cpuid=1111039 / frame-threads=1 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=96 / keyint=96 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=3 / rc=abr / bitrate=18000 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / vbv-maxrate=24500 / vbv-bufsize=24500 / vbv-init=0.6 / vbv-end=0.6 / vbv-end-fr-adj=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=1 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / no-concatenation / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0
- Default : Yes
- Alternate group : 1
- Encoded date : UTC 2021-04-23 11:00:19
- Tagged date : UTC 2021-04-23 11:00:19
- Color range : Full
- Codec configuration box : hvcC+dvcC[/spoiler]
- [b]Remux HDR Mediainfo:[/b]
- [spoiler]
- Video
- ID : 2
- Format : HEVC
- Format/Info : High Efficiency Video Coding
- Format profile : Main 10@L5.1@High
- HDR format : SMPTE ST 2086, HDR10 compatible
- Codec ID : V_MPEGH/ISO/HEVC
- Duration : 1 h 50 min
- Bit rate : 59.7 Mb/s
- Width : 3 840 pixels
- Height : 2 160 pixels
- Display aspect ratio : 16:9
- Frame rate mode : Constant
- Frame rate : 23.976 (24000/1001) FPS
- Color space : YUV
- Chroma subsampling : 4:2:0 (Type 2)
- Bit depth : 10 bits
- Bits/(Pixel*Frame) : 0.300
- Stream size : 45.9 GiB (94%)
- Writing library : ATEME Titan File 3.9.6 (4.9.6.2)
- Language : English
- Default : Yes
- Forced : No
- Color range : Limited
- Color primaries : BT.2020
- Transfer characteristics : PQ
- Matrix coefficients : BT.2020 non-constant
- Mastering display color primaries : Display P3
- Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
- Maximum Content Light Level : 825 cd/m2
- Maximum Frame-Average Light Level : 118 cd/m2
- [/spoiler]
- [b]playBD Hybrid DoVi Mediainfo:[/b]
- [spoiler]
- Video
- ID : 1
- Format : HEVC
- Format/Info : High Efficiency Video Coding
- Format profile : Main 10@L5.1@High
- HDR format : Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
- Codec ID : V_MPEGH/ISO/HEVC
- Duration : 1 h 50 min
- Bit rate : 59.8 Mb/s
- Width : 3 840 pixels
- Height : 2 160 pixels
- Display aspect ratio : 16:9
- Frame rate mode : Constant
- Frame rate : 23.976 (24000/1001) FPS
- Color space : YUV
- Chroma subsampling : 4:2:0 (Type 2)
- Bit depth : 10 bits
- Bits/(Pixel*Frame) : 0.301
- Stream size : 46.0 GiB (100%)
- Writing library : ATEME Titan File 3.9.6 (4.9.6.2)
- Default : Yes
- Forced : No
- Color range : Limited
- Color primaries : BT.2020
- Transfer characteristics : PQ
- Matrix coefficients : BT.2020 non-constant
- Mastering display color primaries : Display P3
- Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
- Maximum Content Light Level : 825 cd/m2
- Maximum Frame-Average Light Level : 118 cd/m2
- [/spoiler]
- [color=red]Waiting replies![/color]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement