FFmpeg Cut a video to a clip by seconds: Difference between revisions

From Lucca's Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 7: Line 7:
Explanation of the command:
Explanation of the command:
Command Explanation
Command Explanation
-i This specifies the input file. In that case, it is (input.mp4).
-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.
-ss Used with -i, this seeks in the input file (input.mp4) to position.
00:01:00 This is the time your trimmed video will start with.
00:01:00 This is the time your trimmed video will start with.
-to The next argument after -to specifies the position (counted from the start of the entire, original video) at which FFmpeg should stop reading the data (00:02:00).
-to The next argument after -to specifies the position (counted from the start of the entire, original video) at which FFmpeg should stop reading the data (00:02:00).
00:02:00 This is the time your trimmed video will end with.
00:02:00 This is the time your trimmed video will end with.
-c copy This is an option to trim via stream copy. (NB: Very fast)
-c copy This is an option to trim via stream copy. (NB: Very fast)


The timing format is hh:mm:ss.
The timing format is hh:mm:ss.

Revision as of 19:45, 24 August 2025

The fastest and best ffmpeg-based method I have figured out is:

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

This command trims your video in seconds!

Explanation of the command: Command Explanation

-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 	This is the time your trimmed video will start with.
-to 	The next argument after -to specifies the position (counted from the start of the entire, original video) at which FFmpeg should stop reading the data  (00:02:00).
00:02:00 	This is the time your trimmed video will end with.
-c copy 	This is an option to trim via stream copy. (NB: Very fast)

The timing format is hh:mm:ss.