Convert MKV (DVD rip) with VobSub to MP4 with burned-in bitmap subtitles
DVD rips often include VobSub (dvdsub) subtitles, image-based (bitmap) tracks1 that aren't supported in MP4 containers. Rather than extracting and OCRing (which can be slow and error-prone), burn them directly into the MP4 with ffmpeg:
Identify the subtitle stream:
Use
ffprobe
to confirm that the MKV contains VobSub (dvd_subtitle
) subtitles:ffprobe -v error -select_streams s -show_entries stream=index,codec_name:stream_tags=language -of csv=p=0 foo.mkv
3,dvd_subtitle,engStream 3 is dvd_subtitle (VobSub), in English.
Convert & burn-in with ffmpeg:
This command burns in the bitmap subtitles, retains all audio, preserves chapters, and encodes the video using Apple's hardware-accelerated
hevc_videotoolbox
:ffmpeg -i foo.mkv \ -filter_complex "[0:v][0:s:0]overlay,format=nv12[v]" \ -map "[v]" \ -map 0:a \ -map_chapters 0 \ -c:v hevc_videotoolbox -b:v 6000k -tag:v hvc1 \ -c:a copy \ -movflags +faststart \ foo.mp4
Flag exegesis
-filter_complex "[0:v][0:s:0]overlay,format=nv12[v]"
defines a filtergraph to burn in subtitles and prepare the video for encoding:[0:v]
selects the video stream from input 0.[0:s:0]
selects the first subtitle stream from input 0.overlay
burns the subtitle onto the video frame-by-frame.format=nv12
sets a pixel format compatible with hardware encoders likevideotoolbox
.[v]
names the final video stream for later mapping.
-map "[v]"
maps the filtered (burned-in subtitle) video stream ([v]
) to the output.-map 0:a
includes all audio streams from input 0.-map_chapters 0
preserves chapter metadata from the source MKV.-c:v hevc_videotoolbox
uses Apple silicon's hardware-accelerated HEVC (H.265) encoder.-b:v 6000k
sets bitrate to match 480p DVD quality, close to typical on-disc MPEG-2 rates.-tag:v hvc1
ensures compatibility with Apple players (QuickTime, Safari, iOS) by setting the correct codec identifier.-c:a copy
copies audio tracks without re-encoding.-movflags +faststart
moves metadata to the beginning of the file for faster playback or streaming.
Footnote
Blu-ray subtitles use PGS, an image-based format like VobSub that's also best burned in for MP4 compatibility and to skip OCR. ↩
❧ 2025-08-06