- Summary
- Website
- Install
- Download Single Video
- Download Video Not Inferred from Web Page
- Download All Videos from YouTube Channel
- Stacher7 - GUI for yt-dlp
Open source YouTube Downloader can download both video and audio from not just YouTube but many other social media sites including Facebook, Twitter / X etc.
If you don't want to run the open source command line version, you can try this website:
Install yt-dlp to download, and ffmpeg for conversions:
brew install yt-dlp ffmpegThere's a long list of extractors for different sites:
yt-dlp --list-extractorsbut it even works on even sites for which there aren't special extractors.
Show available download formats:
yt-dlp -F "$url"You can then choose the format quality you want:
yt-dlp -f "$format_id" "$url"If you get an error like this:
ERROR: [youtube] ...: Sign in to confirm you’re not a bot.You can add this switch with your browser to use its cookies:
--cookies-from-browser chrome
Use script from DevOps-Bash-tools repo to simplify downloading with maximum quality and compatibility, with continue and no overwrite settings.
This script has symlinks for X/Twitter and Facebook too as it can download from those sites and should also work for all
those listed by the above command of yt-dlp --list-extractors:
youtube_download_video.sh "$url"These are just symlinks for convenience:
x_download_video.sh "$url"twitter_download_video.sh "$url"facebook_download_video.sh "$url"The script will even attempt to install yt-dlp and ffmpeg prerequisites if not already installed.
If you get an error like this:
ERROR: [youtube] ...: Sign in to confirm you’re not a bot.then export this:
export YT_DLP_COOKIES_FROM_BROWSER=chromeand re-run the script, which will then use the switch --cookies-from-browser chrome.
The yt-dlp tool works really well for extracting the video from many different web pages, but
if it fails to parse the page, there is a workaround:
- Open Chrome Developer Tools or similar network request tracing
- Click to play the video
- Record the
m3u8url from the Network section - Pass the
m3u8url to the script - sinceyt-dlpwill infer the filename from the m3u8 filename, you'll likely want to pass a second argument to the script for the real filename eg.Some Video.mp4
youtube_download_video.sh "https://.../index.m3u8" "Some Video.mp4"Using DevOps-Bash-tools repo:
youtube_download_channel.sh "$url"