

The position this argument is given indicates a separation between input-options and output-options. With the “-i” option, the input media file, in this case the video file, is set. Both arguments use an absolute time from the input media file. While the “-ss” specifies where ffmpeg starts to read from the input media file, the “-to” defines where ffmpeg stops reading from the input file. It is important the the “-ss” option is specified before the “-i” option as the meaning of this option changes based on its position. The first argument in the above command is the “-ss” option specifying the seek position (start position) inside the input media file. $ ffmpeg -ss 115.57 -to 508.86 -i video-file.ext -c copy trimmed_video.ext The original video clip file will not be modified by this process. To be precise, ffmpeg will start to copy the audio and video stream from the start position until the end position into an output file. ffmpeg provides very simple command line arguments to cut a video. With the start and end identified, the video clip can be trimmed. Those positions will be used to cut out the section of the video clip. Make note of the position the trimmed video clip should start and end. In the above example the video is at 17.77 seconds into the video clip. It represents the current position of the playback in seconds. The important section in this line is the first number.

The last line of the output, as shown above, provides details about the current position in the video clip. While the ffplay window does not provide any controls or details except the video content, the console provides the details needed for the next steps. The frame by frame video playback post describes the options for precisely inspecting the video clip to identify the frame to cut or trim. With its keyboard shortcuts, ffplay allows for some impressive control to navigate within the video.

With the player started, a window without controls will start. Instead of trying to drag a cursor on a time line to hopefully find the right frame to cut the clip, ffplay can be used to identify the exact frame very precisely.

As described in frame by frame video playback, ffmpeg comes with a simple video player. Finding the start and endĮven the most tedious task of finding the exact time to cut or trim the video is easy with the tools included in the ffmpeg package. With the help of ffmpeg this task becomes a simple command in the terminal. The most tedious step is finding the start and end time, the rest is one simple command line away. Trimming a video does not have to be over complicated. It might be over-complicated in some cases to fire up a huge video editing suite just to cut a section out of a video.
