jeankassio / videotogif
This package is abandoned and no longer maintained.
No replacement package was suggested.
A simple video to gif converter that uses FFMPEG and simplifies the whole process for you.
0.5.9
2023-06-03 19:50 UTC
Requires
- php: >=8.0
- php-ffmpeg/php-ffmpeg: ^1.0.1
README
A simple video to gif converter that uses FFMPEG and simplifies the whole process for you. The entire process is done in base64, from input to output
You must have FFMpeg installed in your PATH on your system. If not, follow this tutorial.
Installation
The recommended way to install is using Composer.
$ composer require jeankassio/videotogif
How to use?
use JeanKassio\VideoToGif; $converter = new VideoToGif(); $b64 = "data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAGlzb2..."; $result = $converter->convert($b64); var_dump($result);
And the result will look like:
array(4) { ["gif"]=> string(304970) "data:image/gif;base64,R0lGODlhkAGWAfcAAD4AND4UPUMHN1YBNEkUO1UYPGUWO1cl..." (Hidden to save on reading) ["fps"]=> int(29) ["width"]=> int(400) ["height"]=> int(406) }