mirror of https://github.com/WongKinYiu/yolov7.git
parent
dc3e04087d
commit
894a93e318
|
@ -282,7 +282,7 @@ class LoadStreams: # multiple IP or RTSP cameras
|
|||
# Start the thread to read frames from the video stream
|
||||
print(f'{i + 1}/{n}: {s}... ', end='')
|
||||
url = eval(s) if s.isnumeric() else s
|
||||
if 'youtube.com/' in url or 'youtu.be/' in url: # if source is YouTube video
|
||||
if 'youtube.com/' in str(url) or 'youtu.be/' in str(url): # if source is YouTube video
|
||||
check_requirements(('pafy', 'youtube_dl'))
|
||||
import pafy
|
||||
url = pafy.new(url).getbest(preftype="mp4").url
|
||||
|
|
Loading…
Reference in New Issue