简体   繁体   中英

Extract frames from a video file as 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 positions of objects. I tried doing that using ffmpeg in linux but i had a lot of problems, for example when I use function av_register_all() I get full screen of errors. The tutorial describes pretty much what I need, but it's out of date and I cant compile it with new version of ffmpeg. Can someone help me with some advice on how to update/edit this code or different method of compiling.

Maybe you can try mencoder to extract images in jpg from a video and after turn into rgb.

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

With ffmpeg, here you are a great tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM