[FFmpeg-user] Error extracting srt
Moritz Barsnick
barsnick at gmx.net
Fri Aug 7 14:20:10 EEST 2020
On Wed, Aug 05, 2020 at 22:28:15 +0100, Alex Zachopoulos wrote:
> This is the command I use to extract Stream #0:2 (subtitle) from file
^^ This is an input stream
specifier, for mapping
> 1.mp4, on both computers:
>
> ffmpeg -i 1.mp4 -vn -an -codec:s:0.2 srt 1.srt
^^ This is an output stream specifier.
You want to tell ffmpeg to encode the first *output* subtitle stream as
SRT. That's not "0:2", neither "0.2", that's just "0".
If you have only one output SRT stream - which should be the case,
since your output SRT file can only include one stream - you can omit
the output stream specifier: "-codec:s"
In your case, you can omit the "-codec:s" totally, because the suffix
of your output file implies it.
> *[srt @ 0x7fd3b300ce00] Invalid stream specifier: s:0.2.*
I assume the stream specifier parser used to just ignore the ".2", and
it no longer does, and errors out instead.
Cheers,
Moritz
More information about the ffmpeg-user
mailing list