build fail with ffmpeg 0.10 (Bug #1605)


Added by Jim Tan over 1 year ago. Updated 8 months ago.


Status:Cancelled Start date:2012-02-18
Priority:High Due date:
Assignee:Alexander Shishkov % Done:

0%

Category:build/install
Target version:2.4.0
Affected version: Pull request:

Description

make fails at 20% for latest opencv (2.3.1a). Details as below with error log in attached.

environment: cygwin 1.7.10.1 (full installation)
system: win 7 64 bit
ffmpeg: ver 0.10
ffmpeg configured with: ./configure --enable-shared --disable-static --enable-memalign-hack
opencv cmake options: cmake -D cmake_build_type=release -D cmake install_prefex=usr/local -D build_python_support=ON ..

PKG_CONFIG_PATH is set and verified. Ticket 1585 and this ticket bears remarkable similarity (in terms of error log), unfortunately, I require both ffmpeg and highgui and cannot disable either. Pls do not hesitate to ask if more details are required, I'm a 1st time poster here. =) Any help would be much appreciated.


error.log (7.4 kB) Jim Tan, 2012-02-18 03:26 am

compile_log (114.9 kB) Jim Tan, 2012-02-22 02:17 pm


History

Updated by Jim Tan over 1 year ago

Managed to figure out what's wrong with cap_ffmpeg_impl.hpp. I guess no one has updated the header for a while...I managed to get opencv building again but have yet to test the fixes. Hope it helps anyone who got the same errors as I did.

/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:486:52: error: ‘av_open_input_file’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:494:50: error: ‘avcodec_thread_init’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:524:63: error: ‘av_open_input_file’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:541:54: error: ‘avcodec_thread_init’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1298:20: error: ‘url_fclose’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1411:35: error: ‘av_set_parameters’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1415:35: error: ‘dump_format’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1479:42: error: ‘URL_WRONLY’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1479:52: error: ‘url_fopen’ was not declared in this scope
/usr/local/opencv-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp:1485:25: error: ‘av_write_header’ was not declared in this scope

replace av_open_input_* with avformat_open_input
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=05e84c95c7f0543553af8f0ebd50fb5604e7e2ff

avcodec_thread_init removed
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=ba9ef8d04ecd009036b7c380e71bac081c56c53e
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=c0b102ca03fe92250f1ce620aec3836f529fc1d6
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=65af48b55930abe5ac9130be3ff4d9c287a7f010

replace url_fclose/url_fopen with avio_close/avio_open
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=22a3212e32b696028e21f00871f3cb48c044029d

replace URL_WRONLY with AVIO_FLAG_WRITE
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=f87b1b373a0df55080c1e6a5874f9a0a75c6fee8
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=59d96941f0285a501989d5f2c9b69be0a1393ed5

replace dump_format with av_dump_format
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=997420abf2e5856f5b9e9267ca5cce6fe5c8a406
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=adf94155989c765c4cac6e3ef5d3526555ad2274

Codes involving av_set_parameters commented out, reason: no longer used
replace ‘av_write_header’ with av_format_write_header
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=25de5958c8fd727777ebf8c4f7a9df6f9b8eb82d

Updated by Jim Tan about 1 year ago

Jim Tan wrote:

make fails at 20% for latest opencv (2.3.1a). Details as below with error log in attached.

environment: cygwin 1.7.10.1 (full installation)
system: win 7 64 bit
ffmpeg: ver 0.10
ffmpeg configured with: ./configure --enable-shared --disable-static --enable-memalign-hack
opencv cmake options: cmake -D cmake_build_type=release -D cmake install_prefex=usr/local -D build_python_support=ON ..

PKG_CONFIG_PATH is set and verified. Ticket 1585 and this ticket bears remarkable similarity (in terms of error log), unfortunately, I require both ffmpeg and highgui and cannot disable either. Pls do not hesitate to ask if more details are required, I'm a 1st time poster here. =) Any help would be much appreciated.

Credits to CUI Zhaohui () for his email below:

Before compiling OpenCV-2.3.1a
(http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2/download) , I compiled ffmpeg manually:

Yesterday, I compile and install git version (2012-02-21), then compile
opencv, I got the same error as described in "Bug
#1605"(http://code.opencv.org/issues/1605) . I try to patch ffmpeg's
source code as Jim Tan's suggestions, but can't find appropriate
position in source files. Because source files in git version seems
rather different against patches in Jim Tan's suggestions. I give up.

Today, I compile and install 0.10 version
(http://ffmpeg.org/releases/ffmpeg-0.10.tar.bz2) , then compile opencv,
NO ERRORs occur. Attachment is my compile_log.

May this will help.
Best regards.

Nice catch, I missed out the fact that my ffmpeg is from git and not from tarball....this should help clear up any confusion

Updated by Alexander Shishkov about 1 year ago

CUI Zhaohui, thank you very much for your mail! I have also compiled OpenCV with ffmpeg 0.10 without errors, so we can close this issue.

Jim Tan, thank you for detailed advice about replacing FFMPEG functions. Now we are developing new wrapper for FFMPEG, so your message is helpful for us.

  • Status changed from Open to Cancelled

Updated by Andrey Kamaev about 1 year ago

  • Target version set to 2.4.0

Updated by Abama Abama 8 months ago

opencv can make the fingerprint identification?Recently,i need to make this project. i'm from China . i want to make friends.

Also available in: Atom PDF