The configuration environment is as follows:pc:windows XP SP3
Ide:visual Studio 2005
ffmpeg:git-c0f67e1 (2015-12-21)sdl:sdl2-2.0.3 1. Download ffmpeg (Shared & Dev): http://ffmpeg.zeranoe.com/builds/
2. Download sdl (Dev lib): http://www.libsdl.org/download-2.0.php 3. New Win32 Console Application-"Empty Project" 4. Source file-"Add Main.cpp 5. Copy the Include and Lib folders under Dev FFmpeg to the Main.cpp sibling directory 6. Copy the. dll file in the Bin folder under Shared FFmpeg to the Main.cpp sibling directory 7, if installed MinGW the installation directory of Inttypes.h, stdint.h, _mingw.h three files copied to the project include folderYou can also download the attachment file and copy it to the project include folder 8. Modify the Dev SDL under Include folder named SDL2 and copy it to the project include folder 9. Copy the. lib file under the corresponding system folder in the Dev SDL lower Lib folder to the project Lib folder 10. Copy the. dll file under the corresponding system folder in the Dev SDL lower Lib folder to the Main.cpp sibling directory 11. Configuring VS2005 Project Properties
- Project-"Project Properties-" Configuration Properties-"C + +-" general-"additional Include Directories: add: Include
- Project-"Project Properties-" Configuration Properties-"linker-" general-"Additional Library directory: add: lib
- Project-"Project Properties-" Configuration Properties-"linker-" input-"Additional dependencies: Add: All Lib folders under. lib file name
12. Use the Main.cpp file code test in the attachment (this code is written by Lei Hua Lehmanbrown) 13. Compile-"error C2065:" pix_fmt_yuv420p ": undeclared identifierModify pix_fmt_yuv420p to av_pix_fmt_yuv420p 14, compile-"fatal error LNK1103: Debug information corruption; recompile the module Project-"Project Properties-" Configuration Properties-"linker-" advanced-"entry point-"Sdl_main 15, compile-"through 16. Modify the filepath variable in the code to the local video path 17, operation-"If you can see the video screen is configured successfully Note: Step 14 causes the errorThe following macro definitions are defined in Sdl_main.h: (see http://blog.csdn.net/WhyGoSoFar/article/details/4548259)
#define MAIN Sdl_main
List of attachments
Http://pan.baidu.com/s/1mhbZhZ6
1, VS2005+FFMPEG+SDL environment configuration