-
Notifications
You must be signed in to change notification settings - Fork 319
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
Problem with live youtube stream #239
Comments
Test this: abhiTronix/vidgear#16 (comment) and drop a ⭐ if helped. Goodluck! |
Hello, I am trying to use pafy and opencv to access youtube live streams. The first two or three seconds are grabbed correctly, then it freezes and next frames are grabbed after tens of seconds then freeze again, and so on. Beside this problem I would have expected a capture that takes the latest available image in the live stream whatever the grabbing rate, whereas current behavior seems to show that all frames in the stream have to be grabbed sequentially? Any ideas? Thanks! |
frames in mpeg/h264 standard format stream are dependent on each other (they are not like independent images). So, if you lose one frame, next frame can not be decoded. |
Thanks for your answer! What is Strange is that it works perfectly well with non live YouTube videos. |
because offline youtube is like file, you read offline, by your own speed, no packet is lost. but in online youtube, or IP-camera, you need to decode this frame, before losing next frame. |
Yes it makes sense. Thanks. Thus, any other link to share that would show how to access decoded live streaming frames in opencv ? I searched different forums without success so far... |
what is your platform? do you work on an ARM board, like Raspberry? |
No. Standard desktop under Linux or Windows.Le 22 sept. 2019 20:39, Refigh <notifications@github.com> a écrit :what is your platform? do you work on an ARM board, like Raspberry?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
|
As I wrote, I recently learnt that opencv does not use GPU/internal decoder/encoder,... and you need to find a way to use them. |
Hi
I was able to use this tool to play YouTube video in Python 3+OpenCV 4.1. However, when I use URL of a live YouTube I get below error:
File "/usr/local/lib/python3.6/dist-packages/pafy/pafy.py", line 124, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts)
File "/usr/local/lib/python3.6/dist-packages/pafy/backend_youtube_dl.py", line 29, in init
super(YtdlPafy, self).init(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pafy/backend_shared.py", line 96, in init
self._fetch_basic()
File "/usr/local/lib/python3.6/dist-packages/pafy/backend_youtube_dl.py", line 47, in _fetch_basic
self._author = self._ydl_info['uploader']
KeyError: 'uploader'
tested live vide: "https://www.youtube.com/watch?v=YlksXBZbx8Y"
moreover, this command also generates same error:
sudo ytdl -b "https://www.youtube.com/watch?v=YlksXBZbx8Y"
Is there any support for live video?
The text was updated successfully, but these errors were encountered: