Download YouTube videos — Dart
There are many websites and applications build for downloading YouTube videos locally on your computer system. Most of these application or web-services either comes with lots of ads. or spams.
To solve this problem I created my own YouTube Downloader(ytd) in Dart and published it for Windows, Linux and MacOS.
I choose dart for creating this application as it is cross-platform and makes it really easy to create executable for different platforms from a single code-base.
Link to the source is here.
Download the latest release from here.
Setting up YTD is very simple. In this post I will share the steps to set it up on Windows. To setup YTD for windows, you need to first download the executable for your platform from the latest release. In this case it will be ytd.exe
Once downloaded, you can execute it directly by double clicking or from command line as:
But what if you want to access it in the command prompt from anywhere?
To solve that follow these steps.
- Put the ytd.exe file to an organized location in your disk. (For me it will be in C:\Program Files\ytd)
- Add the path of the folder to your system “PATH” variable.
- Press windows key and search for “Edit the system environment variables”
- Click on “Environment variables”
- Look for the system variable called “PATH” and click “Edit”
- Then click on “New” and paste the path of the folder containing ytd.exe
- Now you can use the “ytd” command from anywhere.
Using YTD is as simple as it is setting it up. If you are executing it like a normal application, you just need to double click it and paste in the youtube video url when prompted for. On the other hand if you are using the application from command line. You need to execute the “ytd” command.
Here are the examples:
You can just type “ytd” to execute the program and paste the youtube video url when prompted.
Or you can type “ytd <youtube-url-link-here>” and the video will start downloading.
Once this is done, your download will start and the file will be saved automatically.
Note: The path of the output file is same as the present working directory of your command prompt.
Thanks for reading…
Follow me on GitHub.