[FFmpeg-user] Convert MKV to MKV - convert video and audio streams - retain subtitle and font attachements

Ben Longman bmfrosty at catbus.org
Fri Jun 7 10:08:30 CEST 2013

I've been looking to find a way to do this to entire directories of files
in order to create streams that are more amenable to hardware decode.  So
far this has gone well for converting old AVIs to MP4 files, but some of
the files I have are Hi10P encoded with multiple subtitle and font
attachments (I can't say that I prefer this) and I'd like to avoid the
complication of trying to automate burning in of subtitles.

For AVI and MKV files without soft subtitles, I do something like this:

for i in *.mkv ; do
$FFMPEG -n -i $i -strict -2 -c:v libx264 -profile high -crf 23 -ac 2 -c:a
aac $i.mp4

I've tried this:

for i in *.mkv ; do
$FFMPEG -n -i $i -strict -2 -c:v libx264 -profile high -crf 23 -ac 2 -c:a
aac -c:s copy -c:t copy convert/$i

And it copies the subtitle stream, but the font attachments don't copy.

Does anyone know how to do this without manual intervention or more complex



More information about the ffmpeg-user mailing list