allngth/ffmpeg-audio

1.0.0 2017-09-17 19:12 UTC

This package is not auto-updated.

Last update: 2025-07-06 06:14:58 UTC


README

How this library works:

This library requires a working FFMpeg install. You will need FFMpeg binary to use it. Be sure that these binary can be located with system PATH to get the benefit of the binary detection, otherwise you should have to explicitly give the binaries path on load.

Use case for google speech

$res = $ffmpegAudio->inputFile('audio.mp3')
    ->outputFile('output.flac')
    ->outputSampleRate(16000)
    ->outputChannelCount(1)
    ->convert();

Useful links

PHP-FFMpeg - library to convert video/audio files

php-exec-command - simple php command executor