YouTube Downloader on Amazon AWS
If you are reading this then it is likely you have some interest in downloading videos from Amazon in a free and easy way
Well some really smart folks built out this Python program (script) that run on on Linux.
The script is named yt-dlp.
Easily download YouTube videos in Linux usingyt-dlp command line tool.
With this tool, you can also choose video format and video quality such as 1080p or 4K.
- Download videos from not only YouTube but other popular video websites like Dailymotion, Facebook etc
- Allows downloading videos in several available video formats such as MP4, WebM etc.
- You can also choose the quality of the video being downloaded. If the video is available in 4K, you can download it in 4K, 1080p, 720p etc
- Automatically pause and resume video downloads.
- Allows to bypass YouTube geo-restrictions
- Allows to download AUDIO only in various quality levels.
Let’s Build It!
First off let’s cover some of the assumptions:
- You have an Amazon AWS account and are familar how to spin up a Linux Instance and all that goes with making that happen
- You have PuTTY ssh tool installed (free)(Windows)
- You can navigate a Linux command-line and follow instructions
Step One: Create an Ubuntu Linux Instance on Amazon AWS based on the Amazon AMI for 64bit Ubuntu 18.04
Naturally we will need an instance to run this on. Create an Ubuntu 64bit instance using the free level.
Get the secret key downloaded to your local machine
Load up a command line and connect as you would to any Amazon Linux Instance
Once you are at a command prompt on your Ubuntu Linux box you are ready to proceed to install
Step Two: Install yt-dlp & ffmpeg
Step Three: Provide some basic yt-dlp command examples
Here’s as simple as it gets to download a video
To download a playlist, just append the playlist URL to yt-dlp, like this:
Download YouTube videos in various formats and quality size
And you will get similar output as below:
Now among the available video formats, just choose one that suits you. For example, if you want to download it in MP4 version and 1080p, you should use -f 37 as shown below:
Finally, here’s how to download the best quality video and best audio merged
Here’s a link to GitHub page of the wizard that wrote the tool.
There you find the history of the tool and find details on the command set.
There you have it. If you have a reasonable handle on running Linux on AWS you can spin up an instance in under 10 minutes including the two line install and start downloading.
Once you are finished shutdown the instance and terminate it since you can get one up and running in no time.
Clearly you know you could run this on a VM or a Raspberry Pi but what for when you can spin up an AWS instance in under a minute!
Have fun discovering!