[FFmpeg-devel] subtitles filter and -ss
Manolis Stamatogiannakis
mstamat at gmail.com
Sun May 3 18:06:13 EEST 2020
Hello,
I've noticed what appears to be a bug/missing feature in the subtitles
filter: when "-ss" is used for the input, it is not applied to the
subtitles stream. E.g., for the following command line, the video playback
will start on 20:10, but the subtitles will start from 00:00.
ffmpeg -re -ss 20:10.00 -i input.mp4
-vf subtitles=subs.srt \
-c:v libx264 crf 25 -c:a aac -ab 160k \
-strict experimental \
-f flv $RTMP_URL
This should be fairly straightforward to fix and review, so I'd like to
directly submit a patch rather than opening a bug and having someone else
fix it. As I'm not an expert with the ffmpeg internals, I'd like some
guidance on implementing a proper fix.
What would be considered more appropriate:
(a) automatically skipping the subtitles for the time specified by -ss?
(b) adding a shift option to the subtitles filter that allows shifting
subtitles time by specific time?
(c) something else I can't think of?
Although (a) would probably be a bit more elegant to use, I'm not sure if
it always makes sense as ffmpeg may use several input files.
Thanks,
Manolis
More information about the ffmpeg-devel
mailing list