I want to get the live stream from youtube, and for that, I have used opencv along with the package vidgear. But while running the code, I am getting the following error. I am sure that there is no problem with the URL. I have tried with pafy and streamlink. Even though both have given the result but after few frames, it was getting stuck and I want sequential frames without any pause. #23
Labels
DUPLICATE ♻️
Similar issue or PR already exists
SOLVED 🏁
This issue/PR is resolved now. Goal Achieved!
import cv2
from vidgear.gears import CamGear
stream = CamGear(source="https://www.youtube.com/watch?v=VIk_6OuYkSo", y_tube =True, time_delay=1, logging=True).start() # YouTube Video URL as input
while True:
cv2.destroyAllWindows()
stream.stop()
'NoneType' object has no attribute 'extension'
Traceback (most recent call last):
File "C:\Users\CamfyVision\AppData\Local\Programs\Python\Python36\lib\site-packages\vidgear\gears\camgear.py", line 120, in init
print('Extension: {}'.format(_source.extension))
AttributeError: 'NoneType' object has no attribute 'extension'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "DronrStream.py", line 4, in
stream = CamGear(source="https://www.youtube.com/watch?v=VIk_6OuYkSo", y_tube =True, time_delay=1, logging=True).start() # YouTube Video URL as input
File "C:\Users\CamfyVision\AppData\Local\Programs\Python\Python36\lib\site-packages\vidgear\gears\camgear.py", line 125, in init
raise ValueError('YouTube Mode is enabled and the input YouTube Url is invalid!')
The text was updated successfully, but these errors were encountered: