YouTube Clips
See original GitHub issueChecklist
- I’m reporting a site feature request
- I’ve verified that I’m running yt-dlp version 2022.01.21. (update instructions)
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
Worldwide, depending on regional video blocking
Example URLs
https://youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof https://youtube.com/clip/UgytZKpehg-hEMBSn3F4AaABCQ
Description
(Note: This is not for post-processor segment trimming, like with FFMPEG. This is for the feature on YouTube that allows you to get a 5 - 60 second clip of a video.)
Right now, YouTube clips don’t work, and instead download the entire video. While this feature is currently lacking (it’s only available on certain channels and selecting start - end is pretty bad), it’s a lot more user-friendly then with FFMPEG, and it might be able to download a part of the video, instead of downloading the whole thing and trimming it. It also means pre-existing clips can be downloaded more easily.
Verbose log
ggtylerr@pop-os:~/Downloads$ yt-dlp -vU https://youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof
[debug] Command-line config: ['-vU', 'https://youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.01.21 [f20d607b0]
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.15.15-76051515-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Optional libraries: Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.01.21, Current version: 2022.01.21
yt-dlp is up to date (2022.01.21)
[debug] [youtube:clip] Extracting URL: https://youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof
WARNING: [youtube:clip] YouTube clips are not currently supported. The entire video will be downloaded instead
[debug] [generic] Extracting URL: https://youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof
[generic] Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof: Requesting header
[redirect] Following redirect to https://www.youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof
[debug] [youtube:clip] Extracting URL: https://www.youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof
WARNING: [youtube:clip] YouTube clips are not currently supported. The entire video will be downloaded instead
[debug] [generic] Extracting URL: https://www.youtube.com/clip/Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof
[generic] Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof: Downloading webpage
[generic] Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof: Extracting information
[debug] Looking for video embeds
[debug] Identified a twitter:player iframe
[debug] [youtube] Extracting URL: https://www.youtube.com/embed/Jljy8KtoXOU?clip=Ugkx9hS31W7ocpw8tLKo_m-Ht7j36o5StJof&clipt=EIOqHBiv4Bw
[youtube] Jljy8KtoXOU: Downloading webpage
[youtube] Jljy8KtoXOU: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Jljy8KtoXOU: Downloading 1 format(s): 248+251
[debug] Invoking downloader on "https://rr5---sn-a5mekned.googlevideo.com/videoplayback?expire=1643548302&ei=LTr2YajaO87zkgbYq7igAQ&ip=2600%3A8801%3A1333%3Aed00%3A2548%3A916e%3Ab5a2%3Adec6&id=o-AH5tMXeS8SK2NBVSfYgY5wO_SwOAe5nW4lSe5elQATt6&itag=248&source=youtube&requiressl=yes&mh=C2&mm=31%2C26&mn=sn-a5mekned%2Csn-n4v7sn7y&ms=au%2Conr&mv=m&mvi=5&pl=40&initcwndbps=2132500&vprv=1&mime=video%2Fwebm&gir=yes&clen=348986307&dur=1572.300&lmt=1586412459679522&mt=1643526288&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgQK_RuPwxfFnrISESxlVdiXIJBlpBSLVdGwDOcVlCjaICIQDVp9Yixk61yJKAmzySAKjyiZ-H83wJ7oekyO3LgQMDWg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgXfTiGWCuosSN_NaOrzc8wdJQ4WXBMXVHL0CEHqaLOUkCIFgVtI_e4b5mppcHcdt8flVcQrZ3lwB2npnxetd7Vxjh"
[download] Destination: Game Collecting - Scott The Woz [Jljy8KtoXOU].f248.webm
[download] 100% of 332.82MiB in 00:20
[debug] Invoking downloader on "https://rr5---sn-a5mekned.googlevideo.com/videoplayback?expire=1643548302&ei=LTr2YajaO87zkgbYq7igAQ&ip=2600%3A8801%3A1333%3Aed00%3A2548%3A916e%3Ab5a2%3Adec6&id=o-AH5tMXeS8SK2NBVSfYgY5wO_SwOAe5nW4lSe5elQATt6&itag=251&source=youtube&requiressl=yes&mh=C2&mm=31%2C26&mn=sn-a5mekned%2Csn-n4v7sn7y&ms=au%2Conr&mv=m&mvi=5&pl=40&initcwndbps=2132500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=25550094&dur=1572.321&lmt=1586402126333409&mt=1643526288&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAMRPfwtCC7aP_SeQgnkjz7Kva89TQHQzGRNttNcUWMjDAiAwY6wBLLV3ETMuip1q7Tk47jrGFIdYsY7OL8uCSgbcPw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgXfTiGWCuosSN_NaOrzc8wdJQ4WXBMXVHL0CEHqaLOUkCIFgVtI_e4b5mppcHcdt8flVcQrZ3lwB2npnxetd7Vxjh"
[download] Destination: Game Collecting - Scott The Woz [Jljy8KtoXOU].f251.webm
[download] 100% of 24.37MiB in 00:01
[Merger] Merging formats into "Game Collecting - Scott The Woz [Jljy8KtoXOU].webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Game Collecting - Scott The Woz [Jljy8KtoXOU].f248.webm' -i 'file:Game Collecting - Scott The Woz [Jljy8KtoXOU].f251.webm' -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart 'file:Game Collecting - Scott The Woz [Jljy8KtoXOU].temp.webm'
Deleting original file Game Collecting - Scott The Woz [Jljy8KtoXOU].f251.webm (pass -k to keep)
Deleting original file Game Collecting - Scott The Woz [Jljy8KtoXOU].f248.webm (pass -k to keep)
ggtylerr@pop-os:~/Downloads$
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Share clips - YouTube Help
Select and share a small portion (clip) of a video or live stream with others by clipping it. Clips can be shared on...
Read more >What Are YouTube Clips and How Do You Use Them?
Video Clips on YouTube are a new way for content creators and viewers to share bite-sized Clips of longer videos and live streams....
Read more >How to Make YouTube Clips - Social Media Examiner
You can use a similar workflow to create clips from the YouTube app. Open one of your channel's videos and tap the Clip...
Read more >The ultimate guide to YouTube's Clip button | Clipchamp Blog
The Clip button, also known as the scissor icon, lets anyone select and share 5 to 60 seconds of an existing YouTube video....
Read more >YouTube's new “Clips” feature lets users share 60-second ...
YouTube's new “Clips” feature lets users share 60-second clips of videos · Just like on Twitch, "clips" lets users chop up and share...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just tried this and it’s not downloading the right part of the video? It’s downloading like, from 5 seconds (clip duration?) before start of clip to the start of the clip, not from the start of the clip to the end of the clip
Here’s the clip I tried to download: https://youtube.com/clip/UgkxdIc_hmqiDzYn3zoGbskyrVEnI4t_1Sod
And here’s what it gave me: https://image-host.club/ih0tco.webm ( github doesn’t support webm uploads 😦 )
(yt-dlp compiled just now, through the AUR package yt-dlp-git)
#52 is now closed. Once an extractor for clips is written, this should be all the core changes needed to make the download work: