[FFmpeg-user] keeping subtitles while transcoding
rickcorteza at gmail.com
Thu Jan 19 09:43:30 CET 2012
On Jan 19, 2012, at 5:17 AM, Bernhard Rohrer wrote:
> OK, got it
> $ffmpeg -i Seven.Samurai.1954.MULTiSUBS.1080p.BluRay.x264-HDZ.mkv -vcodec mpeg4 -pass 1 -threads 2 -b:v 10000000 -scodec copy -map 0 -map -0:2 -map -0:4 -acodec ac3 -b:a 384000 -f matroska -y /dev/null
> mp4 clearly doesn't support subtitles
> On 18/01/12 17:46, graylion wrote:
>> I have googled high and low and am not finding this:
>> I have a file with h264 video and audio and subtitles. I want to transcode
>> the h264 into mp4 while keeping the rest intact.
>> my commandline looks like this:
>> ffmpeg -i Seven.Samurai.1954.MULTiSUBS.1080p.BluRay.x264-HDZ.mkv -vcodec
>> mpeg4 -pass 1 -threads 2 -b:v 10000000 -scodec copy -an -f mp4 -y /dev/null
>> this leads to
>> Stream mapping:
>> Stream #0.0 -> #0.0 (h264 -> mpeg4)
>> Stream #0.2 -> #0.1 (copy)
>> Could not write header for output file #0 (incorrect codec parameters ?)
>> which also are the wrong streams, since i want to map 0.3 which are the
>> English subtitles. also i am entirely unclear as to how I would go about
>> mapping a second pass.
>> Any help appreciated.
I had this same question/problem actually. I think .mp4 does support subtitles, but coming from .mkv using -scodec copy doesn't seem to work. If you go from .mp4 to .mp4 using -scodec copy it works. I'm not quite sure what else is possible when using -scodec to make this work, but if there's a way it would be great to hear. Thanks!
More information about the ffmpeg-user