Info
Name | Simple Youtube Video Downloader Script |
Market | codester.com |
Category | Multimedia |
Tags | Downloader, php, SCRIPT, simple, youtube |
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.
Updates:
2017-07-25
2018-02-26
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
The entry point for the JSON API is located at http://you_server/path_to_downloader/api.php
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" }