diff --git a/utils/datasets.py b/utils/datasets.py index b3e0dbb3523e..9eba83dd425c 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -301,7 +301,7 @@ def __init__(self, sources='streams.txt', img_size=640, stride=32, auto=True): # Start thread to read frames from video stream st = f'{i + 1}/{n}: {s}... ' if 'youtube.com/' in s or 'youtu.be/' in s: # if source is YouTube video - check_requirements(('pafy', 'youtube_dl')) + check_requirements(('git+https://github.com/Cupcakus/pafy', 'youtube_dl')) import pafy s = pafy.new(s).getbest(preftype="mp4").url # YouTube URL s = eval(s) if s.isnumeric() else s # i.e. s = '0' local webcam