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?
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:
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:
That's that, now there's also a second service that might fit the requirements stated above:
Hope I could help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With