Powered by Blogger.

Running QtAV project using QT5, FFMpeg and VS2010 on Windows 7/8

Monday, April 1, 2013

1. Install VS2010

2. Install QT5 Creator
- Download "Qt 5.0.1 for Windows 32-bit (VS 2010, 481 MB)" from this link.

3. Download QtAV source code as a zip file from this link.
- Extract the file
- Paste that extracted file to "C:\Qt\Qt5.0.1\Tools\QtCreator\bin"

4. Open QT5 Creator
- Open the QtAV project file (QtAV.pro) in "C:\Qt\Qt5.0.1\Tools\QtCreator\bin\QtAV-master" using menu File -> Open File or Project
- Click "Configure Project"

5. Setup FFMpeg
- Download FFMpeg file (FFmpeg-1.2_mingw32+msvc_20130316) from this link.
- Extract it
- Paste to "C:\Program Files (x86)"
- Append following variables in QT Creator:
  INCLUDE = "C:\Program Files (x86)\FFmpeg-1.2_mingw32+msvc_20130316\include"
  LIB = "C:\Program Files (x86)\FFmpeg-1.2_mingw32+msvc_20130316\lib"

6. Run the program
- Click the run button in left side panel
- You may get some errors, now let us copy the relevant missing DLLs

7. Copy the following relevant DLL files to "C:\Qt\Qt5.0.1\Tools\QtCreator\bin\QtAV-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug\bin"
- Copy these DLLs (avcodec-54.dll, avformat-54.dll, avutil-52.dll, swscale-2.dll, zlib1.dll) from "C:\Program Files (x86)\FFmpeg-1.2_mingw32+msvc_20130316\bin"
- Copy this DLL (libportaudio-2.dll) from the bin folder of "portaudio-v19_msvc+mingw32_20130209". You can download it from this link.
- Copy this DLL (pthreadGC2.dll) in "pthreadGC2". Link to download.
- Copy these DLLs (Qt5Cored.dll, Qt5Guid.dll, Qt5Widgetsd.dll) from "C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin"

8. Run the program again. Now hopefully It should show the following screen
- Make sure to delete these files (.qmake, config, Makefile) in "C:\Qt\Qt5.0.1\Tools\QtCreator\bin\QtAV-build-Desktop_Qt_5_0_1_MSVC2010_32bit-Debug" before you run the program.

If it is not successful you may use dependency walker to find which DLLs are missing.

1 comment:

Unknown said...

Can FFMpeg used in Qt 4.7.4?