PHPackages                             mradhi/youtube - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mradhi/youtube

AbandonedLibrary

mradhi/youtube
==============

22441PHP

Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mradhi/youtube)[ Packagist](https://packagist.org/packages/mradhi/youtube)[ RSS](/packages/mradhi-youtube/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersionsUsed By (0)

Youtube Library based on Youtube-DL
===================================

[](#youtube-library-based-on-youtube-dl)

Youtube library to get video informations and download with multiple format based on Youtube-DL

### Installation

[](#installation)

#### Prerequisites

[](#prerequisites)

This package requires the following additional package:

- PHP &gt; 7.0
- Youtube-DL tool
- FFMpeg

Open a command console, enter your project directory and execute the following command to download the latest version of this package:

```
$ composer require mradhi/youtube dev-master
```

### Usage:

[](#usage)

```
$youtube = new Mate\Package\Youtube\Youtube([
    'url'              => 'https://www.youtube.com/watch?v=HG713VfiXYAD', // You can add the URL later ( $youtube->setUrl(..))
    'output_filename'  => 'test',
    'output_directory' => '/var/www/html/youtube-dl/mp3'
]);

/** @var Mate\Package\Youtube\Model\Video $video */
$video = $youtube->getVideo();

echo $video->getId();
echo $video->getTitle();
echo $video->getDuration();
echo $video->getViewCount();
...

echo $youtube->isValidURL(); // TRUE
echo $youtube->isPlaylist(); // FALSE

$youtube->processDownload();

// ...
```

### Available Options:

[](#available-options)

```
use Mate\Package\Youtube\Args\AvailableArgs as ArgOptions;
use Mate\Package\Youtube\Options;

new Mate\Package\Youtube\Youtube([
     Options::URL               => 'https://www.youtube.com/watch?v=HG713VfiXYAD', // OPTIONAL
     Options::OUTPUT_FILENAME   => 'test', // REQUIRED
     Options::OUTPUT_DIRECTORY  => '/var/www/html/youtube-dl/mp3', // REQUIRED
     ArgOptions::SLEEP_INTERVAL => 2,
     ArgOptions::AUDIO_QUALITY  => 6,
     ArgOptions::AUDIO_FORMAT   => 'mp3',
     ArgOptions::EXTRACT_AUDIO  => true,
     ArgOptions::NO_PART        => true,
     ArgOptions::QUIET          => true,
     ArgOptions::SIMULATE       => false,
     ArgOptions::FLAT_PLAYLIST  => false
]);
```

Check `Mate\Package\Youtube\Options` for the available options and `Mate\Package\Youtube\Args\AvailableArgs` for the available arguments.

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/287419?v=4)[Radhi](/maintainers/Radhi)[@radhi](https://github.com/radhi)

---

Top Contributors

[![mradhi](https://avatars.githubusercontent.com/u/15831692?v=4)](https://github.com/mradhi "mradhi (9 commits)")[![RadhiGn](https://avatars.githubusercontent.com/u/46821993?v=4)](https://github.com/RadhiGn "RadhiGn (6 commits)")

### Embed Badge

![Health badge](/badges/mradhi-youtube/health.svg)

```
[![Health](https://phpackages.com/badges/mradhi-youtube/health.svg)](https://phpackages.com/packages/mradhi-youtube)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
