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
Pulling Youtube Video #14
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@leehanchung Bug discovered in Bug summary:
Affected users:Users with OpenCV installed with Non-Affected users:Users with OpenCV installed from scratch/source-code and not from PyPi Test-Code:import cv2
import pafy
video = pafy.new("dQw4w9WgXcQ")
object = video.getbestvideo()
url = object.url
print(url) #means pafy and youtube-dl working correctly
stream = cv2.VideoCapture(url)
# infinite loop
while True:
(grabbed, frame) = stream.read()
# read frames
# check if frame empty
if not grabbed:
print('opencv is buggy')
break
cv2.imshow("Output Frame", frame)
# Show output window
key = cv2.waitKey(1) & 0xFF
# check for 'q' key-press
if key == ord("q"):
#if 'q' key-pressed break out
break
cv2.destroyAllWindows()
# close output window
stream.release()
# safely close video stream. Temporary Workaround: 💡Uninstall |
Update:I've addressed this bug on |
Confirmed. Building opencv from scratch under Ubuntu 18.04 worked. |
Update:Travis CLI Tests for VidGear will now use Travis OpenCV Binaries prebuilt from scratch, starting from commit 3b75132 |
Update:Due to delay from |
Update:I've pushed a PR: opencv/opencv-python#229 to finally fix this bug. |
Update:Successfully Resolved in commit opencv/opencv-python@eed0f0d . Binaries will be available soon. Then this issue will be closed. TODO
|
@leehanchung Binary Released on Pypi with this bug fixed: https://pypi.org/project/opencv-python/4.1.1.26/ Install it with: sudo pip install -U python-opencv Goodluck. |
Copy and pasted your code from :github. The code fail to work. Seems like its returning some
None
frames similar to feeding cv2 w/ links generated usingPafy
.CODE:
OUTPUT:
pipenv config:
The text was updated successfully, but these errors were encountered: