Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building with the upcoming Libav 10 release #2293

Closed
wants to merge 5 commits into from

Conversation

elenril
Copy link

@elenril elenril commented Feb 6, 2014

No description provided.

All relevant distros now ship the equivalent of Libav 0.8 or newer, so
drop support for everything older as it is a maintenance burden.
It is now exported by libavformat through a public API, so there is no
reason to carry an outdated custom copy.
r_frame_rate is a guessed number defined as "the least common multiple
of all framerates in the stream". It has been deprecated and removed in
new Libav releases.

Use avg_frame_rate instead, which is the average framerate of the
stream.
avcodec_encode_video() has been deprecated and removed in newer
libavcodec versions.
@kirill-korniakov
Copy link

@asmorkalov, could you please have a look?

@kirill-korniakov
Copy link

@elenril, there are several build issues, could you please fix them: http://pullrequest.opencv.org?

@elenril
Copy link
Author

elenril commented Feb 12, 2014

Seems the failing machine has a very old ffmpeg version. I cannot find exactly which one from the build logs, but if it's complaining about missing AVIO_FLAG_WRITE, then it predates even Libav 0.7 (i.e. over 3 years old).

Of course I could drop the first patch and restructure the whole set to keep compatibility even with such old versions, but the ifdef hell would be getting very very messy. So I think it'd be better if you updated ffmpeg or libav on that build machine instead.

@asmorkalov
Copy link
Contributor

@elenril The minimal supported FFmpeg version is 0.7.1. Mac builder uses 0.7.13:
$ ffmpeg --version
ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers
built on Aug 1 2012 21:08:35 with clang 3.1 (tags/Apple/clang-318.0.58)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libvpx --enable-libspeex --disable-libopencore-amrnb --disable-libopencore-amrwb --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0

@BKNio
Copy link
Contributor

BKNio commented Mar 3, 2014

@elenril any updates?

@Daniil-Osokin
Copy link

@elenril Thanks for PR! Are you going to fix this?

@Daniil-Osokin
Copy link

@elenril I'm going to close this PR if you don't work on this. But it's would be very pity.

@elenril
Copy link
Author

elenril commented Mar 20, 2014

Hi, sorry for the delay.
Unfortunately updating the patch to work with 0.6 is a bit of work, and I do not have time for it right now. So feel free to close this and I might finish it later.

I'd still ask you to reconsider this however. This version is over 3 years old and completely unsupported by either project. I really do not think anyone should be using them now.

@Daniil-Osokin
Copy link

@elenril Thanks for your effort! @asmorkalov, will we update the Libav or the PR can be closed?

@vpisarev
Copy link
Contributor

vpisarev commented Apr 8, 2014

@elenril, thanks for the patch! As I see, you've done a good job on cleaning up the wrappers. That being said, I have to close this PR and wait while a new one will be created that passes all our buildbot tests.

@vpisarev vpisarev closed this Apr 8, 2014
@madduci
Copy link
Contributor

madduci commented Nov 20, 2014

On Ubuntu 14.10, OpenCV 3.x doesn't build due the too new libav version, incompatible with existing ffmpeg wrappers in OpenCV codebase, as I've reported here: http://code.opencv.org/issues/3986
I think the building machine should be updated to at least Ubuntu 14.04, using newer libraries as well.

@Algomorph
Copy link
Contributor

Currently on Ubutnu 14.10 neither 2.4.10 nor 3.x build with ffmpeg and vtk, since apparently vtk6-dev depends on libavXXX-dev files. In general, the way I would approach this would be a new cmake drop-down-list-style option, that would enable the user to switch between libav and ffmpeg, which in turn would influence another preprocessor flag that would switch between libav & ffmpeg versions of the code, hence I think the fix proposed here is incomplete. I would not advise to sticking to just one or the other: Ubuntu will default to ffmpeg instead of libav starting from 15.04, so far as I know. I am unaware of any way libav and ffmpeg could peacefully coexist and still be useful on the same system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants