Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Apr 11, 2021
1 parent 92986c9 commit 359001f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def __init__(self, sources='streams.txt', img_size=640, stride=32):
# 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 'youtube.com/' in url or 'youtu.be/' in url: # if source is YouTube video
check_requirements(file=None, include=('pafy', 'youtube_dl'))
import pafy
url = pafy.new(url).getbest(preftype="mp4").url
Expand Down

0 comments on commit 359001f

Please sign in to comment.