Is there a way to programmatically walk through a file and extract (for example) consecutive 10-second fragments from it into separate files?
A colleague is currently using ffmpeg
for this, but I'm thinking that invoking this command once per segment will result in a lot of file seeking that may not be necessary.
Or am I wrong, is there some kind of time index in these files that makes the seeks very fast?
The language currently used for calling ffmpeg is Ruby, so a compiled C library might work, and a Java library would definitely work (with JRuby).