Code Monkey home page Code Monkey logo

soykothasan / youtube-downloader Goto Github PK

View Code? Open in Web Editor NEW
31.0 5.0 46.0 27 KB

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.

License: GNU General Public License v3.0

PHP 100.00%
youtube download php script yt-dl yt-to-mp4 yt-to-3gp yt-to-mkv yt-to-webm youtubenow

youtube-downloader's Introduction

Simple Youtube Video Downloader

Updates

  • Removed all unnecessary files
  • php-curl is no longer needed

Usage: http://<path_to_folder_to_scripts>/download.php?id=<youtube_video_id>&itag=<video_itag> Youtube Downloader

Formats and Resolutions of Youtube Videos

Youtube provides the videos in many format, quality and resolution but usually most of the user don't know most of the formats. With the ever changing technology and increased use of mobile devices, a number of new formats are rolled out every year by Youtube. Here we did a little research about the formats of video available in Youtube. Youtube identify the formats using itag param. Below is the list of formats:

Main stream videos format These are the most popular and widely used formats. Format 22 is HD and 37 is Full HD. Quality of the formats are mentioned below:

Format 5: (Basic Youtube Default) Download Video Format: flv Video Resolution: 400 x 240 Video Frame Rate: 25 fps Video Output Format: FLV1 H.263 Audio: Stereo, 22.05 KHz 64.0 Kbps Audio Format: MP3 (MPEG Audio) Format 6: Download Video Format: flv Video Resolution: 450 x 270 Format 13: (Mobile phones, iPod friendly) Download Video Format: 3gp Format 17: Download Video Format: 3gp Video Resolution: 176 x 144 Video Frame Rate: 12 fps Video Output Format: MPEG-4 Audio: Mono 22.05 KHz 24.0 - 25.6 Kbps Audio Format: AAC Format 18: Medium Quality [360p] Download Video Format: mp4 Video Resolution: 640 x 360 Video Frame Rate: 25 fps Video Output Format: AVC (MPEG4 H.264) Audio: Stereo, 44.1 KHz 96.0 - 100 Kbps Audio Format: AAC Format 22: HD High Quality [720p] Download Video Format: mp4 Video Resolution: 1280 x 720 Video Frame Rate: 25 fps Video Output Format: AVC (MPEG4 H.264) Audio: Stereo, 44.1 KHz 192.0 - 201 Kbps Audio Format: AAC Format 34: [360p] Download Video Format: flv Video Resolution: 640 x 360 Format 35: [480p] Download Video Format: flv Video Resolution: 854 x 480 Format 36: [240p] Download Video Format: 3gp Video Resolution: 320 x 240 Video Frame Rate: 25 fps Video Output Format: MPEG4 H.263 Audio: Mono, 22.05 KHz 32.0 - 34.2 Kbps Audio Format: AAC Format 37: HD High Quality [1080p] Download Video Format: mp4 Video Resolution: 1920 x 1080 Format 38: HD High Quality [3072p] Download Video Format: mp4 Video Resolution: 4096 x 3072 Format 43: Medium Quality [360p] Download Video Format: webm Video Resolution: 640 x 360 Video Frame Rate: 24.194 fps Video Output Format: VP8 Audio: Stereo, 44.1 KHz 128 Kbps Audio Format: Vorbis Format 44: [480p] Download Video Format: webm Video Resolution: 854 x 480 Format 45: [720p] Download Video Format: webm Video Resolution: 1280 x 720 Format 46: [1080p] Download Video Format: webm Video Resolution: 1920 x 1080 3d Videos These videos requires special medium to enjoy the depth of the video. These are also available in different flavours

