Update YouTube URL https://youtu.be/LNwODJXcvt4 (#12106)
Update example YouTube URL
This commit is contained in:
1 parent
a6659d0505
commit
ec690e42af
9 files changed
+9
-9
No files matched your search
@@ -128,7 +128,7 @@ python detect.py --weights yolov5s.pt --source 0 #
|
|||||||
list.txt # list of images
|
list.txt # list of images
|
||||||
list.streams # list of streams
|
list.streams # list of streams
|
||||||
'path/*.jpg' # glob
|
'path/*.jpg' # glob
|
||||||
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
'https://youtu.be/LNwODJXcvt4' # YouTube
|
||||||
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -121,7 +121,7 @@ python detect.py --weights yolov5s.pt --source 0 #
|
|||||||
list.txt # list of images
|
list.txt # list of images
|
||||||
list.streams # list of streams
|
list.streams # list of streams
|
||||||
'path/*.jpg' # glob
|
'path/*.jpg' # glob
|
||||||
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
'https://youtu.be/LNwODJXcvt4' # YouTube
|
||||||
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ Usage - sources:
|
|||||||
list.txt # list of images
|
list.txt # list of images
|
||||||
list.streams # list of streams
|
list.streams # list of streams
|
||||||
'path/*.jpg' # glob
|
'path/*.jpg' # glob
|
||||||
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
'https://youtu.be/LNwODJXcvt4' # YouTube
|
||||||
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
||||||
|
|
||||||
Usage - formats:
|
Usage - formats:
|
||||||
|
|||||||
Vendored
+1
-1
@@ -87,7 +87,7 @@
|
|||||||
" screen # screenshot\n",
|
" screen # screenshot\n",
|
||||||
" path/ # directory\n",
|
" path/ # directory\n",
|
||||||
" 'path/*.jpg' # glob\n",
|
" 'path/*.jpg' # glob\n",
|
||||||
" 'https://youtu.be/Zgi9g1ksQHc' # YouTube\n",
|
" 'https://youtu.be/LNwODJXcvt4' # YouTube\n",
|
||||||
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Usage - sources:
|
|||||||
list.txt # list of images
|
list.txt # list of images
|
||||||
list.streams # list of streams
|
list.streams # list of streams
|
||||||
'path/*.jpg' # glob
|
'path/*.jpg' # glob
|
||||||
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
'https://youtu.be/LNwODJXcvt4' # YouTube
|
||||||
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
||||||
|
|
||||||
Usage - formats:
|
Usage - formats:
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ Usage - sources:
|
|||||||
list.txt # list of images
|
list.txt # list of images
|
||||||
list.streams # list of streams
|
list.streams # list of streams
|
||||||
'path/*.jpg' # glob
|
'path/*.jpg' # glob
|
||||||
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
'https://youtu.be/LNwODJXcvt4' # YouTube
|
||||||
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
||||||
|
|
||||||
Usage - formats:
|
Usage - formats:
|
||||||
|
|||||||
Vendored
+1
-1
@@ -87,7 +87,7 @@
|
|||||||
" screen # screenshot\n",
|
" screen # screenshot\n",
|
||||||
" path/ # directory\n",
|
" path/ # directory\n",
|
||||||
" 'path/*.jpg' # glob\n",
|
" 'path/*.jpg' # glob\n",
|
||||||
" 'https://youtu.be/Zgi9g1ksQHc' # YouTube\n",
|
" 'https://youtu.be/LNwODJXcvt4' # YouTube\n",
|
||||||
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
|
|||||||
Vendored
+1
-1
@@ -100,7 +100,7 @@
|
|||||||
" screen # screenshot\n",
|
" screen # screenshot\n",
|
||||||
" path/ # directory\n",
|
" path/ # directory\n",
|
||||||
" 'path/*.jpg' # glob\n",
|
" 'path/*.jpg' # glob\n",
|
||||||
" 'https://youtu.be/Zgi9g1ksQHc' # YouTube\n",
|
" 'https://youtu.be/LNwODJXcvt4' # YouTube\n",
|
||||||
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ class LoadStreams:
|
|||||||
# Start thread to read frames from video stream
|
# Start thread to read frames from video stream
|
||||||
st = f'{i + 1}/{n}: {s}... '
|
st = f'{i + 1}/{n}: {s}... '
|
||||||
if urlparse(s).hostname in ('www.youtube.com', 'youtube.com', 'youtu.be'): # if source is YouTube video
|
if urlparse(s).hostname in ('www.youtube.com', 'youtube.com', 'youtu.be'): # if source is YouTube video
|
||||||
# YouTube format i.e. 'https://www.youtube.com/watch?v=Zgi9g1ksQHc' or 'https://youtu.be/Zgi9g1ksQHc'
|
# YouTube format i.e. 'https://www.youtube.com/watch?v=Zgi9g1ksQHc' or 'https://youtu.be/LNwODJXcvt4'
|
||||||
check_requirements(('pafy', 'youtube_dl==2020.12.2'))
|
check_requirements(('pafy', 'youtube_dl==2020.12.2'))
|
||||||
import pafy
|
import pafy
|
||||||
s = pafy.new(s).getbest(preftype='mp4').url # YouTube URL
|
s = pafy.new(s).getbest(preftype='mp4').url # YouTube URL
|
||||||
|
|||||||
Reference in new issue
Block a user