Posts

Showing posts from September, 2020

Using FFMPEG to trim your videos

 There are multiple methods to trim or clip videos with the help of FFMPEG, but sometimes looking at the documentation can confuse lots of us, and we cannot derive the output we want. And the examples on the documentation are simpler than what we want to do. So I will show few methods to combine, trim or clip video files using FFMPEG. I won't be going through installation process and will assume that you already have it installed. 1. Using timestamps to clip the video 🕐   ffmpeg -i video.mp4 -ss 00:00:00 -to 00:10:00 -c copy output.mp4   This command will copy the clip from 0 sec to 10 min without re-encoding, since we specify not to re-encode. Break down of command:      -i  : input video file     -ss : starting timestamp you can define in hh:mm:ss or just secs     -to : ending timestamp, this is the timestamp of the video     -c copy : codec is copy, which doesn't require re-encoding   If you want to copy the video from some other time to some duration    ffmpeg -ss 00