PHPackages                             michaelbelgium/youtube-to-mp3 - 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. michaelbelgium/youtube-to-mp3

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

michaelbelgium/youtube-to-mp3
=============================

Convert and search youtube video's via your own API

v4.0.0(10mo ago)1751.1k52MITPHPPHP &gt;=8.2CI passing

Since Jul 20Pushed 6d ago8 watchersCompare

[ Source](https://github.com/MichaelBelgium/Youtube-API)[ Packagist](https://packagist.org/packages/michaelbelgium/youtube-to-mp3)[ Fund](https://www.paypal.com/donate/?hosted_button_id=ZJSKX2ASR3ARL)[ GitHub Sponsors](https://github.com/MichaelBelgium)[ RSS](/packages/michaelbelgium-youtube-to-mp3/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (4)Versions (26)Used By (0)

Youtube-API
===========

[](#youtube-api)

With these files you are able to create your own Youtube API with ability to search also.

[Laravel version of this package](https://github.com/MichaelBelgium/Laravel-Youtube-API)

Software requirements
=====================

[](#software-requirements)

- [youtube-dl](https://rg3.github.io/youtube-dl/)
- [ffmpeg](https://www.ffmpeg.org/) (+ [libmp3lame](http://lame.sourceforge.net/))

General installation
====================

[](#general-installation)

First we install the dependencies on the server, then website.

VPS
---

[](#vps)

- Install ffmpeg (+ libmp3lame - see wiki for tutorial)
- [install youtube-dl](http://ytdl-org.github.io/youtube-dl/download.html) or [yt-dlp](https://github.com/yt-dlp/yt-dlp/releases/latest)

Website
-------

[](#website)

- Get a google developer api key
- Go to your webserver files to run composer into
- Run `composer create-project michaelbelgium/youtube-to-mp3 [directoryname]` - where `directoryname` is .. a directory where people can access the API from.

Configuration
-------------

[](#configuration)

To configure everything, you need to create a copy of `.env.example` as `.env`. This file should contain your settings. For more information on the settings, check the comments in the `.env` or `.env.example` file.

Documentation
-------------

[](#documentation)

Check out the [wiki](https://github.com/MichaelBelgium/Youtube-API/wiki) for more docs.

Docker
------

[](#docker)

You can deploy this project using `docker-compose.yml` and the `Dockerfile` to build from. Please add your google API Key to the `.env` file. It will expose port 80 from the container, out to port 80 on the host. This can also be changed in `.env` under HOST\_PORT. The docker image uses yt-dlp.

### How to run with docker-compose

[](#how-to-run-with-docker-compose)

Put docker-compose.yml and Dockerfile together in a new, empty folder. Create `.env`, and set the values listed in the example `.env` in this repo. To run, use the following command:

```
docker-compose up -d
```

To stop:

```
docker-compose down
# Or use this to remove the attached volume, to clear up space-
docker-compose down -v
```

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance80

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 86.6% 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 ~115 days

Recently: every ~40 days

Total

23

Last Release

313d ago

Major Versions

v1.3 → v2.02020-05-03

v2.3 → v3.02021-07-17

v3.6.2 → v4.0.02025-07-04

PHP version history (2 changes)v3.3PHP &gt;=7.4

v3.6.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/888b7a13d8ef5d680c9bc4a9baa1db37953015e30643e6320b3533459dd23d7a?d=identicon)[MichaelBelgium](/maintainers/MichaelBelgium)

---

Top Contributors

[![MichaelBelgium](https://avatars.githubusercontent.com/u/8951045?v=4)](https://github.com/MichaelBelgium "MichaelBelgium (149 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![dennorske](https://avatars.githubusercontent.com/u/3287543?v=4)](https://github.com/dennorske "dennorske (10 commits)")[![akbaig](https://avatars.githubusercontent.com/u/57063370?v=4)](https://github.com/akbaig "akbaig (2 commits)")

---

Tags

ffmpegmp3-apiyoutube-api-v3youtube-dlyoutube-dl-phpyoutube-downloaderyoutube-search

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/michaelbelgium-youtube-to-mp3/health.svg)

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

###  Alternatives

[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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