0

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?

marked as duplicate by slhck ffmpeg Aug 9 '18 at 8:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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? – Aman Aug 15 '18 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 Aug 15 '18 at 4:35
1

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.

  • I tried your method and this time the time delay was very less compare to previous time. So thanks for your answer – Aman Aug 15 '18 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 Aug 15 '18 at 0:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.