protonemedia / laravel-ffmpeg

This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.
https://protone.media/en/blog/how-to-use-ffmpeg-in-your-laravel-projects
MIT License
1.62k stars 193 forks source link

How convert file mp3 to mp4 #482

Open DanielKotecki opened 1 year ago

DanielKotecki commented 1 year ago

Hello I have a problem with convert my file mp3 to mp4 in laravel i write a code but dont work

$mp3FilePath = '/uploads-temp/sample.mp3'; $midBitrate = (new X264)->setKiloBitrate(500); FFMpeg::fromDisk('public') ->open($mp3FilePath) ->export() ->toDisk('public') ->inFormat($midBitrate)->resize(300,400) ->toDisk('public') ->save('sample.mp4');