PHP Classes
elePHPant
Icontem

File: manual.txt

Recommend this page to a friend!
  Classes of Dave Smith  >  PHP Convert Video to GIF  >  manual.txt  >  Download  
File: manual.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP Convert Video to GIF
Convert a video file to animated GIF with giflayer
Author: By
Last change:
Date: 3 years ago
Size: 2,151 bytes
 

Contents

Class file image Download
Class: gifLayer
Version: 1.0 12/4/2015

Copyright 2015 Wagon Trader, All Rights Reserved


Description:

Convert web video into a GIF image using the giflayer API from
www.giflayer.com.

Supported video portals include...

BBC, Bloomberg Business Video, CNN, Dailymotion, Discovery, Facebook,
Flickr, Fox News Video, IMDB, LiveLeak, Twitch, Twitter, Vimeo, Vine,
Yahoo Screen and YouTube.


Files:

giflayer.class.php - main class

example.php - basic usage


Installation:

Upload files to a web accessible location on your server (eg. public_html)


Configuration:

You can change the following settings in the class to meet your specific needs...

apiKey = Your personal API Key, get a free key at https://giflayer.com/product

endpoint = The API endpoint, you will only need to change this if the API
    changes location.
    

Usage:

refer to example.php file for class instantiation and basic usage.

refer to giflayer.class.php for instructions on using methods.


Customizing the converted video:

In addition to the url, start, end and duration params, you can set the
following params to further customize the returned GIF. You can use the setParam
method to add/change any param.

size - the width and height in pixels of the GIF image.
    Default: size=200x300
    Min: size=50x50
    Max: size=5000x5000

crop - crop the image to the specified width and height in pixels.
    Default: none
    Min: crop=50x50
    Max: crop=5000x5000

fps - frames per second of the generated GIF. higher is better quality.
    Default: fps=15
    Min: fps=1
    Max: fps=30
    
Premium accounts also have access to the following params.

trailer - split the GIF image into parts for a preview.
    trailer=1 will split the image into 10 parts and play the first 10% of each part
    trailer=4,5 will split the image into 4 parts and play the first 5% of each part
    
export - export the GIF image to a specified location
    export=s3://[bucket api key]:[bucket secret key]@[bucket] will export to AWS S3 bucket
    export=ftp://[user]:[password]@[ftp server][/path/to/folder] will upload to folder using FTP
    

Changelog:

1.0

Initial Release