1

I have to split a 4K 10 minutes video into 120 small video files, each containing 5 seconds of duration. I'm using ffmpeg for splitting the video. The splitting take a very very long time and the speed of the conversion gets slower as the duration of the splitting gets higher. For test use, I used the commands below in cmd and a) was a lot lot faster than b):

a) ffmpeg -i video.mp4 -ss 0 -to 5 split.mp4

b) ffmpeg -i video.mp4 -ss 595 -to 600 split2.mp4

As the commands executed, there was a time delay and then the splitting starts happening and the time delay of b) was a lot longer than a). Please help me or advise me to prevent this time delay and help me speed up my conversion. Please don't give me any methods which will cause certain amount of video footage to disappear. Thanks

ADDITIONAL QUESTION:

Is there any way to make the ffmpeg video quality conversion, fps conversion and video splitting faster through the computer specs. As to do I need to have a more powerful graphics card to make the ffmpeg conversions faster or any other computer parts?

2
  • Is there any way to make the ffmpeg video quality conversion, fps conversion and video splitting faster through the computer specs. As to do I need to have a more powerful graphics card to make the ffmpeg conversions faster or any other computer parts?
    – aman
    Commented Aug 15, 2018 at 0:50
  • 1
    if you have another question, ask a different one. Don't edit the current question to ask a different problem
    – phuclv
    Commented Aug 15, 2018 at 4:35

1 Answer 1

4

You need to apply a demuxer stage trim i.e.

ffmpeg -ss 595 -to 600 -i video.mp4 split2.mp4

Since you're transcoding, and your input format (MP4) is indexed, split will be accurate.

With output-stage trim, all frames prior are processed, and then discarded during output file processing. So, the deeper the desired content resides, the longer it takes to get to it.

4
  • I tried your method and this time the time delay was very less compare to previous time. So thanks for your answer
    – aman
    Commented Aug 15, 2018 at 0:46
  • Is there any way to make the ffmpeg video quality conversion, fps conversion and video splitting faster through the computer specs. As to do I need to have a more powerful graphics card to make the ffmpeg conversions faster or any other computer parts?
    – aman
    Commented Aug 15, 2018 at 0:50
  • @Gyan - how would this work with having. "-c copy" after the "-I <name>" parameter - I get an error message if I move the "-ss ... -to ..." from after "-I" to before it. Thanks.
    – MikeW
    Commented Nov 18, 2020 at 10:05
  • ffmpeg version?
    – Gyan
    Commented Nov 18, 2020 at 10:46

Not the answer you're looking for? Browse other questions tagged .