[FFmpeg-user] Burn-in subtitles

Bernd Clausen qwedsayxc at gmx.net
Sun Sep 22 16:58:46 CEST 2013

I have a mkv file and want to convert it to a DVD compatible mpg file with ffmpeg. How can I also burn-in one subtitle stream from the same mkv file?
The problem is that the video stream was scaled down from 1080p to 720p, but the subtitle stream (hdmv_pgs_subtitle) is still 1080p.

I use the following command:

ffmpeg -i input.mkv -filter_complex "[0:s]scale=-1:720[subs];[0:v][subs]overlay[v]" -map [v] -map 0:a:0 -target pal-dvd -aspect 16:9 -q:v 1 -c:a mp2 -ac 2 -b:a 128k output.mpg

The output file doesn't contain the subtitles and I get the error "sub2video: rectangle overflowing". How can I fix this?

More information about the ffmpeg-user mailing list