PHPackages                             tbetool/ffmpeg-music-combine - 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/ffmpeg-music-combine

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

tbetool/ffmpeg-music-combine
============================

Combine multiple music files using FFMPEG in PHP. Each music file can be combined at specific start position

1.2.6(7y ago)362PHPPHP &gt;=5.5

Since Oct 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/TBETool/ffmpeg-music-combine)[ Packagist](https://packagist.org/packages/tbetool/ffmpeg-music-combine)[ Docs](http://thebornengineer.com)[ RSS](/packages/tbetool-ffmpeg-music-combine/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

ffmpeg-music-combine
====================

[](#ffmpeg-music-combine)

Combine multiple music files using FFMPE each music at specific start time.

---

### Requirement

[](#requirement)

- FFMPEG

### Using the Library

[](#using-the-library)

#### Installation

[](#installation)

Intall library in PHP project using composer

```
composer require tbetool/ffmpeg-music-combine

```

#### Using Library

[](#using-library)

```
$music = new MusicCombine(FFMPEG_PATH, OUTPUT_DIR_PATH);

```

#### Combining music/audio files

[](#combining-musicaudio-files)

Once object is created you can combine multiple audio files by sending audio files in json format like

```
$data = [
    [
        'path' => '/path/to/music/1.mp3',
        'start' => ,
        'end' =>
    ],
    [
        'path' => '/path/to/music/2.mp3',
        'start' => ,
        'end' =>
    ]
];

$final_music = $music->combine(json_encode($data));

```

This will return the final music path in which all music files are combined.

In case of any error which combining music files, it will throw an exception.

---

#### NOTE

[](#note)

- Only **mp3** file is supported. Help needed for for file type support.
- Pass **absolute** path of the music file in `path` key.
- Give **absolute** path of the FFMPEG installation. You can find the path by running `whereis ffmpeg` in the terminal.

---

### Exception Handling

[](#exception-handling)

*Ex:*

```
try {
    $final_music = $music->combine(json_encode($data));
} catch (Exception $exception) {
    echo $exception->getMessage();
}

```

---

### Bug Reporting

[](#bug-reporting)

If you found any bug, create an [issue](https://github.com/TBETool/ffmpeg-music-combine/issues/new).

---

### Support and Contribution

[](#support-and-contribution)

Something is missing?

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~2 days

Total

11

Last Release

2739d 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 (18 commits)")

---

Tags

ffmpegAnuj SharmaTBEAnuj TBEphp ffmpegffmpeg music combineffmpeg php music combinecombine mp3combine multiple mp3 filesconcatenate mp3 filesconcatenate audio filesconcatenate audio file using ffmpegconcatenate audio file using php ffmpegconcatenate audio at specific start positionconcate multiple mp3 audio at specific pointsffmp audio concateffmpeg mp3 concate

### Embed Badge

![Health badge](/badges/tbetool-ffmpeg-music-combine/health.svg)

```
[![Health](https://phpackages.com/badges/tbetool-ffmpeg-music-combine/health.svg)](https://phpackages.com/packages/tbetool-ffmpeg-music-combine)
```

###  Alternatives

[php-ffmpeg/extras

A set of audio/video formats compatible with PHP-FFMpeg

182287.6k1](/packages/php-ffmpeg-extras)[cytopia/ffscreencast

ffmpeg screencast with video overlay and multi monitor support.

1.8k2.1k](/packages/cytopia-ffscreencast)[causal/extractor

This extension detects and extracts metadata (EXIF / IPTC / XMP / ...) from potentially thousand different file types (such as MS Word/Powerpoint/Excel documents, PDF and images) and bring them automatically and natively to TYPO3 when uploading assets. Works with built-in PHP functions but takes advantage of Apache Tika and other external tools for enhanced metadata extraction.

16244.5k](/packages/causal-extractor)[cinghie/yii2-traits

Yii2 Traits

116.9k8](/packages/cinghie-yii2-traits)

PHPackages © 2026

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