Extract frames from a video file as an rgb array

Is there a way that I can extract frame by frame from a video file. I need raw rgb data in my memory, so I can calculate the positions of objects. I tried to do this with ffmpeg on linux, but I had a lot of problems, for example, when I use the function av_register_all(), I get a full screen of errors. The tutorial describes practically what I need, but it is deprecated, and I can not compile it with the new version of ffmpeg. Can someone help me with some tips on how to update / change this code or another compilation method.

+3
source share
1 answer

Perhaps you can try mencoder to extract jpg images from video and after switching to rgb.

mplayer input.avi -vo jpeg:outdir=dirname:quality=80

With ffmpeg, here you are a great tutorial

0
source

All Articles