mirror of https://github.com/opencv/opencv.git
Scripts are updated for Linux-based (Ubuntu 14.04) mingw cross-compilation (full stack of scripts provided) Part of these scripts may work under Windows installation of MinGW, but it is not supported. FFMPEG update: 2.7.1 Added OpenH264 Cisco binaries support for H264 encoding: v1.4.0pull/4154/head
parent
ca8312b0b3
commit
56ad207d37
11 changed files with 113 additions and 64 deletions
@ -0,0 +1,3 @@ |
||||
downloads/ |
||||
*.dll |
||||
ffmpeg_version.cmake |
@ -1,42 +0,0 @@ |
||||
The build script is to be fixed. |
||||
Right now it assumes that 32-bit MinGW is in the system path and |
||||
64-bit mingw is installed to c:\Apps\MinGW64. |
||||
|
||||
It is important that gcc is used, not g++! |
||||
Otherwise the produced DLL will likely be dependent on libgcc_s_dw2-1.dll or similar DLL. |
||||
While we want to make the DLLs with minimum dependencies: Win32 libraries + msvcrt.dll. |
||||
|
||||
ffopencv.c is really a C++ source, hence -x c++ is used. |
||||
|
||||
How to update opencv_ffmpeg.dll and opencv_ffmpeg_64.dll when a new version of FFMPEG is release? |
||||
|
||||
1. Install 32-bit MinGW + MSYS from |
||||
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/ |
||||
Let's assume, it's installed in C:\MSYS32. |
||||
2. Install 64-bit MinGW. http://mingw-w64.sourceforge.net/ |
||||
Let's assume, it's installed in C:\MSYS64 |
||||
3. Copy C:\MSYS32\msys to C:\MSYS64\msys. Edit C:\MSYS64\msys\etc\fstab, change C:\MSYS32 to C:\MSYS64. |
||||
|
||||
4. Now you have working MSYS32 and MSYS64 environments. |
||||
Launch, one by one, C:\MSYS32\msys\msys.bat and C:\MSYS64\msys\msys.bat to create your home directories. |
||||
|
||||
4. Download ffmpeg-x.y.z.tar.gz (where x.y.z denotes the actual ffmpeg version). |
||||
Copy it to C:\MSYS{32|64}\msys\home\<loginname> directory. |
||||
|
||||
5. To build 32-bit ffmpeg libraries, run C:\MSYS32\msys\msys.bat and type the following commands: |
||||
|
||||
5.1. tar -xzf ffmpeg-x.y.z.tar.gz |
||||
5.2. mkdir build |
||||
5.3. cd build |
||||
5.4. ../ffmpeg-x.y.z/configure --enable-w32threads |
||||
5.5. make |
||||
5.6. make install |
||||
5.7. cd /local/lib |
||||
5.8. strip -g *.a |
||||
|
||||
6. Then repeat the same for 64-bit case. The output libs: libavcodec.a etc. need to be renamed to libavcodec64.a etc. |
||||
|
||||
7. Then, copy all those libs to <opencv>\3rdparty\lib\, copy the headers to <opencv>\3rdparty\include\ffmpeg_. |
||||
|
||||
8. Then, go to <opencv>\3rdparty\ffmpeg, edit make.bat |
||||
(change paths to the actual paths to your msys32 and msys64 distributions) and then run make.bat |
@ -0,0 +1,25 @@ |
||||
# Binary branch name: ffmpeg/master_20150703 |
||||
# Binaries were created for OpenCV: e379ea6ed60b0caad4d4e3eea096e9d850cb8c86 |
||||
set(FFMPEG_BINARIES_COMMIT "8aeefc4efe3215de89d8c7e114ae6f7a6091b8eb") |
||||
set(FFMPEG_FILE_HASH_BIN32 "89c783eee1c47bfc733f08334ec2e31c") |
||||
set(FFMPEG_FILE_HASH_BIN64 "35fe6ccdda6d7a04e9056b0d73b98e76") |
||||
set(FFMPEG_FILE_HASH_CMAKE "8606f947a780071f8fcce8cbf39ceef5") |
||||
|
||||
set(FFMPEG_DOWNLOAD_URL ${OPENCV_FFMPEG_URL};$ENV{OPENCV_FFMPEG_URL};https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${FFMPEG_BINARIES_COMMIT}/ffmpeg/) |
||||
|
||||
ocv_download(PACKAGE opencv_ffmpeg.dll |
||||
HASH ${FFMPEG_FILE_HASH_BIN32} |
||||
URL ${FFMPEG_DOWNLOAD_URL} |
||||
DESTINATION_DIR ${CMAKE_CURRENT_LIST_DIR}) |
||||
|
||||
ocv_download(PACKAGE opencv_ffmpeg_64.dll |
||||
HASH ${FFMPEG_FILE_HASH_BIN64} |
||||
URL ${FFMPEG_DOWNLOAD_URL} |
||||
DESTINATION_DIR ${CMAKE_CURRENT_LIST_DIR}) |
||||
|
||||
ocv_download(PACKAGE ffmpeg_version.cmake |
||||
HASH ${FFMPEG_FILE_HASH_CMAKE} |
||||
URL ${FFMPEG_DOWNLOAD_URL} |
||||
DESTINATION_DIR ${CMAKE_CURRENT_LIST_DIR}) |
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/ffmpeg_version.cmake) |
@ -1,13 +0,0 @@ |
||||
set(HAVE_FFMPEG 1) |
||||
set(HAVE_FFMPEG_CODEC 1) |
||||
set(HAVE_FFMPEG_FORMAT 1) |
||||
set(HAVE_FFMPEG_UTIL 1) |
||||
set(HAVE_FFMPEG_SWSCALE 1) |
||||
set(HAVE_FFMPEG_RESAMPLE 0) |
||||
set(HAVE_GENTOO_FFMPEG 1) |
||||
|
||||
set(ALIASOF_libavcodec_VERSION 55.18.102) |
||||
set(ALIASOF_libavformat_VERSION 55.12.100) |
||||
set(ALIASOF_libavutil_VERSION 52.38.100) |
||||
set(ALIASOF_libswscale_VERSION 2.3.100) |
||||
set(ALIASOF_libavresample_VERSION 1.0.1) |
@ -1 +0,0 @@ |
||||
#include "cap_ffmpeg_impl.hpp" |
@ -1,2 +0,0 @@ |
||||
set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lws2_32 |
||||
set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lws2_32 |
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue