CLI utility to convert Dolby Vision to HDR10 while preserving everything else in the file.
ffmpegandffprobeavailable on PATH or placed in the working directory.dovi_toolavailable on PATH or placed in the working directory for Dolby Vision Profile 7 sources.- Windows PowerShell can run:
pythonand this script.
.\dvfix.ps1 input.mkvBy default, output is written next to the input with .noDV added:
movie.mkv -> movie.noDV.mkv
If you provide an output name, .noDV will be appended if missing and it will still be written to the input directory.
You can also pass a directory to scan for video files (recursively):
.\dvfix.ps1 "D:\Videos"Profile 5 requires a Vulkan-enabled libplacebo build of FFmpeg. DVFix prefers the
working directory first, so you can drop ffmpeg.exe and ffprobe.exe next to
dvfix.py to override PATH.
Quick check:
ffmpeg -hide_banner -f lavfi -i color=c=black:s=16x16:d=0.1 -vf libplacebo -frames:v 1 -f null -If you see vkGetInstanceProcAddr errors, your FFmpeg build isn't linked against the
Vulkan loader. Replace ffmpeg.exe/ffprobe.exe with a Vulkan-enabled build and retry.
- Profile 7: Extracts the HEVC bitstream, removes EL + RPU via
dovi_tool, remuxes the HDR10 base layer, and copies all other streams unchanged. - Profile 8: Strips Dolby Vision RPU metadata in-place (no re-encode), and copies everything else unchanged.
- Profile 5: Re-encodes video to HDR10 (no other streams are touched). Uses NVENC by default and asks for confirmation before starting.
--encoderVideo encoder for re-encode (default:hevc_nvenc).--presetEncoder preset for re-encode (default:p7).--cqNVENC constant-quality value (default:19).--p5-force-tagFor Profile 5, skip DV processing and only tag HDR10 (colors likely wrong).--sample NEncode only the first N seconds (quick test output).--sample-rand NCreate a test clip from N random segments (requires re-encode).--sample-seg-len NSegment length for--sample-rand(default: 2 seconds).--sample-seed NSeed for random sampling (repeatable output).--replaceDelete original file after successful conversion (requires confirmation or--yes).--tempCustom temp directory.--keep-tempKeep temp files for debugging.--yesSkip the Profile 5 confirmation prompt.--overwriteOverwrite output if it already exists.--dry-runPrint commands without executing them.
- This repo is code-only and does not include third-party binaries.
- The tool preserves audio, subtitles, attachments, chapters, and container metadata.
- Only single-video-stream inputs are supported.
- For Profile 8, the FFmpeg build must include the
dovi_rpubitstream filter. - For Profile 5, the video must be re-encoded; this is unavoidable because there is no HDR10 base layer.
- For Profile 5, an FFmpeg build with
libplacebois required to apply Dolby Vision metadata. - For Profile 5 on Windows, Vulkan runtime (
vulkan-1.dll) must be available (usually installed with NVIDIA drivers). - If you see
vkGetInstanceProcAddrerrors, your FFmpeg build isn't linked against the Vulkan loader; use a Vulkan-enabled FFmpeg build. - Sample mode is currently supported only for Profile 5.