Quantcast
Channel: MediaSPIP
Viewing all articles
Browse latest Browse all 118077

How to sequentially extract video segments from mp4/mkv video files?

$
0
0

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).


Viewing all articles
Browse latest Browse all 118077

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>