FFMPEG is widely used tools for video manipulations and conversions. You can download it from link below,

https://ffmpeg.org/download.html (available for Linux, Windows and Mac)

In Linux you can also install it using terminal using command: sudo apt install ffmpeg

To verify the installation you need to run the following command in terminal/command prompt:

<path to ffmpeg>ffmpeg –version

To cut part of a video with ffmpeg, you ned to use following command

<path to ffmpeg>ffmpeg -i <input file> -ss <start_time> -t <end_time> <output file>

Description
  • input file = Put full path of your input file
  • start_time = Required start time where you want to cut
  • end_time = Put the time up to which you want to cut
  • output file = Put the path and name of file where you want to store output file

Example

Suppose you have a video sample.mp4 with duration 00:05:30 and you need a part of this video starting from 00:00:10 to 00:01:00. In this case the command will be,

ffmpeg -i sample.mp4 -ss 00:00:10 -t 00:01:00 output.mp4

After processing, output.mp4 will have a duration of 50 seconds.

Time Duration

Time duration can be of following formats:

  • ’55’ = 55 seconds
  • ‘0.2’ = 0.2 seconds
  • ‘200ms’ = 200 milliseconds, that’s 0.2s
  • ‘200000us’ = 200000 microseconds, that’s 0.2s
  • ’12:03:45′ = 12 hours, 03 minutes and 45 seconds
  • ‘23.189’ = 23.189 seconds

Thanks for reading! If you have any doubt regarding this feel free to add in the comment.

Leave a Reply

Your email address will not be published. Required fields are marked *