Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
136 lines (91 sloc) 4.58 KB

YouTube Downloader

Author Source Code Software License Build Status Gitter

PHP Library with Web UI to download videos from YouTube.

Support for Cipher signature

YouTube Downloader finally supports YouTube videos with a cipher signature too. 🎉 Please note that this functionallity is hidden behind a config flag because it downloads javascript code from a 3rd party (YouTube) server and interprets it. This MAY harm your server, if the 3rd party server delivers malicious code.

You can activate this by the the enable_youtube_decipher_signature to true in /config/custom.php. If the file don't exists you can simple create it or copy from /config/default.php.

// in config/custom.php
return [
    'enable_youtube_decipher_signature' => true,


  • Create a library that delivers data and download links for youtube videos.
  • Create a UI for downloading the videos.
  • Have no external dependencies to other services.
  • Have no external dependencies to other libraries in production.
  • Installation should be foolproof (unzip on server and go)


You must fit at least this requirements to use YouTube-Downloader:

  • PHP >= 5.6
  • Web server (Apache/Nginx/PHP built-in)


There are multiple ways to set up YouTube-Downloader

ZIP Download


  • Clone the code on your server with $ git clone
  • Open the folder with your browser


The library code can be used in other projects via Composer.

The code isn't available on at the moment, so you must add the repository in your composer.json. Your composer.json should look like this

	"require": {
		"jeckman/YouTube-Downloader": "dev-master"
	"repositories": [
		{"type": "vcs", "url": ""}

Now install the dependencies with $ composer update


You can manually visit a web form (the index.php file), enter a YouTube video id, and get in return a list of links showing the various formats in which that video can be downloaded. You can simply choose "save link as" or the equivalent to download the file.

Second, you can directly target the getvideo.php script, passing in a videoID and preferred format, and you will get redirected to the file itself.

Potential formats:

  • best = just give me the largest file / best quality
  • free = give the largest version including WebM, lower priority to FLV
  • ipad = ignore WebM and FLV, look for best MP4 file

You can also pass in a specific format number, if you know it.

Note this approach, because it redirects you to the file itself, currently bypasses the proxy option, so if your browser/server setup requires the proxy to work these will fail.

Feed subscription

You can subscribe both to YouTube channels and users via RSS. Feeds can be generated in the formats listed above.

Generating a feed for a YouTube channel works as follows:

To generate a feed for a YouTube user:

The generated feed is a standard RSS feed and can be subscribed to in any feed reader.


ZIP Download


$ git remote update
$ git pull origin master


$ composer update


You can help making this project better by reporting bugs or submitting pull requests. Please see our contributing guideline for more information.