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

ProtoneMedia\LaravelFFMpeg\FFMpeg\AdvancedOutputMapping::apply(): Argument #1 ($advancedMedia) must be of type FFMpeg\Media\AdvancedMedia, ProtoneMedia\LaravelFFMpeg\FFMpeg\VideoMedia given, called in \vendor\laravel\framework\src\Illuminate\Collections\HigherOrderCollectionProxy.php on line 60 #478

Open erosguerrero opened 1 year ago

erosguerrero commented 1 year ago

Hi everyone, I want to concat differents videos, that could be in different video formats like .avi or .mp4. As i understood in the docs i should use concatWithTranscoding, but i get that error

Here is my code

        FFMpeg::fromDisk('local')
        ->open($array->toArray())
        ->export()
        ->inFormat(new X264)
        ->concatWithTranscoding($hasVideo = true, $hasAudio = true)
        ->save($path);

        //Clean temporaly files
        FFMpeg::cleanupTemporaryFiles();

This code works with concatWithoutTranscoding (having for example an array of .mp4 media)