0

I have dataset of around 15000 videos. I want to extract frames from videos into numpy array. I tried both opencv and skvideo.

But the problem with opencv is that it is too slow for large videos as it iterates frame by frame and problem with skvideo is that even though it is very fast in reading videos but it is not stable as it throws various run time error for many videos.

Can you please suggest any other python library for extracting frames of a video into numpy array.

Pawandeep Singh
  • 830
  • 1
  • 13
  • 25
  • As a workaround you could try with skvideo first for each video, and if it fails cath the error and user the slower opencv ? – J. Martinot-Lagarde Jul 16 '18 at 07:09
  • You could use FFMpeg similar as mentioned here: https://gist.github.com/kylemcdonald/85d70bf53e207bab3775 – Joe Jul 16 '18 at 08:40
  • https://stackoverflow.com/questions/10505659/c-sharp-parsing-ffmpeg-standard-output-when-extracting-images – Joe Jul 16 '18 at 08:44
  • Then https://stackoverflow.com/a/13062058/7919597 – Joe Jul 16 '18 at 08:45
  • Do you try to use `videodata = skvideo.io.vread(videofile)` for importing with skvideo video as an array of frames at once, or you're iterating it frame by frame? And how much frames have the videos which cause runtime errors? – Antonio Oct 03 '19 at 09:16

0 Answers0