Vicky
Vicky

Reputation: 71

Ffmpeg split video into multiple chunk but in different duration length

I know how to split video into equal duration length, but here i want to split video into un-equal parts and number of parts and duration will be different for each time.

For ex, video length is 50 sec, i want to split it in 4 parts. 
1) 0 sec - 5 sec 
2) 6 sec - 22 sec
3) 23 sec - 34 sec
4) 35 sec - 50 sec

Upvotes: 4

Views: 3019

Answers (2)

iamkdblue
iamkdblue

Reputation: 3632

If you looking for audio, then you can try this, modifying a version of @L. Scott Johnson

ffmpeg -i audio1.mp3 -c copy -f segment -segment_times 5,22,34,50 output%d.mp3

Upvotes: 1

L. Scott Johnson
L. Scott Johnson

Reputation: 4382

If you're capturing and segmenting all the input, use something like

ffmpeg -i input.mp4 -c copy -f segment -segment_times 0,5,22,34,50 output%d.mp4

Upvotes: 3

Related Questions