[FFmpeg-user] Understanding the behavior of "-ss/-t" option

Nitish Prabhu nitishsprabhu at gmail.com
Fri Sep 8 11:39:38 EEST 2017

On Fri, Sep 8, 2017 at 1:20 PM, Nicolas George <george at nsup.org> wrote:
>> I tried to seek to a particular time in the generated stream using the
>> following:
>> $ ffmpeg -ss 60 -t 10 -i input_clip_x264_offset.mp4 -copyts -filter:v
> "take seconds 60-70 of input_clip_x264_offset as input to produce
> seconds 0-10 of the resulting stream"

I am using "-copyts" to maintain the input timestamps at the output
side. Thus, I believed that using "-ss 60 -t 10" with "-copyts" was
supposed to mean "take seconds 60-70 of input_clip_x264_offset as
input and produce 60-70 of the resultant stream".

>> "select=between(t\,60.000\,70.000)"
> "only keep frames between seconds 60 and 70"
> Since [0;10[ \cup [60;70[ = \emptyset, the result you observe is
> expected.

If "-ss 60 -t 10" is able to produce output in the rage [60;70[ at the
output side, then the select filter will appropriately select only
those timestamps.

Please let me know if my understanding is right.

More information about the ffmpeg-user mailing list