Split Videos into desired pieces for Online Publishing using FFMPEG

This method needs ffmpeg

First instal ffmpeg in the terminal by running the following command.

brew install ffmpeg

Documentations: https://ffmpeg.org/documentation.html

/** * -i input file * -ss start time in seconds or in hh:mm:ss * -to end time in seconds or in hh:mm:ss * -c codec to use */

Example: – Extract 2 minutes from the input video

ffmpeg -i input.mp4 -ss 00:10:00 -to 00:12:00 -c copy output.mp4

By running this command in the terminal ffmpeg extracts 2 minute clip and saves it as output. Be sure to run the command from the folder of input.mp4.

Example: – Cut the one hour video into 30 minute pieces.

$ ffmpeg -i input.mp4 -ss 00:00:00 -to 00:30:00 -c copy output1.mp4
$ ffmpeg -i input.mp4 -ss 00:30:00 -to 01:00:00 -c copy output2.mp4

This will give you two clips of 30 minutes each from the one hour input.mp4.

Leave a comment