PHP package for generating video m3u8 playlist. it generate hls video for diffrent bitrates.
Tested with >=5.5, following binaries need to be installed
- ffmpeg (tested with v2.2)
composer require mehrdad-dadkhah/hls-video-generater
use MehrdadDadkhah\Video\HlsGenerater;
$hlsGenerater = new HlsGenerater();
$result = $hlsGenerater->setSource('path-to-video')
->setOutputDirectory('path-to-output-directory')
->checkAndGenerateOutputDirectory()
->setUri('/example/uri')
->setPrefix('sprite')
->setFilesOwnerAndPermission('root:www-data', 775)
->generate();
- Thanks to emgag I use his package and follow video-thumbnail-sprite structure.
Uses:
hls-video-generater is licensed under the GPLv3 License.