• Stars
    star
    292
  • Rank 142,152 (Top 3 %)
  • Language
    PHP
  • Created over 12 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PHP Class to download videos from YouTube.

yt_downloader - PHP class to download videos from YouTube and/or convert them to mp3 audio files.

Introduction

This PHP class takes a YouTube URL (or YouTube Video-ID) and downloads the video to your computer. Optionally, you can convert any YouTube video to an MP3 Audio file (requires ffmpeg to be installed!).

UI Demo

For an example integration, try the demo:
http://eyecatchup.github.com/php-yt_downloader/index.html?vid=http://www.youtube.com/watch?v=cMMpLEGlFWE

Download

The latest stable version can be downloaded from the downloads tab, or using the following link:
https://github.com/downloads/eyecatchup/php-yt_downloader/eyecatchup-php-yt_downloader-403c053.zip

The UI demo code is available here: https://github.com/eyecatchup/php-yt_downloader/tree/gh-pages

Basic Usage

Usage is pretty straight forward:

<?php
    require('youtube-dl.class.php');
    try {
        // Instantly download a YouTube video (using the default settings).
        new yt_downloader('http://www.youtube.com/watch?v=aahOEZKTCzU', TRUE);

        // Instantly download a YouTube video as MP3 (using the default settings).
        new yt_downloader('http://www.youtube.com/watch?v=aahOEZKTCzU', TRUE, 'audio');
    }
    catch (Exception $e) {
        die($e->getMessage());
    }

You can provide either a YouTube URL (as used in the example), or a Youtube Video-ID. The class will check whether the given input value is a YouTube URL, or a YouTube Video-ID . If it's a URL, the ID will be extracted automatically. So,

new yt_downloader("http://www.youtube.com/watch?v=aahOEZKTCzU"); is identical to new yt_downloader("https://www.youtube.com/watch?feature=related&v=aahOEZKTCzU"); is identical to new yt_downloader("aahOEZKTCzU");.

For more (advanced) examples see the example-*.php files.

Configuration

Use the youtube-dl.config.php file to set your download preferences.

URL: https://github.com/eyecatchup/php-yt_downloader/
License: http://eyecatchup.mit-license.org/
(c) 2012, Stephan Schmitz [email protected]

More Repositories

1

SEOstats

SEOstats is a powerful open source PHP library to request a bunch of SEO relevant metrics.
PHP
1,467
star
2

php-webmaster-tools-downloads

PHP class to download website data from Google Webmaster Tools as CSV.
PHP
107
star
3

GWT_CrawlErrors-php

Download website crawl errors from Google Webmaster Tools as CSV.
PHP
38
star
4

Critroni-php

Win32/Critroni (CTB-Locker) - Web version
PHP
37
star
5

net.bexton.android.UsbMassStorageToggle

Android App: USB Mass Storage Hack (to use with ICS Ports that doesn't support UMS yet).
Java
25
star
6

material-design-resources

Resources for Google's Material Design
18
star
7

hlscast

Super simple interface to play network media streams (HLS / VOD / IPTV) on Chromecast.
HTML
16
star
8

vue-cookieconsent

Vue wrapper for the awesome `cookieconsent` library.
TypeScript
15
star
9

android-play-store-apk-downloader-crx

Chrome extension to download APKs from the Google Play Store directly from Desktop Browser to PC.
JavaScript
9
star
10

net.bexton.android.device_id

Simple app to display the Settings.Secure and the GSF device ID for any Android device.
7
star
11

animated-urls

Demo: https://eyecatchup.github.io/animated-urls/index.html
HTML
6
star
12

GWT_IndexStatus-php

Request website indexing status data from your Google Webmaster Tools account.
PHP
6
star
13

backbutton-detect-js

Mirror of Brooke Bryan's "Back Button Detection Object" (v1.0.1)
JavaScript
5
star
14

tweetbutton

A custom tweetbutton with tweet count
5
star
15

php-gwt-sitemapuploader

Submit unlimited sitemaps to Google Webmaster Tools at once - with just one single call: new GWT_SitemapsUpload($sitemaps);
PHP
5
star
16

md-jekyll

Status: WIP, to-be-released.
4
star
17

nicegist

A vanilla JavaScript gist.io replacement
JavaScript
3
star
18

dmail

Self-Destructing Email
JavaScript
3
star
19

gmail-bulkdelete-nodejs

Bulk delete Gmail messages, using the Gmail API.
JavaScript
2
star
20

make_aroma

Bash script to create an AROMA-Installer package off of an Android otapackage build.
2
star
21

dotfiles

My personal collection of dotfiles (mainly for Git and Bash)
Shell
2
star
22

CC_Service-php

PHP class to request compiled JavaScript source code from the Closure Compiler's RESTful Service API.
PHP
2
star
23

eyecatchup

1
star
24

ww-web

Weight-Watchers Web App for Windows Phone
1
star
25

Locky

CAUTION! DANGEROUS!
1
star
26

jira-scrum-poker

Java
1
star
27

GetGitStats

PHP
1
star
28

angular-draggable-toggle

Toggle buttons for AngularJS - leightweight, configurable as hell & support dragging across devices. Demos: http://goo.gl/9QuYKm
HTML
1
star
29

node-aaf-api

(Simple) NodeJS wrapper for the AAF GraphQL API.
JavaScript
1
star
30

corona-covid19-fallzahlen-deutschland

Fallzahlen zu COVID-19 in Deutschland - Live abgefragt von verschiedenen, oft zitierten Datenquellen
HTML
1
star
31

SuperSimpleSlideshow.js

(Super Simple) Fullscreen Background Image Slideshow; using JavaScript and CSS3.
JavaScript
1
star
32

aoe-html5slides

AOE branded HTML5 Slide Presentation Template. Demo:
JavaScript
1
star