A comprehensive toolkit for analyzing and downloading YouTube videos, playlists.
- URL analysis for single videos, playlists, and channels
- High-quality video downloading
- Download speed testing
- Proxy support
- Detailed debug information
- Results logging
Built with yt-dlp and moviepy for robust YouTube interaction and video processing.
main_analyze.py: URL analysis and video info collectionmain_download.py: Video downloadingmain_ping.py: Download speed testing
Utilizes a Makefile for easy task execution and project management.
- Installation
- Ping - Measure YouTube Video Download Speed
- Analyze - Extract Video URLs from a List
- Download - Download Videos from a List of URLs
To install the required dependencies, run:
make install
This will install yt-dlp, requests, and moviepy using pip3.
Make sure you have Python 3 and pip installed on your system before running this command.
The ping tool allows you to measure the download speed for a YouTube video.
make ping [URL=<video_url>] [DURATION=<seconds>] [PROXY=<proxy_url>] [DEBUG=1]
URL: (Optional) YouTube video URL to testDURATION: (Optional) Duration of the speed test in seconds (default: 20)PROXY: (Optional) Proxy server to useDEBUG: (Optional) Set to 1 to enable debug output
make ping URL=https://www.youtube.com/watch?v=dQw4w9WgXcQ DURATION=30 PROXY=socks5://127.0.0.1:9150 DEBUG=1
This command will:
- Test the download speed for the specified YouTube video
- Run the test for 30 seconds
- Use the specified SOCKS5 proxy
- Enable debug output
The script will display real-time information about the download speed, including current speed, peak speed, and total data downloaded. At the end of the test, it will show the average download speed, peak download speed, and total data downloaded.
The analyze tool extracts video URLs from a list of YouTube URLs, which may include playlist URLs.
make analyze INPUT=<input_file> [OUTPUT=<output_file>]
INPUT: (Required) Input file containing URLs to analyzeOUTPUT: (Optional) Output file for video URLs (default: video.txt)
make analyze INPUT=urls.txt OUTPUT=results.txt
This command will:
- Read URLs from the
urls.txtfile - Extract all video URLs, including those from playlists
- Save the extracted video URLs to
results.txt
The script will display the total number of videos found and confirm where the list of video URLs has been saved.
The download tool allows you to download videos from a list of YouTube URLs.
make download INPUT=<input_file> [OUTPUT_DIR=<output_directory>] [OUTPUT_RESULT=<result_file>] [MAX_QUALITY=<quality>] [DEBUG=1]
INPUT: (Required) Input file with video URLs to downloadOUTPUT_DIR: (Optional) Output directory for downloaded videos (default: output)OUTPUT_RESULT: (Optional) Output file for download results (default: done.txt)MAX_QUALITY: (Optional) Maximum video quality to download (e.g., 720, 1080)DEBUG: (Optional) Set to 1 to enable debug output
make download INPUT=video_list.txt OUTPUT_DIR=downloads OUTPUT_RESULT=results.txt MAX_QUALITY=720 DEBUG=1
This command will:
- Read video URLs from
video_list.txt - Download videos to the
downloadsdirectory - Save download results to
results.txt - Limit the maximum video quality to 720p
- Enable debug output
The script will display progress information for each video, including the title, resolution, and file format. After processing all videos, it will show where the results have been saved.
- All scripts use
yt-dlpfor video information extraction and downloading. Make sure you have the latest version installed. - The download script uses
moviepyfor merging video and audio streams if they are separate. - If you encounter any errors, try updating
yt-dlpby running:pip install --upgrade yt-dlp
Feel free to submit issues or pull requests if you have any improvements or bug fixes for these tools.
This project is licensed under the ISC License.
Developed with ❤️ by T34