Thanks to all the netizens who want to learn FFMPEG after porting FFMPEG to the VC environment, the well-known FFmpeg is all open-source in Windows vc6 and the compiling environment is vc6 + SP5 + vcpp5. Don't forget the top sticker.
After FFmpeg is transplanted to Windows, the main modification is that vc6 in FFMPEG does not support c99 syntax. The simple migration steps are as follows: 1: install Linux, VMWare, and SDL, and configure SMB, compiled in Linux to verify the correct run. 2: drag all the files in the corresponding directory in Linux to Windows through SMB. Subsequent modifications and migrations will be performed in windows. 3: Compare all. c file and. o file, if there is. the C file does not have the corresponding name. o file, which indicates this. c files are not compiled. They are redundant and can be deleted directly. However, I used to add a. Old suffix to this file to mark dozens of such files. Note the following. c files are included in other. c file, so no. O files cannot be deleted. My habit is to add such files. INC suffix, and modify the file name of the corresponding include. A total of such files include pai_ls.c.inc, mdec. C. Inc, motion_est_template.c.inc, svq3.c. INC and wmv2.c. Inc. 4. Modify the config. h file and disable the Assembly acceleration switch such as MMX and sse2. Define config_win32 to indicate that the target system is Win32. 5. delete all the intermediate files generated by Linux compilation in the directory, including. O files,. D files, and executable files in Linux. If you are afraid of deletion errors, back up the data. 6: Use vc6 to create a project file and put all files. C and. the H file is added to the project, excluding FFMPEG. c/ffserver. c file, excluding the suffix modified. old File and. inc file. Note that the libavcodec and libavformat directories have the same name. c file. c file. I used to add _ CODEC to the file name under the libavcodec directory, and _ format to the file name under the libavformat directory. 7: to avoid too many switching ideas, you can only process one aspect at a time. First, search all avcodec instances. the definition in the H file is changed to the c99 syntax. Generally, it is to fill in null or 0 values, then search and process all avinputformats, and finally search and process all avoutputformats. 8: Search and process all avrational syntax. 9: At this point, the main changes have basically been completed, and the rest mainly include dynamic arrays, some array initialization, and function real-time parameter initialization. 10: it is easier to modify one-dimensional dynamic arrays and multi-dimensional dynamic arrays. However, multi-dimensional dynamic arrays are mostly used for encoding. If decoding is required, it can be simply commented out. 11: you only need to add a temporary variable for Array initialization and function real-time parameter initialization, which is easy to modify. 12: Some. H files cannot be found in vc6, some can be copied from Linux, or can be customized by yourself. During the final compilation and modification of the. c file, it is not necessary to compile all the files one by one. In the end, I wish you good luck and a smooth migration. The open-source FFMPEG version is 51.8.0. I modified it for about five days.