We often need a video reference saved so we can extract high quality stills, attach a video in a presentation for inspiration, or just save some work that really inspires us. The internet is quite ephemeral in that sense, and many big brands like Apple like to keep their videos public for a limited time, before wiping them off of their channels forever.
This is why I have used youtubepi.com for a while, but recently the quality of downloads has degraded. Below I have outlined some solutions I have found over the years to download high-quality videos from youtube, vimeo, instagram, etc.
Cobalt Tools (web)
cobalt helps you save anything from your favorite websites: video, audio, photos or gifs. just paste the link and you’re ready to rock!
no ads, trackers, paywalls, or other nonsense. just a convenient web app that works anywhere, whenever you need it.
YoutubePI (web)
The easiest way to download a video from Youtube (for now) is to add pi
to the end of youtube when you are on the page of a video you wish to download.
For example, to download the following url:
https://www.youtube.com/watch?v=poYWNrf1dLU
You can add pi
to the end of youtube, like this - youtubepi.com
https://www.youtubepi.com/watch?v=poYWNrf1dLU
and then you can download a 360p or 480p version of the video. For a higher quality download, keep reading.
yt-dlp (manual & command line)
yt-dlp is a feature-rich command-line audio/video downloader with support for thousands of sites.
It requires a few more clicks than youtubePI, but it produces a much better output.
all commands below are tested on macOS
Quick-start
This is the command to download a video
yt-dlp -P "~/Documents/yt-dlp_downloads" "https://www.youtube.com/watch?v=poYWNrf1dLU"
The video will be saved to Documents/yt-dlp_downloads
Change the URL to the one you wish to download.
Installation
The best way to install yt-dlp is to run
pip install yt-dlp
or
brew install yt-dlp
Alternatively,
The easiest way to set it up is to go to their github, download the executable from RELEASE FILES:
and then make a yt-dlp
folder in your downloads. Move the yt-dlp_macos
file you have downloaded from the release files in that folder.
Then, right-click the folder and select New Terminal at Folder
:
And run your yt-dlp
commands from there. Your videos will save in the same folder.
If the video saves as .webm
If the video saves as a webm, and you want to convert it to something you can open in quicktime, you’ll need ffmpeg. If you don’t have ffmpeg, you can get the ffmpeg
file from this folder on our server:
/Volumes/_Resources/MoGraph/proxy-maker-231207/src/ffmpeg
Copy it and save it to the yt-dlp
folder we made earlier in downloads.
Then, in the terminal, run the following to convert all .webm,mkv,avi,mov,flv
files in that folder to a well-compressed .mp4
:
for f in *.{webm,mkv,avi,mov,flv}; do
ffmpeg -i "$f" -c:v libx264 -crf 28 -preset slow -c:a aac -b:a 128k "${f%.*}.mp4"
done
Set a default download folder for yt-dlp
First, we need to create and modify a yt-dlp config file.
From the docs, the recommended location for the config file on macOS is:
~/.config/yt-dlp/config
Here’s how to set it up:
- First, create the directory if it doesn’t exist:
mkdir -p ~/.config/yt-dlp
- Then create and edit the config file:
nano ~/.config/yt-dlp/config
- Add this line to the config file (replace with your desired path):
-P "~/Documents/yt-dlp_downloads"
- Save the file
Now yt-dlp will always download to this directory by default. You can still override this on a per-command basis by using the -P
flag in the command line.