Programming/MFC-C++

FFmpeg static libray compile

빠릿베짱이 2014. 10. 21. 20:42
반응형

원문 링크 : http://ramu492.blogspot.kr/2013/06/porting-ffmpeg-on-to-winodws7-and.html

컴파일 환경 : Windows 7 64bit

Porting FFMPEG on to Winodws7 and Visual studio 2010

Pre Requisite: VS2010 - ultimate with C++:

1. Download MinGW:

Generic/Latest: Refer to the latest version of MinGW here and install it. It will by default get installed in c:/ drive of windows file system. Locate the msys.bat file in the C:/MinGW/msys/1.0/.

see here for download and more details (MinGW)(Install Instructions).

Specific/Verified : mingw-get-inst-20120426.exe.zip  ( Download )
Move it to C:/MinGW and unzip the package there.

2) Run the install file - mingw-get-inst-20120426.exe

  • Accept all the default settings recommended by the MinGW installer.
  • On the Select Components Screen - choose C, C++, MSYS Basic System, MinGW Developer Toolkit.
  • Verify the following on the last step before install:
Installing:
mingw-get
pkginfo
C Compiler
C++ Compiler
MSYS Basic System
MinGW Developer Toolkit

Using pre-packaged repository catalogues (20120426). Destination location: C:\MinGW

  • Click Install.

At this point you should see a command window launch and begin the installation. TBD: Capture the install logs here - HOW?:



This can take a 30 min minutes to install based on network conditions. Move on to Step 4 while this install happens.

3) Download the FFMpeg distribution
Generic/Latest : ffmpeg-1.2.1.tar.bz2
Specific/Verified : from here : FFMPEG

4) Verify you see this file system like structure under c:\MinGW

C:\MinGW>dir
Volume in drive C has no label.
Volume Serial Number is 3EE0-A8EF

Directory of C:\MinGW
06/21/2013 11:32 AM <DIR> .
06/21/2013 11:32 AM <DIR> ..
06/21/2013 11:33 AM <DIR> bin
06/21/2013 11:32 AM <DIR> doc
06/21/2013 11:33 AM <DIR> include
06/21/2013 11:33 AM <DIR> lib
06/21/2013 11:32 AM <DIR> libexec
06/17/2013 11:33 AM 662,689 mingw-get-inst-20120426.exe
06/21/2013 11:04 AM 622,530 mingw-get-inst-20120426.zip
06/21/2013 11:32 AM <DIR> mingw32
06/21/2013 11:32 AM <DIR> msys
06/21/2013 11:33 AM <DIR> share
06/21/2013 11:13 AM 22,225 unins000.dat
06/21/2013 11:07 AM 748,318 unins000.exe
06/21/2013 11:13 AM <DIR> var
4 File(s) 2,055,762 bytes
11 Dir(s) 209,641,558,016 bytes free

5) IMPORTANT: Open up visual studio developer console ( under Start>All Programs> VS12> VS Tools> Developer command prompt for VS12 ) and Navigate to c:\MinGW\msys\1.0>
-->msys.bat 파일에서 첫줄에 다음과 명령 추가

call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"


6) Run msys.bat from here.
This creates a /home/<your win username> for you and probably does some more config for you. After this you will see a MinGW shell launched.

This completes MinGW setup.

