views
Using YouTube-dl
Open the Terminal or Command Prompt. If you are using Windows, open the Command Prompt. If you are using a Mac open the Terminal in the Utilities folder or using the Spotlight search bar. On Linux, press Ctrl + Alt + T to open a Terminal. If you haven't installed YouTube-dl yet, follow the install instructions for Windows, Mac, and Linux. If you just installed YouTube-dl on your Mac or Linux machine, open a new Terminal instead of reusing the one you used to install YouTube-dl.
Change to the directory you want to download videos to. YouTube-dl will download the videos to whichever folder you are in in the Terminal or Command Prompt. To change directories in the Terminal type cd
Copy the URL to a YouTube video. Go to the YouTube video you want to download in your preferred web browser, and copy the URL from the address bar. To copy, highlight the URL, right-click it (or Ctrl-click if you're using a Mac without a right mouse button), then select Copy.
Download a video: Enter the following command in the Terminal or Command Prompt:
Type youtube-dl
Download audio only. If you only want to save the audio from a YouTube video as an MP3, MP4, or other format, you can use the -x option:
youtube-dl -x
Download a playlist. You will need to copy the URL to the playlist. Then use one of the following commands to download a playlist:
Download a playlist in order: Type youtube-dl
Download a specific video or audio format. Use the following commands to download a video in a specific audio or video format:
List available formats: Type youtube-dl --list-format
Download information about a video. This is useful when you only want to get some information, such as a list of the subtitles, or the thumbnail picture, but not the video itself. Type youtube-dl --skip-download
Download the subtitles. Use the following commands to download subtitles for a video:
List all available subtitles: Type youtube-dl --list-subs
Get more information about a video. Use one of the following commands to get additional information about a video:
Download video description: Type youtube-dl --write-description
Update YouTube-dl if it suddenly stops working. YouTube regularly changes its way of storing videos, and the old YouTube-dl scripts can stop working. If this happens, you may need to update YouTube-dl. To do so, type youtube-dl -U and press Enter. Depending on how you installed YouTube-dl, you may need to use sudo youtube-dl -U instead on Linux because you don't have the necessary permissions otherwise. If you downloaded YouTube-dl for Windows, or you used a package manager to install YouTube-dl on Mac or Linux, you may need to uninstall and reinstall the latest version of YouTube-dl.
Download geo-restricted videos. If you want to download a video that is restricted in your country, you can still do so using a proxy server. You can find a list of free proxy servers at http://free-proxy.cz/en/. Some may work, and some may not. It may take several tries. Use the following steps to download a geo-restricted video:
Type youtube-dl --proxy
Installing YouTube-dl on Windows
Install Microsoft Visual C++ 2010 Redistributable Package. You'll need the x86 version to make Youtube-dl work. To download directly from Microsoft, just click this link and save the installer to your PC. Then, double-click the downloaded file and follow the on-screen instructions to install.
Download the Windows binary of Youtube-dl. Use the following steps to do so: Go to https://github.com/ytdl-org/youtube-dl/releases in a browser. Click the youtube-dl.exe link under "Assets" near the bottom of the page. Save the downloaded file to your PC.
Create a new folder for the YouTube-dl.exe file. If you want YouTube-dl to be available to all users, you should create a new folder in your "C:/Program Files/" folder. Otherwise, you can create a folder anywhere you'd like. Name the folder youtube-dl. Use the following steps to create a new folder: Press Windows Key + E to open File Explorer. Navigate to where you want to create a new folder for YouTube-dl, such as C:\Program Files. Click New in the menu bar at the top and select Folder. Type youtube-dl and press Enter.
Copy the youtube-dl.exe file to the new folder. By default, your downloaded files can be found in your Downloads folder. Navigate to your Downloads folder inside File Explorer and right-click the youtube-dl.exe file. Click Copy. Then navigate to the folder you created for YouTube-dl. Right-click inside the folder and click Paste.
Add the youtube-dl folder to your system path. This allows you to run Youtube-dl commands from the command prompt in any directory. To add YouTube-dl to your PATH environment variables: Press the Windows key on your keyboard and type path. Click Edit the system environment variables. Click Environment variables… Select Path in the "System variables" panel and click Edit. Click New in the menu to the left. Type or paste the path to the "YouTube-dl" folder you created. For example, C:\Program Files\youtube-dl. Click Ok and OK again.
Install FFmpeg. If you want to be able to convert YouTube videos to audio formats like MP3, you'll need to download the FFmpeg binaries and save them to your YouTube-dl folder. The easiest way to do this: Go to https://ffmpeg.org/download.html and click the Windows icon. Click Windows builds by BtbN. Click ffmpeg-master-latest-win64-gpl.zip to download. Unzip the file once downloaded, then open the extracted folder. Copy the files ffmpeg.exe and ffprobe.exe to your YouTube-dl folder (e.g., C:\Program Files\youtube-dl). You can ignore the one called "ffplay.exe."
Install a media player if you haven't yet. YouTube videos are usually stored in MP4 format and you can use a media player such as VLC player to view your videos. You can download the VLC multimedia player from the following link: http://www.videolan.org/vlc/#download.
Installing YouTube-dl on Mac
Open the Terminal. You can find it in the Utilities folder and on your Launchpad. Alternatively, you can use the following steps to open Terminal: Click the magnifying glass icon in the upper-right corner. Type Terminal in search bar. Click Terminal.app.
Install Homebrew. If you haven't already installed Homebrew, you can do so easily in the Terminal. Homebrew is an open-source package management system for Mac that allows you to install applications Type or paste /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" into the Terminal. Press Return. If you are having trouble installing or using Homebrew, you can try installing MacPorts instead. You can download and install MacPorts from https://www.macports.org/install.php.
Install YouTube-dl. To install YouTube-dl, type sudo brew install youtube-dl in the Terminal and press Return. It may take a while to download and install YouTube-dl. If you would rather install YouTube-dl using MacPorts, type sudo port install youtube-dl in the Terminal and press Enter.
Install FFmpeg. If you want to make sure you can convert YouTube videos to audio, you'll need download the FFmpeg. To do this, just type brew install ffmpeg to install with Homebrew, or sudo port install ffmpeg to use MacPorts.
Install a media player application if you need to. Youtube videos are usually stored in the FLV or MP4 formats and you can use a media player such as VLC player to view your videos. You can download the VLC multimedia player from http://www.videolan.org/vlc
Installing YouTube-dl on Linux
Press Ctrl+Alt+T to open the Terminal. This is the keyboard shortcut to open the Terminal. Alternatively, you can open the Terminal in the Applications menu.
Download the Linux binary and make it executable. You can install using curl or wget: Using curl: Download the binary to /usr/local/bin: sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl Make the binary executable: sudo chmod a+rx /usr/local/bin/youtube-dl Using wget: Download the binary to /usr/local/bin: sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl Make the binary executable: sudo chmod a+rx /usr/local/bin/youtube-dl.
Install FFmpeg. If you want to be able to convert YouTube videos to audio, you'll need download the FFmpeg. You can get it from your distro's repository. E.g., if you're using Ubuntu or another Debian-based Linux, you can use sudo apt install ffmpeg.
Install a media player if you haven't yet. YouTube videos are stored in different formats, some of the most common are MP4, MKV and WEBM. To view the videos, you need a media player. Some options are MPV or VLC. You can install these through your system's package manager. Use the following steps to download and install VLC: Type sudo apt update and press Enter to update your software repository. Type sudo apt install vlc or sudo apt install mpv, depending on which program you want to install. Then press Enter.
Comments
0 comment