Format 82: Download Video Format: mp4 Video Resolution: 640 x 360 [3D] Video Frame Rate: 25 fps Video Output Format: AVC (MPEG4 H.264) Audio: Stereo, 44.1 KHz 128 - 134 Kbps Audio Format: AAC Format 83: Download Video Format: mp4 Video Resolution: 854 x 480 [3D] Format 84: Download Video Format: mp4 Video Resolution: 1280 x 720 [3D] Video Frame Rate: 25 fps Video Output Format: AVC (MPEG4 H.264) Audio: Stereo, 44.1 KHz 192 - 201 Kbps Audio Format: AAC Format 85: Download Video Format: mp4 Video Resolution: 1920 x 1080p [3D] Format 100: Download Video Format: webm Video Resolution: 640 x 360 [3D] Video Frame Rate: 24.194 fps Video Output Format: VP8 Audio: Stereo, 44.1 KHz 128 Kbps Audio Format: AAC Format 101: Download Video Format: webm Video Resolution: 854 x 480 [3D] Format 102: Download Video Format: webm Video Resolution: 1280 x 720 [3D] Apple HTTP Live Streaming (HLS) Format 92: Download Video Format: mp4 Video Resolution: 320 x 240 Streaming Protocol: HLS Format 93: Download Video Format: mp4 Video Resolution: 640 x 360 Streaming Protocol: HLS Format 94: Download Video Format: mp4 Video Resolution: 854 x 480 Streaming Protocol: HLS Format 95: Download Video Format: mp4 Video Resolution: 1280 x 720 Streaming Protocol: HLS Format 96: Download Video Format: mp4 Video Resolution: 1920 x 1080 Streaming Protocol: HLS Format 132: Download Video Format: mp4 Video Resolution: 320 x 240 Streaming Protocol: HLS Format 151: Download Video Format: mp4 Video Resolution: * x 72 Streaming Protocol: HLS DASH MP4 video Format 133: Download Video Format: mp4 Video Resolution: 320 x 240 Video Format: DASH video Audio: none Format 134: Download Video Format: mp4 Video Resolution: 640 x 360 Video Format: DASH video Audio: none Format 135: Download Video Format: mp4 Video Resolution: 854 x 480 Video Format: DASH video Audio: none Format 136: Download Video Format: mp4 Video Resolution: 1280 x 720 Video Format: DASH video Audio: none Format 137: Download Video Format: mp4 Video Resolution: 1920 x 1080 Video Format: DASH video Audio: none Format 138: Download Video Format: mp4 Video Resolution: * x 2160 (not fix) Video Format: DASH video Audio: none Format 160: Download Video Format: mp4 Video Resolution: 176 x 144 Video Format: DASH video Audio: none Format 264: Download Video Format: mp4 Video Resolution: 176 x 1440 Video Format: DASH video Audio: none Format 298: Download Video Format: mp4 Video Resolution: 1280 x 720 Video Frame Rate: 60 fps Video Format: DASH video H.264 Audio: none Format 299: Download Video Format: mp4 Video Resolution: 1920 x 1080 Video Frame Rate: 60 fps Video Format: DASH video H.264 Audio: none Format 266: Download Video Format: mp4 Video Resolution: * x 2160 Video Frame Rate: 60 fps Video Format: DASH video H.264 Audio: none Dash MP4 Audio Format 139: Download Audio Format: m4a Audio: Stereo, 44.1 KHz 48 Kbps Audio Format: AAC [DASH audio] Video: none Format 140: Download Audio Format: m4a Audio: Stereo, 44.1 KHz 128 Kbps Audio Format: AAC [DASH audio] Video: none Format 141: Download Audio Format: m4a Audio: Stereo, 44.1 KHz 256 Kbps Audio Format: AAC [DASH audio] Video: none Dash WEBM Video Format 167: Download Video Format: webm Video Resolution: 640 x 360 Video Format: VP8 DASH video Audio: none Format 168: Download Video Format: webm Video Resolution: 854 x 480 Video Format: VP8 DASH video Audio: none Format 169: Download Video Format: webm Video Resolution: 1280 x 720 Video Format: VP8 DASH video Audio: none Format 170: Download Video Format: webm Video Resolution: 1920 x 1080 Video Format: VP8 DASH video Audio: none Format 218: Download Video Format: webm Video Resolution: 854 x 480 Video Format: VP8 DASH video Audio: none Format 219: Download Video Format: webm Video Resolution: 854 x 480 Video Format: VP8 DASH video Audio: none Format 219: Download Video Format: webm Video Resolution: * x 144 Video Format: VP9 DASH video Audio: none Format 242: Download Video Format: webm Video Resolution: 320 x 240 Video Format: VP8 DASH video Audio: none Format 243: Download Video Format: webm Video Resolution: 640 x 360 Video Format: VP8 DASH video Audio: none Format 244: Download Video Format: webm Video Resolution: 854 x 480 Video Format: VP8 DASH video Audio: none Format 245: Download Video Format: webm Video Resolution: 854 x 480 Video Format: VP8 DASH video Audio: none Format 246: Download Video Format: webm Video Resolution: 854 x 480 Video Format: VP8 DASH video Audio: none Format 247: Download Video Format: webm Video Resolution: 1280 x 720 Video Format: VP8 DASH video Audio: none Format 248: Download Video Format: webm Video Resolution: 1920 x 1080 Video Format: VP8 DASH video Audio: none Format 271: Download Video Format: webm Video Resolution: 176 x 1440 Video Format: VP8 DASH video Audio: none Format 272: Download Video Format: webm Video Resolution: * x 2160 Video Format: VP8 DASH video Audio: none Format 302: Download Video Format: webm Video Resolution: * x 2160 Video Frame Rate: 60 fps Video Format: VP9 DASH video Audio: none Format 303: Download Video Format: webm Video Resolution: 1920 x 1080 Video Frame Rate: 60 fps Video Format: VP9 DASH video Audio: none Format 308: Download Video Format: webm Video Resolution: 176 x 1440 Video Frame Rate: 60 fps Video Format: VP9 DASH video Audio: none Format 313: Download Video Format: webm Video Resolution: * x 2160 Video Frame Rate: 60 fps Video Format: VP9 DASH video Audio: none Format 315: Download Video Format: webm Video Resolution: * x 2160 Video Frame Rate: 60 fps Video Format: VP9 DASH video Audio: none Dash WEBM Audio Format 171: Download Audio Format: webm Audio: Stereo, 44.1 KHz 128 Kbps Audio Format: AAC [DASH audio] Video: none Format 172: Download Audio Format: webm Audio: Stereo, 44.1 KHz 256 Kbps Audio Format: AAC [DASH audio] Video: none

