Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

The FFmpeg Library > Using FFmpeg to obtain thumbnails - Pg. 64

Feedback: 0 Comments on this Section

Congratulations, you've successfully built the FFmpeg library for the iPhone and iPod touch. Adding the Library to your Xcode Project To add the static linked libraries to your own Xcode project you should navigate to the build directory using the Finder and drag-and-drop all five of the .a library files into the Frameworks group in your project, remembering to tick the "Copy items into destination group's folder (if needed)" check box in the pop up dialog that appears when you drop the files into Xcode. Next navigate to the include folder which was created during the build and drag-and-drop the files and folders inside that directory into your project. Again remember to tick the "Copy items into destination group's folder (if needed)" check box. This folder contains all of the necessary .h header files that you'll need to make use of the FFmpeg library. There is a known Xcode linker issue with deployment targets of "iPhone OS 3.1" or later that will result in a linking error, ld: ldr 12-bit displacement out of range (4352 max +/-4096)... At the time of writing the interim solution is to select a deployment target of "iPhone OS 3.0" or earlier. If this is not possible you can attempt to re-arrange the link order of the libraries in your target's link library phase as this may (sometimes) cause the error to disappear. Using FFmpeg to obtain thumbnails The easiest way to obtain a thumbnail from a video using the FFmpeg library is to make use of Lajos Kamocsay's VideoFrameExtractor class. You can get the latest version of this software by cloning it from its Git repository, git clone git://github.com/lajos/iFrameExtractor.git Open the project folder using the Finder, and drag-and-drop the VideoFrameExtractor.[h,m] and Utilities.[h,m] classes to your own project, making sure to tick the "Copy items into destination group's folder (if needed)" check box in the pop up dialog that appears when you drop the