PHPackages                             tbetool/php-fb-youtube-download - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tbetool/php-fb-youtube-download

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tbetool/php-fb-youtube-download
===============================

Based on Youtube-dl and FFMPEG. Downloads Youtube and Facebook videos from the url.

1.1(7y ago)2355PHPPHP &gt;=5.5

Since Oct 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/TBETool/php-fb-youtube-download)[ Packagist](https://packagist.org/packages/tbetool/php-fb-youtube-download)[ Docs](http://thebornengineer.com)[ RSS](/packages/tbetool-php-fb-youtube-download/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP Library: Facebook-Youtube downloader
----------------------------------------

[](#php-library-facebook-youtube-downloader)

PHP Library to download Facebook and Youtube videos.

---

### Using the Library

[](#using-the-library)

#### Requirement

[](#requirement)

1. FFMPEG: Media editing library
2. youtube-dl: command line library to download videos

#### Installation

[](#installation)

Intall library in PHP project using composer

```
composer require tbetool/php-fb-youtube-download

```

#### Using Library

[](#using-library)

$downloader = new Downloader(FFMPEG\_PATH, YOUTUBE-DL\_PATH);

#### Setting output path

[](#setting-output-path)

Set absolute path of the directory where to save the output. You don't need to provide a file name as it will be auto generated.

```
$path = '/aboslute/path/to/directory';

$downloader->setOutputPath($path);

```

#### Download video

[](#download-video)

```
$downloader->download(video_url);

```

You can pass Facebook or Youtube video url to the `download()` function.
If video is downloaded successfully, this will return the path of the local video saved, otherwise will throw an exception.

---

### Exception handling

[](#exception-handling)

Every function throws an Exception in case of any error/issue. Bind the code block within `try-catch` block to catch any exception occurred.

*Ex:*

```
try {
    $downloader->download(video_url);
} catch (Exception $exception) {
    echo $exception->getMessage();
}

```

---

### Bug Reporting

[](#bug-reporting)

If you found any bug, create an [issue](https://github.com/TBETool/php-fb-youtube-download/issues/new).

---

### Support and Contribution

[](#support-and-contribution)

Something is missing?

- `Fork` the repositroy
- Make your contribution
- make a `pull request`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2773d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6560085?v=4)[Anuj Sharma](/maintainers/anuj9196)[@anuj9196](https://github.com/anuj9196)

---

Top Contributors

[![anuj9196](https://avatars.githubusercontent.com/u/6560085?v=4)](https://github.com/anuj9196 "anuj9196 (7 commits)")

---

Tags

youtube downloaderAnuj SharmaTBEAnuj TBEPHP download from urlfacebook downloaderphp facebook video downloadphp youtube video downloadfacebook video downloadyoutube video downloadphp downloaderphp facebook download videophp facebook downloadphp youtube download video

### Embed Badge

![Health badge](/badges/tbetool-php-fb-youtube-download/health.svg)

```
[![Health](https://phpackages.com/badges/tbetool-php-fb-youtube-download/health.svg)](https://phpackages.com/packages/tbetool-php-fb-youtube-download)
```

###  Alternatives

[athlon1600/youtube-downloader

PHP powered alternative for youtube-dl

922160.2k9](/packages/athlon1600-youtube-downloader)

PHPackages © 2026

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