jackal/giffhanger

This package is abandoned and no longer maintained. No replacement package was suggested.

v0.2.8 2020-06-17 06:26 UTC

This package is auto-updated.

Last update: 2024-07-17 16:12:51 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality Build Status

(play on words: from "Cliffhanger")

It generates Video previews in GIF or Video format. To use this library you need ffmpeg executable installed

Installation

composer require jackal/giffhanger

Usage

Minimal example

$giffhanger = new Giffhanger('/path/to/video/file',[
    'output_dimension' => 320
]);
//to generate gif
$giffhanger->generate('/path/to/output.gif');

//to generate video
$giffhanger->generate('/path/to/output.avi');

Options

  • resize_width: resize width (in pixels) of the output file [default: 640]
  • crop_ratio: crop the video following the value passed [default crop is not applied]
  • temp_dir: define the temp directory used to generate the output file [default is system temp directory]
  • frames: number of "pieces" taken to build the preview [default is 3]
  • duration: duration (in seconds) of the preview [default is 6]
  • bitrate: bitrate of the video (used only in case of mp4 output) [default 600]
  • frame_rate: framerate of the output [default 10]