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

Nicolas George george at nsup.org
Fri Sep 8 12:23:24 EEST 2017

Le duodi 22 fructidor, an CCXXV, Nitish Prabhu a écrit :
> 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".

My bad, I missed that and the explanation was not correct.

After further testing, it seems the -ss option is itself relative to the
file's start time: by setting -ss 60 with a file that starts at 60, you
are asking to seek to timestamp 120. And with -copyts, you get that

Therefore, the problem is that [120;130[ \cup [60;70[ = \emptyset, not
[0;10[ as I said before.

I could ascertain that by using the showinfo filter: it prints:

[Parsed_showinfo_0 @ 0x55c72f26e880] n:   0 pts:2304000 pts_time:120


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170908/b8904e77/attachment.sig>

More information about the ffmpeg-user mailing list