YTDownloader-Merger is a Python-based tool that allows you to download videos from YouTube (single videos or playlists) and optionally merge the downloaded files into a single video. This tool leverages yt-dlp
for robust downloading and FFmpeg for video merging.
- 📥 Download individual videos or all videos from a YouTube playlist.
- 📂 Save videos in a dedicated
downloads
directory. - 🎬 Option to merge all downloaded videos into a single file (
final.mp4
). - 🔄 Automatically handle FFmpeg download and setup if it's not already available.
- 🛠 User-friendly prompts for merging and overwriting options.
- Python 3.6+
yt-dlp
- FFmpeg (automatically downloaded by the script if not present).
-
Clone the repository:
git clone https://github.com/lordzohar/YTDownloader-Merger.git cd YTDownloader-Merger
-
Install the required Python packages:
pip install -r requirements.txt
To download videos from a YouTube playlist or a single YouTube video, run the playlist_downloader.py
script:
python playlist_downloader.py
- Enter the YouTube URL (either a playlist or a single video) when prompted.
- The videos will be downloaded to the downloads directory in the project folder.
After downloading the videos, the script will prompt you:
Do you want to merge all downloaded files into a single video? (Y/N):
- If you press Y, the script will automatically call merger.py to combine all videos into a single file named final.mp4.
- If you press N, the merging step will be skipped.
The merged video (final.mp4) will be available in the project directory after successful merging. Example Workflow
Run the playlist downloader:
python playlist_downloader.py
Enter a YouTube playlist or video URL when prompted.
Merge videos (optional): At the end of the download process, choose whether to merge the videos by pressing Y or N.
Feel free to contribute! Please open an issue or bug fixes.
If you find this project helpful, consider supporting me:
This project is licensed under the GNU License. See the LICENSE file for details.
Acknowledgements
- yt-dlp