Trim MP4
Use the following command to trim a MP4 file.
ffmpeg -ss 00:02:45 -t 00:04:00 -i source.mp4 -c copy output.mp4
Explanation:
-ss 00:02:45 : You can trim the video from beginning ( set this parameter to 00:00:00) or in the middle. In this example, the output will start from 2mins and 45 seconds from the original video.
-t 00:04:00 : duration that need. In this example, the output will start from 02:45 of the source video and stop at 06:45.
-c copy : use the same codec with the source file
ffmpeg -ss 00:02:45 -t 00:04:00 -i source.mp4 -c copy output.mp4
Explanation:
-ss 00:02:45 : You can trim the video from beginning ( set this parameter to 00:00:00) or in the middle. In this example, the output will start from 2mins and 45 seconds from the original video.
-t 00:04:00 : duration that need. In this example, the output will start from 02:45 of the source video and stop at 06:45.
-c copy : use the same codec with the source file
Comments
Post a Comment
Feel free to leave your question or comment here, we will reply you as soon as possible.