Forrest logo
back to the ffmpeg tool

ffmpeg:tldr:a54be

ffmpeg: Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end).
$ ffmpeg -ss ${mm:ss} -to ${mm2:ss2} -i ${video-mp4} -codec copy ${output-mp4}
try on your machine

The command you provided is the command line syntax for using ffmpeg, a popular open-source multimedia framework, to make a video cut or extract a portion of a video file. Let's break down the command:

ffmpeg: The command to call the ffmpeg program.

-ss ${mm:ss}: Defines the starting point (seek position) for the cut. The mm:ss should be replaced with the desired start time of the video in minutes and seconds.

-to ${mm2:ss2}: Specifies the ending point of the cut. The mm2:ss2 should be replaced with the desired end time of the video in minutes and seconds.

-i ${video-mp4}: Points to the input video file. Replace ${video-mp4} with the file name or path of the video you want to extract a portion from.

-codec copy: Instructs ffmpeg to use the same codec as the input video for the output file. This option ensures that the video and audio streams are not re-encoded, thus preserving the original quality.

${output-mp4}: Indicates the output file. Replace ${output-mp4} with the desired name or path for the resulting video file in mp4 format.

To use this command, you need to replace the placeholders ${mm:ss}, ${mm2:ss2}, ${video-mp4}, and ${output-mp4} with the specific values or paths relevant to your use case.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ffmpeg tool