teamcoltra / php-video-to-gif
A video to GIF converter package creating a new GIF for every new subtitle line using PHP-FFMpeg and Imagick
dev-main
2023-07-07 18:28 UTC
Requires
- ext-imagick: *
- php-ffmpeg/php-ffmpeg: ^1.0.1
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-05-07 22:25:11 UTC
README
A video to GIF converter package using PHP-FFMpeg and Imagick.
Features
- Convert video files to animated GIFs with subtitles
- Customizable text styling and positioning (TODO)
- Supports various video formats
Requirements
- PHP 8.1 or later
- FFmpeg (with PHP-FFMpeg library)
- ImageMagick (with Imagick PHP extension)
Intallation
composer require teamcoltra/php-video-to-gif
Usage
use TeamColtra\PhpVideoToGif\VideoToGifConverter; $converter = new VideoToGifConverter(); $converter->convert('path/to/video.mp4', 'path/to/subtitles.srt','path/to/output');
Your output path defaults to gif/ and will create the directory if it doesn't already exist.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.
License
This package is open source and available under the MIT License.