Download YouTube videos — Dart

Photo by Szabo Viktor on Unsplash

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

Latest executable for Windows

Once downloaded, you can execute it directly by double clicking or from command line as:

Double click run (Allow if prompted by Windows Smart Screen)
Executed from command prompt

But what if you want to access it in the command prompt from anywhere?

To solve that follow these steps.

  1. Put the ytd.exe file to an organized location in your disk. (For me it will be in C:\Program Files\ytd)
  2. Add the path of the folder to your system “PATH” variable.
  3. Press windows key and search for “Edit the system environment variables”
  4. Click on “Environment variables”
  5. Look for the system variable called “PATH” and click “Edit”
  6. Then click on “New” and paste the path of the folder containing ytd.exe
  7. 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.

Directly running ytd command in cmd

Or you can type “ytd <youtube-url-link-here>” and the video will start downloading.

Using ytd command with url in cmd

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.

Download successfully finished
Downloaded video file.

Thanks for reading…

Follow me on GitHub.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aman Nirala

Aman Nirala

I am a Programmer and Researcher. My field of study is Quantum Computing and I love contributing to Open Source Community.