Remove obsolete FFMPEG versions support#18146
Conversation
|
@mshabunin could you take a look? |
|
Is this patch applicable to 3.4 or we will keep that branch frozen? Why GCC 6? Is there a problem with 4.8? |
I think it is better to keep 3.4 in the state as it is, applying bug fixes and without radical (like version increments) changes. GCC 4.8 does not fully C++11 complaint (some features are missing and not full library support). OpenCV 4.x uses C++11 as default, so I took GCC 6, but it is possible to use GCC 5.1 (full C++11 support). compiler support |
|
I've checked several FFmpeg versions built from sources on Ubuntu 20 and found one issue: It is reproduced only with several older FFmpeg versions: 1.1.16 - 2.2.16 ; which is strange because this line should not be compiled. Though this issue exists on master branch too, so I it is not a problem of this PR. |
|
Thanks for validation with interesting results, so the issue is reproducible only for this range of versions, isn't it? I will check them on my own too and come up with possible fix in separe PR. What compiler do you use? |
|
I tested with default Ubuntu 20 compiler: GCC 9.3.0. See https://github.com/mshabunin/videoio-ffmpeg-check More cases covered:
|
|
Please add some note/comment about minimal handled FFmpeg / libav versions (and their release dates/years) |
- Oldest available version via official FFMPEG repository mirror has tag v.0.5 LIBAVFORMAT version for this tag is 52.31.0
|
@tomoaki0705 Could you check that this PR works on your devices? (there is conflict with changes from #18119 ) |
It won't work, because I would like to raise minimal libavcodec version up to 54.35.100 (tested) and versions checks to the |
|
@VadimLevin is correct. It did fail building, but it didn't come up at cmake stage Is this expected ? (your message insists that error should appear in cmake stage) I don't think we need to support the issue about #18119 I vote +1 for raise minimal |
|
Not this message, the user should receive a message about what version is detected and what is the minimal version on CMake configuration step. Current behavior is an error during the build if there is missing (or renamed) symbol. I'm working on it and it will be ready today. |
- Add verbose message about what FFMPEG libraries are missing. - Add minimal versions check set to libav 9.20 release (default ubuntu 14.04) and FFMPEG 1.1.16 release. If the check is failed CMake produces user-friendly message instead of build error.
3ebb877 to
8b8d32e
Compare
|
I resolved problems with missing |
…ove-obsolte-versions-support Remove obsolete FFMPEG versions support * refactor: removed obsolete FFMPEG version support - Oldest available version via official FFMPEG repository mirror has tag v.0.5 LIBAVFORMAT version for this tag is 52.31.0 * refactor: prefer std::min function to MIN macro * refactor: use appropriate macro instead of manual version calculation * refactor: remove macros for versions prior 0.5.15 release * refactor: remove libavcodec macros for versions < 54.35.1 (default to Ubuntu 14.04) * refactor: remove libavformat macro for versions < 54.20.4 (default ubuntu 14.04) * refactor: remove libavutil macro for versions < 52.3.0 (default ubuntu 14.04) * refactor: remove missed macros for libavcodec and libavformat * refactor: remove unused _opencv_ffmpeg_free function * build: add FFMPEG libraries versions checks - Add verbose message about what FFMPEG libraries are missing. - Add minimal versions check set to libav 9.20 release (default ubuntu 14.04) and FFMPEG 1.1.16 release. If the check is failed CMake produces user-friendly message instead of build error. * fix: libavcodec version guard for AVDISCARD_NONINTRA * fix: libav check of libavcodec version guard for AVDISCARD_NONINTRA * fix: version check for AV_CODEC_FLAG_GLOBAL_HEADER * fix: missing FFMPEG libraries output
In order to move further with extending existed functionality and reduce support costs about 3-4 months ago on the OpenCV core team meetings it was decided to limit FFMPEG versions to the versions that are available in the Ubuntu 14.04 LTS release:
I tested using the following Docker container:
The only difference from the default Ubuntu 14.04 setup is newer versions of GCC (6.5) and CMake (3.16).
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.