Showing posts with label ffmpeg. Show all posts
Showing posts with label ffmpeg. Show all posts

Tuesday, August 30, 2011

Trimming video with ffmpeg

If you need to trim an mp4 video quickly without re-encoding the output, try this:

ffmpeg -i input.mp4 -ss <position> -t <duration> -vcodec copy -acodec copy output.mp4

-ss <position> is the starting time. It can be in seconds or in hh:mm:ss[.xxx] format.
-t <duration> is the length of the video to copy. It can also be in seconds or hh:mm:ss[.xxx] format.