Skip to content

A Python-based GUI YouTube downloader with video and audio options.

Notifications You must be signed in to change notification settings

Asadullah-nadeem/YouTube-playlist-Downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Playlist Downloader

image

This project is a Python-based GUI application for downloading YouTube videos and audio. It uses yt-dlp for downloading and provides a simple interface for users to interact with. You can choose to download audio or video files in different resolutions and formats.

Features

  • Download audio and video from YouTube playlists.
  • Choose between audio (MP3) and video (MP4) formats.
  • Select video resolution (480p, 720p, 1080p).
  • Real-time logging of the download process.
  • Flask and SocketIO integration for real-time updates (optional).

Prerequisites

Before you run the program, you need to install the following dependencies:

  • Python 3.x (preferably 3.13.1 or higher)
  • yt-dlp for downloading YouTube videos and audio.
  • Flask and SocketIO for server integration (optional).

Installation Instructions

  1. Clone the repository:

    git clone https://github.com/Asadullah-nadeem/YouTube-playlist-Downloader.git
    cd YouTube-playlist-Downloader
  2. Install dependencies:

    You can install all required dependencies via pip. Run the following command in your terminal:

    pip install -r requirements.txt

    If requirements.txt does not exist, run the following:

    pip install yt-dlp Flask python-socketio

To integrate the steps you provided into a comprehensive guide for installing and configuring FFmpeg for yt-dlp, here's how you can include it in your README or instructions:


3. Ensure ffmpeg is installed:

yt-dlp uses ffmpeg for processing video and audio files. Follow the steps below to install and configure FFmpeg on your system:

Step-by-Step Installation Guide for FFmpeg on Windows:

  1. Download FFmpeg:

  2. Extract FFmpeg:

    • Extract the ZIP file to a folder on your system, such as C:\ffmpeg.
    • After extraction, the C:\ffmpeg folder will contain subfolders like bin, doc, and presets.
  3. Add FFmpeg to System PATH:

    • Press Win + R, type sysdm.cpl, and press Enter to open System Properties.
    • Go to the Advanced tab and click on Environment Variables.
    • Under System Variables, find the variable Path and click Edit.
    • Click New and add the path to the bin folder of your extracted FFmpeg directory (e.g., C:\ffmpeg\bin).
    • Click OK to close all dialogs.
  4. Verify FFmpeg Installation:

    • Open a new Command Prompt or terminal.
    • Run the following command:
      ffmpeg -version
    • You should see the FFmpeg version details. This confirms that FFmpeg is installed correctly.

Alternative Installation (Using Chocolatey):

If you're using Windows and have Chocolatey installed, you can install FFmpeg via the following command:

choco install ffmpeg

Configure yt-dlp with FFmpeg:

Once FFmpeg is installed and added to your system's PATH, you need to specify the location of FFmpeg in yt-dlp. Here’s how to do that:

  • Specify the ffmpeg_location in your yt-dlp options:

    Replace C:\ffmpeg\bin with the correct path where you extracted FFmpeg. Ensure that the folder contains both ffmpeg.exe and ffprobe.exe.

    For example:

    ydl_opts = {
        'ffmpeg_location': r'C:\ffmpeg\bin',  # Update this path
    }

Verify Your FFmpeg Installation:

Confirm that the following files exist in your ffmpeg\bin folder:

C:\ffmpeg\bin\ffmpeg.exe
C:\ffmpeg\bin\ffprobe.exe

If both files are present, FFmpeg is installed and ready to be used with yt-dlp.


This will ensure that FFmpeg is installed, configured, and ready to be used by yt-dlp for processing videos and audio files.

  1. Directory Structure:

    The project folder should look like this:

    YouTube-Downloader-GUI/
    ├── main.py          # Main Python script to run the app
    ├── downloader.py    # Contains the download logic and GUI
    ├── requirements.txt # List of Python dependencies
    ├── README.md        # This file
    └── downloads/        # Folder where downloaded videos will be saved
    

How to Use

  1. Run the application:

    To start the YouTube downloader GUI, run the main.py script:

    python main.py
  2. Using the GUI:

    Once the application is running, you will see a GUI window with the following options:

    • Paste Playlist URL: Enter the YouTube playlist URL that you want to download.
    • Audio/Video Selection: Choose whether you want to download audio (MP3) or video (MP4).
    • Resolution (only for video): If downloading a video, select the desired resolution (480p, 720p, or 1080p).
    • Download: Click the 'Download' button to start the download.
  3. Monitoring the progress:

    As the download progresses, the log section of the GUI will display real-time status updates, such as downloading specific videos and showing any warnings or errors that occur.

  4. Stopping the download:

    You can stop the download process by clicking the 'Stop' button. This will immediately halt any ongoing downloads.

Troubleshooting

  • If you encounter issues related to missing dependencies, make sure all required libraries are installed using pip.
  • If ffmpeg is not found, verify that it is properly installed and added to your system's PATH.

About

A Python-based GUI YouTube downloader with video and audio options.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages