YouTube Video Fetcher is a simple PHP application to extract and download YouTube videos. It fetches available formats (both video and audio) and provides download links in various qualities. This tool uses the YouTube Data API v3 for retrieving video details.
- Extract video formats (with video and audio) and adaptive formats (audio or video only).
- Download YouTube videos in multiple resolutions and formats.
- Minimal interface for easy link input and download.
- Logs errors related to non-playable videos.
- Set up your server: If using XAMPP, place the files in the htdocs folder
- Ensure file write permissions are granted to log errors: sudo chmod 777 ./video.log
- Get a YouTube Data API v3 key from Google Cloud Console and replace the API call section accordingly.
- Open index.php in your browser: http://localhost/youtube-video-fetcher/index.php
- Paste the YouTube video URL in the input field and click "Go."
- The application will display available formats and resolutions.
- Click the download link to start the download.
- index.php: Main entry point with the form to input YouTube video URLs and display available download options.
- class.youtube.php: Contains the logic to fetch video formats, parse video info, and handle errors.
- downloader.php: Handles the downloading of selected video formats.
- PHP (version 7.4 or above)
- XAMPP (for running locally, or any other PHP server)
License
This project is licensed under the MIT License.