[FFmpeg-user] Difference Between -t and -to Options?

Sam Logan shapableline at gmail.com
Sat Sep 21 21:16:54 CEST 2013


What is the difference between the -t and -to options? The
documentation at http://ffmpeg.org/ffmpeg-all.html#Description says

> -t duration (output)
> Stop writing the output after its duration reaches duration. duration may be a number in seconds, or in hh:mm:ss[.xxx] form.
> -to and -t are mutually exclusive and -t has priority.

> -to position (output)
> Stop writing the output at position. position may be a number in seconds, or in hh:mm:ss[.xxx] form.
> -to and -t are mutually exclusive and -t has priority.

But as far as I can tell from reading the above, those two definitions
mean the same thing.

I then did the following test:

ffmpeg -ss 00:00:30 -i "Input.mp4" -acodec copy -vcodec copy -t
00:01:00 "Output1.mkv"
ffmpeg -ss 00:00:30 -i "Input.mp4" -acodec copy -vcodec copy -to
00:01:00 "Output2.mkv"

The two output files, Output1.mkv and Output2.mkv, are totally
identical, and both include the segment of "Input.mp4" from timestamp
00:00:30 to 00:01:30.

So what situation is there in which -t and -to would ever be different? Thanks.


More information about the ffmpeg-user mailing list