-
Notifications
You must be signed in to change notification settings - Fork 853
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
Bug: https URL not working with opencv-python #204
Comments
This comment has been minimized.
This comment has been minimized.
@abhiTronix
|
The issue is not GStreamer but FFmpeg. It's most likely compiled without https support or some other build flag is missing and therefore it cannot open Youtube video streams. Your script works under Windows which confirms that this is related to FFmpeg build time configuration. To see the FFmpeg build flags check out the Dockerfiles: https://github.com/skvark/opencv-python/blob/master/docker/Dockerfile_x86_64 |
@skvark Thanks for this valuable info. Problem is indeed with FFmpeg, and I've discovered the solution:
Yes, FFmpeg is compiled with no support for openssl that enables support for
Please take a look here: |
Thanks. Note that the flag |
Thanks, @skvark for the update,
Why GPL License is not good? Please test if FFmpeg works with openSSL without Also when will be these changes will be integrated into opencv-python binaries, are you working on a new PR or You need my help on this? |
If there are GPL'ed components I would have to re-license the whole package under GPL license and any package using opencv-python, respectively, would have to be licensed under GPL. This would also mean that this package or any package which uses opencv-python could not be used for commercial purposes / proprietary applications. I have to re-buid the Docker images and check if this problem is present also on macOS. I cannot give any timetable when this will happen. Please note that this is not a bug. This is a feature request. If you wish to speed up the process, you can try to enable the SSL support in FFmpeg builds locally in the Docker images, build a opencv-python wheel and test if the solution works. |
Thank you for this valuable information. I don't want this feature just right now, but my |
@skvark Hey, Take a look at this issue: opencv/opencv#14617, Is this related? |
@abhiTronix , it is not related, that issue is caused by very long string incorrectly processed by built-in CAP_IMAGES backend. |
Actually, the complete opposite:
However, despite
Whatever is the case, GNU TLS (LGPL) should work as an alternative. |
@abhiTronix since you are the interested party, could you make a PR? |
@native-api Yeah sure, Please correct me if I'm wrong, I've to make changes to this line: Also, How do I test these changes, as I currently have access to a Ubuntu machine only? and What should I keep in my mind while making this PR, any special instructions? |
The other Dockerfile, too. If you enable Travis CI for your fork, you can override the link to Docker image that's somewhere in the build scripts and run the official build logic with your image. |
Thanks, will do. Also @native-api and @skvark , Why the When OpenCV itself provide optimized |
- Fixed Docker dependencies (both x86 & x86-64) - Fixes bug opencv#204
The libjpeg-turbo can be removed from the Dockerfiles. It has been there since beginning and I haven't had the time remove it. FYI: I can't provide much support during next 5-7 days but I will try to answer if there's something urgent. |
* Added OpenSSL & different protocol support to FFmpeg backend - Fixed Docker dependencies (both x86 & x86-64) - Fixes bug #204 * Additional Fixes - updates to OpenSSL build from scratch - removed specific protocol - Added neccessary dependency * Fixed ./Configure command * Updates for docker images: - Added perl build from scratch - Fixed wrong/redundant dependencies/paths - Fixed & updated openssl installation * Fixed Empty continuation lines bug & added comments * fix inconsitent spacing * Don't add perl 5.10 to PATH * fix syntax error * Fixed OpenSSL build fails in i686 Dockerfile due to buggy perl source * Fixing manylinux docker entrypoint for i686 in 32 bit images * ENTRYPOINT not needed, it only affects "docker run" invocations * manylinux1 provides better libcurl for cmake * manylinux1 provides the toolchain and git git install fails in i686, too * cleanup tar invocations * nasm is not installed in manylinux1 * detect i686 in openssl configure * move perl to a separate subtree as it's a private dependency * rm it after library build * comment unusual openssl build step * avoid redundant work in perl build * build each library in a separate dockerfile command for easier debugging * comment custom i686 step * update dockerfile README * opencv now bundles libjpeg-turbo and the separate's onre buid fails dueto expired certificate at https://kent.dl.sourceforge.net
Successfully Fixed & Merged in #229 |
* Added OpenSSL & different protocol support to FFmpeg backend - Fixed Docker dependencies (both x86 & x86-64) - Fixes bug #204 * Additional Fixes - updates to OpenSSL build from scratch - removed specific protocol - Added neccessary dependency * Fixed ./Configure command * Updates for docker images: - Added perl build from scratch - Fixed wrong/redundant dependencies/paths - Fixed & updated openssl installation * Fixed Empty continuation lines bug & added comments * fix inconsitent spacing * Don't add perl 5.10 to PATH * fix syntax error * Fixed OpenSSL build fails in i686 Dockerfile due to buggy perl source * Fixing manylinux docker entrypoint for i686 in 32 bit images * ENTRYPOINT not needed, it only affects "docker run" invocations * manylinux1 provides better libcurl for cmake * manylinux1 provides the toolchain and git git install fails in i686, too * cleanup tar invocations * nasm is not installed in manylinux1 * detect i686 in openssl configure * move perl to a separate subtree as it's a private dependency * rm it after library build * comment unusual openssl build step * avoid redundant work in perl build * build each library in a separate dockerfile command for easier debugging * comment custom i686 step * update dockerfile README * opencv now bundles libjpeg-turbo and the separate's onre buid fails dueto expired certificate at https://kent.dl.sourceforge.net
Bug summary:
opencv-contrib-python
python library'sVideoCapture
class fails to parse https URL received frompafy/youtube-dl
. But strangely this bug doesn't exist on same/different machine with OpenCV installed from scratch.Affected users:
Users with OpenCV installed with
opencv-contrib-python
oropencv-python
python library from PyPiNon-Affected users:
Users with OpenCV installed from scratch/source-code and not from PyPi (Tested with OpenCV 4.1.0-dev & 3.4.5)
Steps to reproduce
Ubuntu 18.04.1 bionic
x64
4.1.0.25
2019.5.20
0.5.4
3.6/2.7/3.5 tested
Test-Code:
You can copy
url
directly tocv2.VideoCapture
class and this result in same Bug.This code exit instantly with no error on
opencv-python 4.1.0.25
since no frame grabbed BUT instead this algorithm works when OpenCV installed from scratch and returns valid frames.The text was updated successfully, but these errors were encountered: