[FFmpeg-user] combining concat filter with closed caption extraction
Leo Butler
leo.butler81 at googlemail.com
Thu Jun 11 22:44:35 EEST 2020
Nicolas George <george at nsup.org> writes:
> Leo Butler via ffmpeg-user (12020-06-10):
>> ffmpeg -i C.mkv -f lavfi 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv
>
> You are missing a -i in this command line.
>
>> Question: Is there a way to reduce this to one pass?
>
> With the -i, it becomes obvious: 'movie=C.mkv[out0+subcc]' is just
> another input, like B.ts.
>
> Regards,
Sorry, yes there is a syntax error in my question, but no, that is
irrelevant to my question. Let me repeat the question (with the syntax
error corrected):
Currently, the only way I know to extract/insert closed captions as a
subtitle stream is in 2 passes. Something like
ffmpeg -i A.ts -i B.ts -filter_complex '[0:0][0:1][1:0][1:1]
concat=n=2:v=1:a=1' C.mkv
ffmpeg -i C.mkv -f lavfi -i 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv
(In practice, A.ts and B.ts are segments from the same file).
Question: Is there a way to reduce this to one pass?
I am using a recent version of ffmpeg compiled from the git repository.
To be more explicit:
Rather than creating the file C.mkv in the first pass, can the lavfi
filter use the video output stream of the concat filter directly?
Leo
More information about the ffmpeg-user
mailing list