How to cut a video based on start and end time using ffmpeg ?

· 118 words · 1 minute read

This is the fastest command to cut the video in ffmpeg .

ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4

note: the above command trims your video in seconds.

explanation of command parts:

  • -i : This specifies the input file. In that case, it is (input.mp4).
  • -ss : Used with -i, this seeks in the input file (input.mp4) to position.
  • 00:01:00 : the time your trimmed video will start with.
  • -to : This specifies duration from start (00:01:40) to end (00:02:12).
  • 00:02:00 : the time your trimmed video will end with.
  • -c copy : an option to trim via stream copy. (NB: Very fast)

The timing format is: hh:mm:ss; it is hours : minutes : seconds.

Share:
waffarx cash back