[FFmpeg-user] Questions about `-to` parameter
Pan Lee
cn.jlu.lp.5212 at gmail.com
Fri Nov 15 09:50:25 EET 2024
Hi,
I am using ffmpeg to crop video based on this command:
ffmpeg -i input.mp4 -ss 23:43 -to 40:00 -c:v copy -c:a copy output.mp4
but this is a little bit slow, so I try to switch the -ss parameter before
-i, which looks like:
ffmpeg -ss 23:43 -i input.mp4 -to 40:00 -c:v copy -c:a copy output.mp4
when I execute this command, the result is not what I expected. The
duration of output video is 40 minutes, not 17 minutes.
I look up the ffmpeg document and ask the ChatGPT, and figure out that the
timestamp of -to parameter is a relative stop time of -ss timestamp, just
like the -t parameter. And the ChatGPT says this is intentional.
[Q1] Is this really intentional? If it is, can anyone share the thought of
this design?
[Q2] Is there a way to make the second command works like the first command?
All the best,
lp
More information about the ffmpeg-user
mailing list