I've got a long video (2 hours at high resolution). We might as well assume it's in mp4 format, because it's in an AVCHD, and I'll have to extract and convert it to mp4 anyhow.
I'd like to extract from it about 40 clips, of varying lengths. I know the "start" and "stop" time for each. It might look like this:
0:00:15 to 0:01:30 -> clip1.mp4 0:01:55 to 0:03:10 -> clip2.mp4 0:03:45 to 0:05:12 -> clip2.mp4 ... (many more lines) 1:55:45 to 1:57:11 -> clip41.mp4
I can certainly write a script to extract each of these individually (via something like what's described here), but that requires "reading through" the source forty times, which can be slow. Is there a way to get ffmpeg to do this in some sort of sequential fashion in a single pass? Or do I just resign myself to an overnight background process?