Simple Youtube Video Downloader ScriptSimple Youtube Video Downloader Script
Simple php script for downloading video and audio contents from Youtube. Average rating of 4.0 based on 9 votesSimple Youtube Video Downloader Script
Simple php script for downloading video and audio contents from Youtube. Average rating of 4.0Overview
This script will allow users of your site and you can easily download any video from YouTube.
It is possible to download video of different quality (from mp4 to 3gp)
It is also possible to download an audio track from YouTube video.
The script is very simple to install, it is not very resource intensive.
The script supports all legacy (and not very) versions of php.
Features
- Download videos of different quality (mp4, 3gp)
- Download audio track
- Not demanding of resources
Updates:
2017-07-25Â
- Removed all unnecessary files
- php-curl is no longer needed
- Added a script for direct downloading of videos from youtube itag(http://www.genyoutube.net/formats-resolution-youtube-videos.html)
Usage: http://PATH_TO_SCRIPT_FOLDER/download.php?id=ID_YOUTUBE_VIDEO&itag=ITAG
2018-02-26
- Added a simple JSON API for getting information about the video
- Error correction and optimization
- Added the ability to choose the download method: "Download via client" or "Download via server"
Requirements
- PHP 5.3Â or higher
Instructions
Basic usage
- Download the script to a folder on your web server
- Open the link in the browser http://you_server/path_to_downloader/
- Enter the youtube link in the input field and click on the "Get download links"
- If the link is correct, a page with information about the video and a table of various formats for download will open
- In most cases, the "Download via client" button will work - this is a direct link to the resource from the server youtube, which will open in the user's browser
- For some videos, youtube generates direct links available ONLY for the same IP with which this link was requested, hence such a link will not open on the client. You can bypass this restriction by uploading video through your server and giving the uploaded stream to the client. The "Download via server" button does this. Attention: loading a video in this way will increase the load on your server.
Usage download script
To download a video by skipping it through your server, go to the URL
http://you_server/path_to_downloader/download?id=youtube_id&itag=youtube_itag
Read more about itag on this page:Â http://www.genyoutube.net/formats-resolution-youtube-videos.html
Using simple JSON API
The entry point for the JSON API is located at http://you_server/path_to_downloader/api.php
Request information about the video
Send request: GET http://you_server/path_to_downloader/api.php?action=info&id=youtube_id
Response:
{ "success": true, "response": { "baseInfo": { "name": "Video name", "previewUrl": "Url to preview video image, e.g. https://img.youtube.com/vi/RCXnOsc5ajY/hqdefault.jpg", "description": "Video description" }, "downloadInfo": [ // array of file formats { "fileSize": "file size in bytes, e.g. 101055832", "fileSizeHuman": "a human-readable file size, e.g. 96.37 MB", "url": "direct download link for 'download via client'", "youtubeItag": "itag format for file, e.g. 43", "fileType": "MIME file type, e.g. video/webm", "name": "file name, e.g. Bio-Dome - Nostalgia Critic.webm", "itagInfo": { "format": "file extension, e.g. mp4", "withVideo": "true if the file contains a video", "withAudio": "true if the file contains a audio" } } //... other files ] } }
If an error occurs during the request, the response will be as follows:
{ "success": false, "error": "Error description" }
Reviews
-
Jul 27, 2021
-
Apr 15, 2019Rating:The Demo and The script is totally different. I Bought this script so as to be able to generate youtube 3GP links but i cant, i have tried all i could via coding wise, the demo could vividly generate 3gp links but the script i bought doesnt.
please fix this issue, am being forced to ask for refund. -
Oct 31, 2018Raihan1 PurchasedRating:
-
Oct 8, 2018
-
Jul 27, 2018larrykh465 PurchasedRating:Used in a Joomla wrapper module, works great! Easy to set up even for for rookie like me.
Future product updates
Quality checked by Codester
Lowest price guarantee
Category | Scripts & Code / PHP Scripts / Multimedia |
First release | 26 April 2017 |
Last update | 26 February 2018 |
Software version | PHP 7.0, PHP 7.1, PHP 5.x, PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6 |
Tags | php, simple, SCRIPT, Downloader, youtube |