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.63k stars 194 forks source link

EncodingException-Problem in creating timelapse #441

Open MohsenHeidari97 opened 1 year ago

MohsenHeidari97 commented 1 year ago

I want to make a timelapse just like the example given in the ffmpeg doc ( https://github.com/protonemedia/laravel-ffmpeg#create-a-timelapse). I can save video in wmv and ogg formats but I had problem in saving videos in mp4. the output is a file with 0kb size and 0 second duration. I receive this exception when I run the method:

`

{
    $x = FFMpeg::open('test.jpg')
        ->export()
        ->asTimelapseWithFramerate(1)
        ->inFormat(new \FFMpeg\Format\Video\X264)
        ->save('timelapse.mp4');
    return $x;
}

image_2022-09-29_18-04-21 image_2022-09-29_18-04-54

I'll be appreciate if anybody could help me.