7) Under windows explorer go to
C:\MinGW\msys\1.0\home\<your-win-username> and
Unzip ffmpeg-1.2.1.tar.bz2 here.
This will create the FFMpeg file structure under your ‘MinGW home’
//FFMpeg 1.1.3 테스트 성공
c:\MinGW\msys\1.0\home\<your-win-username>\ffmpeg-1.2.1>dir
Volume in drive C has no label.
Volume Serial Number is 3EE0-A8EF
Directory of c:\MinGW\msys\1.0\home\<your win user name>\ffmpeg-1.2.1
06/21/2013 12:00 PM <DIR> .
06/21/2013 12:00 PM <DIR> ..
05/10/2013 05:46 AM 729 arch.mak
05/10/2013 05:46 AM 38,556 Changelog
05/10/2013 05:46 AM 62,675 cmdutils.c
05/10/2013 05:46 AM 18,849 cmdutils.h
05/10/2013 05:46 AM 1,996 cmdutils_common_opts.h
05/10/2013 05:46 AM 3,684 common.mak
06/21/2013 11:59 AM <DIR> compat
05/10/2013 05:46 AM 142,476 configure
12/04/2012 02:47 AM 18,092 COPYING.GPLv2
12/04/2012 02:47 AM 35,147 COPYING.GPLv3
05/10/2013 05:46 AM 26,526 COPYING.LGPLv2.1
12/04/2012 02:47 AM 7,651 COPYING.LGPLv3
05/10/2013 05:46 AM 274 CREDITS
06/21/2013 11:59 AM <DIR> doc
05/10/2013 05:46 AM 119,760 ffmpeg.c
05/10/2013 05:46 AM 13,260 ffmpeg.h
05/10/2013 05:46 AM 33,074 ffmpeg_filter.c
05/10/2013 05:46 AM 102,278 ffmpeg_opt.c
05/10/2013 05:46 AM 117,643 ffplay.c
05/10/2013 05:46 AM 84,178 ffprobe.c
05/10/2013 05:46 AM 159,536 ffserver.c
03/04/2013 04:57 AM 564 INSTALL
06/21/2013 11:59 AM <DIR> libavcodec
06/21/2013 12:00 PM <DIR> libavdevice
06/21/2013 11:59 AM <DIR> libavfilter
06/21/2013 11:59 AM <DIR> libavformat
06/21/2013 11:59 AM <DIR> libavresample
06/21/2013 11:59 AM <DIR> libavutil
06/21/2013 11:59 AM <DIR> libpostproc
05/10/2013 05:46 AM 3,712 library.mak
06/21/2013 11:59 AM <DIR> libswresample
06/21/2013 11:59 AM <DIR> libswscale
05/10/2013 05:46 AM 3,440 LICENSE
05/10/2013 05:46 AM 22,551 MAINTAINERS
05/10/2013 05:46 AM 5,366 Makefile
06/21/2013 11:59 AM <DIR> presets
05/10/2013 05:46 AM 309 README
05/10/2013 05:46 AM 6 RELEASE
06/21/2013 12:00 PM <DIR> tests
06/21/2013 11:59 AM <DIR> tools
05/10/2013 05:46 AM 6 VERSION
03/04/2013 04:57 AM 1,419 version.sh
28 File(s) 1,023,757 bytes
16 Dir(s) 209,559,293,952 bytes free


8) Download the following packages, extract and place the executables in C:\MinGW\msys\1.0\home\<your-win-username> ( basically a place where msys.bat can recognize them )

  • c99-to-c89 - compiler compatibility and porting tool used between gcc and msvc. Generic, Get here: C99-89
  • 여기서 애먹음, 1.0.2 버전을 받았더니 컴파일 에러가 생김
  • 다음 링크를 받았더니 정상적으로 작동 ( Download )
  • 버젼 별 다운로드 사이트 : https://github.com/libav/c99-to-c89/releases
  • yasm-1.2.0-win64 - assembler for win64. Generic:Yasm.
