While Profile 7 is the gold standard for physical 4K Blu-ray discs, it is notoriously difficult to play back on streaming devices (Apple TV 4K, Nvidia Shield, Fire Stick, or LG/Samsung TV native apps). This has led to a surge of interest in a "new" workflow:
DoViBaker.py -i video.hevc -o video_converted.hevc -m 3
# Step 3: Convert the RPU from Profile 7 to Profile 8 # This edits the metadata headers to simulate P8 structure cmd_convert = ["dovi_tool", "-m", "2", "convert", "--discard", "-o", "converted.hevc", self.temp_hevc] # Note: In newer dovi_tool versions, 'convert' mode handles the logic automatically. # For strict P7->P8: cmd_convert = ["dovi_tool", "convert", "--discard", self.temp_rpu, "-o", "converted_rpu.bin"] subprocess.run(cmd_convert, check=True)
This script demonstrates the backend logic using subprocess to call FFmpeg and dovi_tool .
# Step 5: Mux into final container (MP4 or MKV) # We take the audio/subs from the original file and merge with new video cmd_mux = [ "ffmpeg", "-i", "final_p8.hevc", "-i", self.input_file, "-map", "0:v", "-map", "1:a", "-map", "1:s?", "-c", "copy", "-strict", "unofficial", self.output_file, "-y" ] subprocess.run(cmd_mux, check=True)
Metadata preservation & sidecar outputs