##About:##
About:
This is my second answer. After playing with Mathematica's video import I have noticed that it makes import mistakes (duplicated frames + artifacts) and thus developed ffmpeg
package for Mathematica which is based on ssch answer.
https://github.com/kmisiunas/ffmpeg-mathematica
The speed of this package is as follows on moderate computer:
- Importing one frame is from 2 to 100 times slower, because current method for seeking frame is slow.
- Importing many frames (1000+) is from 2 to 10 times faster.
I am switching to ffmpeg
importer because for bulk analysis it proved to be faster and more accurate than default method.
##Usage:##
Usage:
Mimicking Mathematica's Import
function:
FFImport[ "file.avi", {"Frames", 1}]
gives first frame (slow way).
FFImport[ "file.avi", {"Frames", Range[1,1000]}]
gives first 1000 frames (fast)
To test status of ffmpeg
library you can run FFmpeg[]
.
More information about ffmpeg
installation in the link above.