laravel-ffmpeg icon indicating copy to clipboard operation
laravel-ffmpeg copied to clipboard

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

Open erosguerrero opened this issue 2 years ago • 0 comments

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)

erosguerrero avatar Mar 12 '23 17:03 erosguerrero