tbetool/ffmpeg-music-combine 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tbetool/ffmpeg-music-combine

Composer 安装命令:

composer require tbetool/ffmpeg-music-combine

包简介

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

README 文档

README

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

Requirement

  • FFMPEG

Using the Library

Installation

Intall library in PHP project using composer

composer require tbetool/ffmpeg-music-combine

Using Library

$music = new MusicCombine(FFMPEG_PATH, OUTPUT_DIR_PATH);

Combining music/audio 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' => <start time in seconds>,
        'end' => <end time in seconds>
    ],
    [
        'path' => '/path/to/music/2.mp3',
        'start' => <start time in seconds>,
        'end' => <end time in seconds>
    ]
];

$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

  • 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

Ex:

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

Bug Reporting

If you found any bug, create an issue.

Support and Contribution

Something is missing?

  • Fork the repositroy
  • Make your contribution
  • make a pull request

统计信息

  • 总下载量: 62
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-10-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固