rename yasm-1.2.0-win64.exe to yasm.exe

    9) You should now see something like this under your ‘MinGW home’

    c:\MinGW\msys\1.0\home\your-win-username>dir
    Volume in drive C has no label.
    Volume Serial Number is 3EE0-A8AF
    Directory of c:\MinGW\msys\1.0\home\<your win user name>
    06/21/2013 01:25 PM <DIR> ..
    06/21/2013 11:54 AM 1,310 .inputrc
    06/21/2013 01:12 PM 2,156,961 c99-to-c89-1.0.1.zip
    12/26/2012 01:55 AM 4,436,480 c99conv.exe
    12/26/2012 01:40 AM 62,976 c99wrap.exe
    06/21/2013 01:23 PM <DIR> ffmpeg-1.2.1
    06/21/2013 11:31 AM 36,433,920 ffmpeg-1.2.1.tar
    06/21/2013 11:31 AM 5,968,378 ffmpeg-1.2.1.tar.bz2
    12/26/2012 01:15 AM 3,659 makedef
    12/20/2012 04:17 AM 52 pax_global_header
    06/21/2013 12:13 PM 358,611 yasm-1.2.0-win64.zip
    06/17/2013 04:21 PM 798,208 yasm.exe
    10 File(s) 50,220,555 bytes
    3 Dir(s) 209,684,488,192 bytes free

    10) Fix msinttypes

    Generic : (MSIntTypes)
    Specific/Verified: msinttypes-r26.zip ( Download )

    Unpack these files and place them in a folder named 'msinttypes' and move it to c:/MinGW drive. The absolute path of the files become c:/MinGW/<msint-header-files-here>. we will later link these files with cflags in configure command.

    11) You should now see something like this under your c:\MinGW

    c:\MinGW>dir
    Volume in drive C has no label.
    Volume Serial Number is 3EE0-A8EF
    Directory of c:\MinGW
    06/21/2013 12:44 PM <DIR> .
    06/21/2013 12:44 PM <DIR> ..
    06/21/2013 11:33 AM <DIR> bin
    10/02/2009 01:37 PM 5,842 changelog.txt
    06/21/2013 11:32 AM <DIR> doc
    06/21/2013 11:33 AM <DIR> include
    10/02/2009 01:35 PM 8,309 inttypes.h
    06/21/2013 11:33 AM <DIR> lib
    06/21/2013 11:32 AM <DIR> libexec
    06/17/2013 11:33 AM 662,689 mingw-get-inst-20120426.exe
    06/21/2013 11:04 AM 622,530 mingw-get-inst-20120426.zip
    06/21/2013 11:32 AM <DIR> mingw32
    06/21/2013 12:42 PM 6,897 msinttypes-r26.zip
    06/21/2013 11:32 AM <DIR> msys
    06/21/2013 11:33 AM <DIR> share
    09/17/2009 11:46 PM 7,975 stdint.h
    06/21/2013 11:13 AM 22,225 unins000.dat
    06/21/2013 11:07 AM 748,318 unins000.exe
    06/21/2013 11:13 AM <DIR> var
    8 File(s) 2,084,785 bytes
    11 Dir(s) 209,687,085,056 bytes free

    12) ADD your mingw home directory to the MinGW console path
    < your-win-username>@your-win-username-PC ~/ffmpeg-1.2.1>
    $ export PATH=$PATH:/home/<your win user name>/

    < your win user name>@your win user name-PC ~/ffmpeg-1.2.1
    $ echo $PATH
    .:/usr/local/bin:/mingw/bin:/bin:/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/c/Program Files (x86)/Microsoft SDKs/F#/3.0/Framework/v4.0/:/c/Program Files (x86)/Microsoft Visual Studio 11.0/VSTSDB/Deploy:/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/:/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/BIN:/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/Tools:/c/Windows/Microsoft.NET/Framework/v4.0.30319:/c/Windows/Microsoft.NET/Framework/v3.5:/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/VCPackages:/c/Program Files (x86)/HTML Help Workshop:/c/Program Files (x86)/Microsoft Visual Studio 11.0/Team Tools/Performance Tools:/c/Program Files (x86)/Windows Kits/8.0/bin/x86:/c/Program Files (x86)/Microsoft SDKs/Windows/v8.0A/bin/NETFX 4.0 Tools:/c/Program Files (x86)/MicrosoftSDKs/Windows/v7.0A/Bin/:/c/Program Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/c/Program Files (x86)/Windows Live/Shared:/c/Program Files/SlikSvn/bin:/c/Program Files/Microsoft/Web Platform Installer/:/c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0/:/c/Program Files (x86)/Windows Kits/8.0/Windows Performance Toolkit/:/c/Program Files/Microsoft SQL Server/110/Tools/Binn/:/c/Program Files (x86)/QuickTime/QTSystem/:/home/<your-user-name>/

    13) NOTE: There is a common problem with the path of the link.exe available in the MinGW shell. We need to use MSVC toolchain link.exe instead of the standard MinGW link.exe

    • From the MinGW shell, run $> which link
    • If you see it points to /bin/link.exe then we need to make it point to the one supplied by Windows MSVC setup - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
    • Hack: just rename the /bin/link.exe for the purpose of this FFMpeg porting.

    <your user name>@your user name-PC /bin
    $ ls link.exe
    link.exe

    <your user name>@your user name-PC /bin
    $ mv link.exe mingw_link.exe

    <your user name>@your user name-PC /bin
    $ which link
    /c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/BIN/link.exe ⇐ this is what we want!

    You are now ready to begin FFMpeg Porting on to Windows.

    Porting FFMpeg:

    1) From your MinGW shell, go to ffmpeg folder and run the configure script
    $ cd /home/<your user name>/ffmpeg-1.2.1
    $ ./configure --toolchain=msvc --enable-shared --extra-cflags="-l/c/MinGW/"
    --> 이부분의 뒤에 옵션은 변경해도 될 듯 하다. 일단 추측
    2) ./configure --toolchain=mvsc --enable-shared --extra-cflags="-I/c/MinGW"
    It takes a 5-10 minutes to spew out even the first few lines of console output.

    At this point you should begin seeing the FFMpeg build structure getting configured.

    3) Next you have to make and make-install FFMPeg
    $ make

    --> 여기서 Inttypes.h 를 찾을 수 없다고 에러가 계속 나옴

    그래서 해당 파일을 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include 에 복사했더니 정상적으로 컴파일 됨

    < this goes on for an hour or so >
    --Take a lunch/dinner break here! ;)

    $make install

    You are now half done now!!

    You will see the ffmpeg .exe and .o files under the ffmpeg setup.

    < your user name>@your user name-PC ~/ffmpeg-1.2.1
    $ ls -l
    total 4653
    -rw-r--r-- 1 <your user name> Administrators 18092 Dec 4 2012 COPYING.GPLv2
    -rw-r--r-- 1<your user name>Administrators 35147 Dec 4 2012 COPYING.GPLv3
    -rw-r--r-- 1 <your user name> Administrators 26526 May 10 05:46 COPYING.LGPLv2.1
    -rw-r--r-- 1 <your user name>Administrators 7651 Dec 4 2012 COPYING.LGPLv3
    -rw-r--r-- 1 <your user name>Administrators 274 May 10 05:46 CREDITS
    -rw-r--r-- 1 <your user name>Administrators 38556 May 10 05:46 Changelog
    -rw-r--r-- 1 <your user name>Administrators 564 Mar 4 04:57 INSTALL
    -rw-r--r-- 1 <your user name>Administrators 3440 May 10 05:46 LICENSE
    -rw-r--r-- 1 <your user name>Administrators 22551 May 10 05:46 MAINTAINERS
    -rw-r--r-- 1 <your user name>Administrators 5366 May 10 05:46 Makefile
    -rw-r--r-- 1 <your user name>Administrators 309 May 10 05:46 README
    -rw-r--r-- 1 <your user name>Administrators 6 May 10 05:46 RELEASE
    -rw-r--r-- 1 <your user name>Administrators 6 May 10 05:46 VERSION
    -rw-r--r-- 1 <your user name>Administrators 729 May 10 05:46 arch.mak
    -rw-r--r-- 1 <your user name>Administrators 62675 May 10 05:46 cmdutils.c
    -rw-r--r-- 1 <your user name>Administrators 9468 Jun 21 14:05 cmdutils.d
    -rw-r--r-- 1 <your user name>Administrators 18849 May 10 05:46 cmdutils.h
    -rw-r--r-- 1 <your user name>Administrators 245773 Jun 21 14:05 cmdutils.o
    -rw-r--r-- 1 <your user name>Administrators 1996 May 10 05:46 cmdutils_common_opts.h

    -rw-r--r-- 1 <your user name>Administrators 3684 May 10 05:46 common.mak
    drwxr-xr-x 5 <your user name>Administrators 4096 Jun 21 13:45 compat
    -rw-r--r-- 1 <your user name>Administrators 45754 Jun 21 13:33 config.asm
    -rw-r--r-- 1 <your user name>Administrators 162 Jun 21 13:28 config.fate
    -rw-r--r-- 1 <your user name>Administrators 46351 Jun 21 13:33 config.h
    -rw-r--r-- 1 <your user name>Administrators 306245 Jun 21 13:33 config.log
    -rw-r--r-- 1 <your user name>Administrators 41861 Jun 21 13:33 config.mak
    -rwxr-xr-x 1 <your user name>Administrators 142476 May 10 05:46 configure
    drwxr-xr-x 4 <your user name>Administrators 49152 Jun 21 14:05 doc
    -rw-r--r-- 1 <your user name>Administrators 119760 May 10 05:46 ffmpeg.c
    -rw-r--r-- 1 <your user name>Administrators 11884 Jun 21 14:05 ffmpeg.d
    -rwxr-xr-x 1 <your user name>Administrators 254976 Jun 21 14:05 ffmpeg.exe
    -rw-r--r-- 1 <your user name>Administrators 13260 May 10 05:46 ffmpeg.h
    -rw-r--r-- 1 <your user name>Administrators 272427 Jun 21 14:05 ffmpeg.o
    -rw-r--r-- 1 <your user name>Administrators 33074 May 10 05:46 ffmpeg_filter.c
    -rw-r--r-- 1 <your user name>Administrators 10365 Jun 21 14:05 ffmpeg_filter.d
    -rw-r--r-- 1 <your user name>Administrators 126099 Jun 21 14:05 ffmpeg_filter.o
    -rwxr-xr-x 1 <your user name>Administrators 254976 Jun 21 14:05 ffmpeg_g.exe
    -rw-r--r-- 1 <your user name>Administrators 102278 May 10 05:46 ffmpeg_opt.c
    -rw-r--r-- 1 <your user name>Administrators 9977 Jun 21 14:05 ffmpeg_opt.d
    -rw-r--r-- 1 <your user name>Administrators 295460 Jun 21 14:05 ffmpeg_opt.o
    -rw-r--r-- 1 <your user name>Administrators 117643 May 10 05:46 ffplay.c
    -rw-r--r-- 1 <your user name>Administrators 84178 May 10 05:46 ffprobe.c
    -rw-r--r-- 1 <your user name>Administrators 8437 Jun 21 14:05 ffprobe.d
    -rwxr-xr-x 1 <your user name>Administrators 223744 Jun 21 14:05 ffprobe.exe
    -rw-r--r-- 1 <your user name>Administrators 282001 Jun 21 14:05 ffprobe.o
    -rwxr-xr-x 1 <your user name>Administrators 223744 Jun 21 14:05 ffprobe_g.exe
    -rw-r--r-- 1 <your user name>Administrators 159536 May 10 05:46 ffserver.c
    drwxr-xr-x 11 <your user name>Administrators 524288 Jun 21 14:05 libavcodec
    drwxr-xr-x 2 <your user name>Administrators 24576 Jun 21 14:05 libavdevice
    drwxr-xr-x 4 <your user name>Administrators 98304 Jun 21 14:05 libavfilter
    drwxr-xr-x 2 <your user name>Administrators 262144 Jun 21 14:05 libavformat
    drwxr-xr-x 4 <your user name>Administrators 4096 Jun 21 11:59 libavresample
    drwxr-xr-x 10 <your user name>Administrators 40960 Jun 21 13:46 libavutil
    drwxr-xr-x 2 <your user name>Administrators 4096 Jun 21 12:00 libpostproc
    -rw-r--r-- 1 <your user name>Administrators 3712 May 10 05:46 library.mak
    drwxr-xr-x 4 <your user name>Administrators 8192 Jun 21 13:46 libswresample
    drwxr-xr-x 6 <your user name>Administrators 8192 Jun 21 14:05 libswscale
    drwxr-xr-x 2 <your user name>Administrators 4096 Jun 21 12:00 presets
    drwxr-xr-x 4 <your user name>Administrators 4096 Jun 21 12:00 tests
    drwxr-xr-x 2 <your user name>Administrators 8192 Jun 21 11:59 tools
    -rw-r--r-- 1 <your user name>Administrators 31 Jun 21 13:42 version.h
    -rwxr-xr-x 1 <your user name>Administrators 1419 Mar 4 04:57 version.sh


    All the DLLs and .lib files should now be located under the C:\MinGW\msys\1.0\local folder. Check them out.

    You are now done with MinGW shell to cross compile FFMpeg on to Windows 7


    FFMpeg VS2012 integration

    Refer to this online page for generic steps: Linking FFMPEG and VS

    1) Open an existing VC++ project
    2) Under project properties>C/C++>Code Generation>Runtime Library
    3) Define
    #define inline __inline in your top level header file.

    TBD - this is causing errors in VS12
    This causes xkeycheck.h define errors - they are supposedly obsolete - investigate - http://www.garagegames.com/community/forums/viewthread/131675

    4) Refer to the Fix msinttypes section above and get the inttypes.h from msinttypes-r26.zip place them in a place where MSVS can see them.
    TBD - Back up the C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\inttypes.h and revisit this aspect again

    5) set References to No (/OPT:NOREF) under the linker optimization settings,
    project properties>linker>optimization>References to
    No (/OPT:NOREF)

    TBD - analyse lib /machine:i386 /def:..\lib\foo-version.def /out:foo.lib step for /OPT:REF option

    6) SETUP VS12 path and include options for compile and runtime environments

    • project properties>C/C++>General>Additional Include Directories add include path of ffmpeg headers C:\MinGW\msys\1.0\local\include;

    • Now we need some exp and lib file generated under the c:\MinGW\msys\1.0\local\bin\ directory based on the .def files in c:\MinGW\msys\1.0\local\lib. For that open a VC developer command prompt and run the following commands
    1. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\avcodec-54.def /out:c:\MinGW\msys\1.0\local\bin\avcodec-54.lib
    2. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\avdevice-54.def /out:c:\MinGW\msys\1.0\local\bin\avdevice-54.lib
    3. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\avfilter-3.def /out:c:\MinGW\msys\1.0\local\bin\avfilter-3.lib
    4. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\avformat-54.def /out:c:\MinGW\msys\1.0\local\bin\avformat-54.lib
    5. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\avutil-52.def /out:c:\MinGW\msys\1.0\local\bin\avutil-52.lib
    6. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\swresample-0.def /out:c:\MinGW\msys\1.0\local\bin\swresample-0.lib
    7. lib /machine:i386 /def:c:\MinGW\msys\1.0\local\lib\swscale-2.def /out:c:\MinGW\msys\1.0\local\bin\swscale-2.lib

    • project properties>linker >Additional Dependencies. Add include path of ffmpeg libs by clicking edit and inserting the below ( into the space above the inherited values box)
    1. C:\MinGW\msys\1.0\local\bin\avcodec-54.lib
    2. C:\MinGW\msys\1.0\local\bin\avdevice-54.lib
    3. C:\MinGW\msys\1.0\local\bin\avfilter-3.lib
    4. C:\MinGW\msys\1.0\local\bin\avformat-54.lib
    5. C:\MinGW\msys\1.0\local\bin\avutil-52.lib
    6. C:\MinGW\msys\1.0\local\bin\swresample-0.lib
    7. C:\MinGW\msys\1.0\local\bin\swscale-2.lib
    • [OPTIONAL] project properties>linker>Additional Library Directories. add the lib path of ffmpeg libs C:\MinGW\msys\1.0\local\lib;

    • Copy all the FFMpeg DLLs generated in the c:\MinGW\msys\1.0\local\bin\ area to the Debug/Release folder in your VS12 project area. This is the same Debug folder where your final application executable is located.

    Additional Changes in the code needed for specific VS12 - ffmpeg compilation.

    Error 1
    error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Users\<your user name>\Documents\Visual Studio 2012\Projects\MFCScrRec\MFCScrRec\WinScrEncode.cpp 219 1 MFCScrRec

    Resolution:
    1) Goto project properties Configuration ProjectProperties>C/C++>Preprocessor>Preprocessor Definitions.
    2) Edit and add _CRT_SECURE_NO_DEPRECATE to the definitions ( above the Inherited values: window )

    Try out some ffmpeg samples online and it should work :)


    반응형