Comments (7)
@imranilyas Bug in FFmpeg, see Issue #133. Being worked on in issue #160
from vidgear.
@jbwps Thanks for pointing this out, A bug is discovered as follows:
Bug Summary:
https://youtu.be/Nk4HAS-HOr4
is a live stream video which do not support video only streams therefore resulted in NoneType video object from pafy
and finally "YouTube Mode is enabled and the input YouTube Url is invalid!" returned in vidgear.
I'm working on a fix, Kindly wait!!
from vidgear.
@jbwps Fixed! Kindly test testing branch by strictly following steps:
opencv-python
or opencv-contrib-python
binaries ( i.e. 4.1.1.26+)
installed on your machine. Install it from pypi as follows:
sudo pip3 install -U opencv-python
For more info., see issue #14
- Firstly, Kindly clone and install the
testing
branch as follows:
git clone https://github.com/abhiTronix/vidgear.git
cd vidgear
git checkout testing
sudo pip install .
cd
- Then rerun the same algorithm with your URL
(https://youtu.be/Nk4HAS-HOr4)
as follows:
# import libraries
from vidgear.gears import CamGear
import cv2
stream = CamGear(source='https://youtu.be/Nk4HAS-HOr4', y_tube =True, time_delay=1, logging=True).start() # YouTube Video URL as input
# infinite loop
while True:
frame = stream.read()
# read frames
# check if frame is None
if frame is None:
#if True break the infinite loop
break
# do something with frame here
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.stop()
# safely close video stream.
from vidgear.
Resolved in 03ec554 . Feel free to reopen, if something doesn't works for you.
from vidgear.
I'm using CamGear and the following live youtube url: https://www.youtube.com/watch?v=ZWcV3g23c8Y&ab_channel=CNN-News18
After about 40 seconds, the livestream terminates and I get the following errors:
[tls @ 000001835c367600] Unable to read from socket
[tls @ 000001835c398580] Failed to send close message
[tls @ 000001835c394e40] Unable to read from socket
[tls @ 000001835c394ac0] Failed to send close message
from vidgear.
from vidgear.
Since GStreamer isn't available, what can I use as a substitute for the
backend parameter in the CamGear function?
@imranilyas Nothing else works for now, you have to wait for #160 to be resolved.
from vidgear.
Related Issues (20)
- [Question]: Fetch Multiple Video from Youtube HOT 3
- [Proposal]: Dropped support for Python 3.7.x legacy HOT 2
- [Question]: How to get original video fps with VideoGear. HOT 8
- [Bug]: ScreenGear's options wrong names HOT 13
- [Bug]: CamGear - Error when loading first segment , while taking picture from youtube streaming HOT 2
- [Bug]: In NetGear client.recv() stucking in a some non returnable loop HOT 4
- [Proposal]: Add type annotations to the code or add stub files HOT 2
- [Proposal]: Add ffmpeg creationflag in Writegear API HOT 1
- [Bug]: frame desynchronization HOT 6
- [Question]: Does VidGear support downloading arbitrary frames and getting video sizes? HOT 4
- Putting a client IP into the Server code? HOT 2
- [Bug]: Stream gear imposes simplified aspect ratios, which does not seem necessary HOT 1
- [Bug]: no sound on output video with bare minimum code on google colab HOT 4
- [Bug]: No video shown on RTSP tested with VLC HOT 2
- [Question]: how to stream frames from opencv capture already in use? HOT 2
- Exception in thread NetGear, zmq.error.Again: Resource temporarily unavailable HOT 7
- [Question]: looping? HOT 2
- [Bug]: Freezes video thread when processing background thread? HOT 5
- [Bug]: Logging issue with yt-dlp HOT 2
- How to use nvdec/nvenc HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vidgear.