I wish to split a large avi video into two smaller consecutive videos. I am using ffmpeg.
One way is to run ffmpeg two times:
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
But according to manpage of ffmpeg, I can make more than one ouput file from one input file using just one line:
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi \
-vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
My question is, does the later approach save computation time and memory?
Best Answer
The ffmpeg wiki links back to this page in reference to "How to split video efficiently". I'm not convinced this page answers that question, so I did as @AlcubierreDrive suggested…
Which outputs...
I tested a SD & HD file, after a few runs & a little maths.
SD file = 1.35GB DVB transport stream
HD file = 3.14GB DVB transport stream
Conclusion
The single command is better if you are handling HD, it agrees with the manuals comments on using -ss after the input file to do a 'slow seek'. SD files have a negligible difference.
The two command version should be quicker by adding another -ss before the input file for the a 'fast seek' followed by the more accurate slow seek.