[FFmpeg-user] Subtitles disappear

Michael Koch astroelectronic at t-online.de
Mon Jan 4 10:58:34 EET 2021


Am 04.01.2021 um 03:20 schrieb Mark Filipak (ffmpeg):
> On 01/03/2021 08:00 PM, Cecil Westerhof via ffmpeg-user wrote:
>> I convert a video with the following statement
>>      ffmpeg -y -i input.mkv -nostdin -vf scale=1024:-2 -crf 23 
>> -acodec libmp3lame -qscale:a 9 -preset veryfast Temp/output.mp4
>>
>> The input file has subtitles, but the output file does not.
>> What to change to have also subtitles in the output file?
>>
>> And if I can do things better, I do not mind to hear it. ;-)
>
> MP4 containers don't support subtitle streams.

That's not correct. See here:
https://en.wikipedia.org/wiki/MPEG-4_Part_14#Data_streams

In my book I have a few examples for subtitles in MP4 files:
http://www.astro-electronic.de/FFmpeg_Book.pdf   (chapter 2.129)

For copying the subtitles from the input to the output,
-c:s copy
might work. I haven't tested it.

Michael


More information about the ffmpeg-user mailing list