Suppose I have two files called
foo.srt. The mp4 file doesn't have subtitles, and I want to add subtitles from the
mencoder is frequently recommended in this context. I tried using, for example:
mencoder foo.mp4 -sub foo.srt -ovc lavc -oac copy -o foo.mpg
This worked for me before. However, here I get
Audio format 0x4134504d is incompatible with '-oac copy', please try '-oac pcm' instead or use '-fafmttag' to override it.
I don't know what this means. Running
mediainfo on this file gives the following information for the
Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 1h 47mn Bit rate mode : Variable Bit rate : 93.7 Kbps Maximum bit rate : 110 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 71.8 MiB (9%) Language : English Encoded date : UTC 2014-11-19 03:58:38 Tagged date : UTC 2014-11-19 03:58:40
mencoder foo.mp4 -sub foo.srt -ovc lavc -oac pcm -o foo.mpg
works, but produces a video that is visibly worse with regards to quality.
ffmpeg could also be an option, but I've not figured out how to use it to do this.
I'm using Debian wheezy. The versions of
ffmpeg that ship with wheezy are:
However, I managed to backport a newer version of
ffmpeg from unstable,