Skip to content

magdy33/YouTube-Playlist-Downloader-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

YouTube Playlist Downloader Script

Description

This Bash script helps you download a YouTube playlist using yt-dlp. It also provides an optional feature to concatenate downloaded videos into a single .mp4 file using ffmpeg.

Prerequisites

Make sure you have the following installed:

  • yt-dlp (for downloading videos)
  • ffmpeg (for video conversion and concatenation)

Usage

bash yd.sh [download_folder] <playlist_link> [con]

Parameters:

  • [download_folder] (optional): Specifies the folder where videos will be downloaded. If not provided, defaults to /home/Download_Youtube.
  • <playlist_link> (required): The YouTube playlist URL.
  • [con] (optional): If set to con, all downloaded videos will be converted to .mp4 (if necessary) and concatenated into a single output.mp4 file.

Example Usage

  1. Download a playlist to the default folder:
    bash yd.sh "https://www.youtube.com/playlist?list=XYZ123"
  2. Download a playlist to a specific folder:
    bash yd.sh /path/to/folder "https://www.youtube.com/playlist?list=XYZ123"
  3. Download and concatenate videos:
    bash yd.sh /path/to/folder "https://www.youtube.com/playlist?list=XYZ123" con

Features

  • Downloads an entire YouTube playlist.
  • Converts downloaded videos to .mp4 format (if not already .mp4).
  • Concatenates videos into a single file if the con parameter is provided.
  • Cleans up intermediate files after processing.

Error Handling

  • If the specified folder does not exist, the script will exit with an error.
  • The script automatically removes unnecessary files after execution.

Notes

  • Make sure yt-dlp and ffmpeg are installed and accessible from the terminal.
  • Running the script with con may take additional processing time due to video conversion and merging.

Author

Magdi

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages