3 ms·
This is really cool! Is it possible to select a specific time range of a video via the API? E.g. I only want the first 3 seconds of a video to be turned into a
by intruder 10y ago
This is really cool! Is it possible to select a specific time range of a video via the API?
E.g. I only want the first 3 seconds of a video to be turned into a gif.
- anonfunction 10y agoYes this is possible, we havn't updated the docs[1] yet but the editor uses our public API for all the effects. { "source": "https://www.youtube.com/watch?v=jhyANGHDDH8", "trim": { "start": 145, "end": 148 } } 1. http://docs.gifs.com/v1.0/docs http://docs.gifs.com/v1.0/docs
- intruder 10y agoCool but please clamp the values to be within 0 and currentDuration. I'm getting an error that the duration that youtube sends me back is higher than your read out duration: { errors: { message: 'end(8s) > currentDuration(7.383s)' } }
- anonfunction 10y agoGood idea of just trimming to the end if the end value is greater than the video duration, I'll add that next week. As a quick hack since the youtube video duration is 7.383s, and you want to trim to the end just omit the end property.