Check out the iFrameExtractor project on github. While this is not exactly what you are looking for, it has scripts for building the ffmpeg libraries and the xcode project links the libraries.
Some more info in this blog post:
http://www.codza.com/extracting-frames-from-movies-on-iphone