Youtube
Download and extract data from youtube videos. yt-dlp is an actively maintained fork of the defunct yt-dl.
Install
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
chmod a+rx /usr/local/bin/yt-dlp
yt-dlp --update
# libav-tools may be required: Copy all dll/exe files from
# libav-tools/win64/usr/bin to location of yt-dlp.exe.
#
# http://builds.libav.org/windows/release-gpl
winget install yt-dlp
Extract 320kbps MP3 Audio From Video
yt-dlp --extract-audio --audio-format mp3 --audio-quality 320K --keep-video --add-metadata {URL}
Extract FLAC Audio From Video.
yt-dlp --extract-audio --audio-format flac --audio-quality 0 --add-metadata {URL}
List all formats for a video and select the best ones.
yt-dlp -F {URL}
yt-dlp -f ###+### {URL}
Download only the 1080p video/audio stream from a video.
yt-dlp -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" {URL}
Download a playlist.
yt-dlp https://youtube.com/playlist?list={PLAYLIST ID} --yes-playlist
Track Downloaded Videos for Archiving.
# This downloads only videos not listed in file and adds any downloaded videos
# to the given file.
yt-dlp --download-archive {FILE}
Azure Media Services
These can be downloaded by forcing a m3u8 stream and downloading. This works for MS streaming videos and other services using Azure Media Service backends.
- ctrl + shift + i u2794 network ➔ all
- Load the video/stream page.
- Locate the manifest(format=...) URI in Chrome Dev Tools.
- RMB ➔ copy ➔ copy link address
- Use with yt-dlp changing manifest portion of the URI to manifest(format=m3u8-aapl-v3)
References123456
-
http://linuxaria.com/recensioni/how-to-download-youtube-video-or-audio-tracks-from-the-linux-terminal ↩
-
https://www.linuxjournal.com/content/grabbing-your-music-youtube-do-it-your-way ↩
-
https://askubuntu.com/questions/323944/convert-webm-to-other-formats ↩
-
https://anduin.aiursoft.com/post/2020/5/15/download-any-azure-media-service-video-or-live-stream-with-ffmpeg ↩