Service to convert video to gif via api [closed]
Asked Answered
T

1

9

I've been using Zencoder's api to convert videos from one format to another but I now need to convert a video to an animated gif which is not included in the output formats on Zencoder.

Anyone know of a service which is able to do this, or alternatively any relatively simple backend library ideally php based which could do this?

Testes answered 7/11, 2012 at 11:3 Comment(1)
AWS now exports to GIF with Elastic Transcoder: aws.amazon.com/blogs/aws/… The quality is questionable though..Illicit
S
5

I think due to the difficulty of making such a web service (API) work efficiently at scale there are very few providers offering the functionality of automating Video to GIF conversion via a REST API.

However, I found myself in a similar situation recently, did some research and came across two API products that might do the job for you:

  1. giflayer API

    This one's a REST API dedicated to converting videos to GIF animations. It works for both video URLs to portals like YouTube, and direct video links like http://website.com/video.mp4.

    Here's how you make an API request:

    https://apilayer.net/api/capture
       ? access_key = YOUR_ACCESS_KEY
       & url = https://www.youtube.com/watch?v=3W6hZR29l5o
       & start = 170
       & duration = 1.5  
    


    Then, after a few seconds the API directly returns your GIF animation according to the parameters supplied in the request:

    enter image description here


That's that, now there's also a second service that might fit the requirements stated above:

  1. gfycat

    While they don't create actual GIFs, they supplement them by converting to HTML5 video, which is more lightweight in size. Just including this link if you're not yet sure whether it's actual GIF conversion you need.

Hope I could help.

Subaqueous answered 28/10, 2015 at 15:1 Comment(1)
giflayer API has been discontinued.Ache

© 2022 - 2024 — McMap. All rights reserved.