youtube-downloader's People

Contributors

soykothasan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

youtube-downloader's Issues

ERRORS

Warning: Undefined array key 1 in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 20

Warning: Trying to access array offset on value of type null in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 21

Warning: Trying to access array offset on value of type null in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 21

Warning: Undefined array key "adaptive_fmts" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 27

Warning: Undefined array key "assets" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 37

Warning: Trying to access array offset on value of type null in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 37

Warning: Undefined array key 1 in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 40

Warning: Undefined array key 1 in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 44

Warning: Undefined array key "title" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 106

Warning: Undefined array key "title" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 235

Warning: Undefined array key "url" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 236

Warning: get_headers(): This function may only be used against URLs in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 213

Warning: foreach() argument must be of type array|object, bool given in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 215

Warning: Undefined array key "Content-Length" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 256

Warning: Undefined array key "itag" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 259

Warning: Undefined array key "type" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 260

Warning: Undefined array key 1 in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 263

Warning: Undefined array key "itag" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 266

Warning: Undefined array key "title" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 235

Warning: Undefined array key "url" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 236

Warning: get_headers(): This function may only be used against URLs in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 213

Warning: foreach() argument must be of type array|object, bool given in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 215

Warning: Undefined array key "Content-Length" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 256

Warning: Undefined array key "itag" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 259

Warning: Undefined array key "type" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 260

Warning: Undefined array key 1 in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 263

Warning: Undefined array key "itag" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\YoutubeDownloader.php on line 266

Warning: Undefined array key "description" in D:\Programs\XAMPP\htdocs\YouTube-Downloader-master\index.php on line 90

isuue

can anyone tell me how to use this code?

Files without names

The downloaded files always have the name of the file extension.
Users who do not know how to change the file name can not play the downloaded videos.

greeting
Donnerstein

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.