I have been using the Yahoo gifshot library to generate gifs from videos. A user uploads a video, and I use this library to dynamically create a gif from that video. However, the issue arises when a user uploads a two-second video but the resulting gif is only saved as one second in duration...
Here is the code snippet:
gifshot.createGIF({
'video': [U + 'Content/convertedVideos/bla.mp4'],
'gifWidth': 800,
'gifHeight': 400,
...
I tried adding the numframes property, which seemed to work fine. But now, another problem has surfaced where it displays both the one-second gif followed by the two-second gif...
Updated code:
'video': [U + 'Content/convertedVideos/bla.mp4],
'gifWidth': 800,
'gifHeight': 400,
'numFrames': 20,
See the image here: https://i.sstatic.net/Qg4En.gif
Upon loading, the first shows a one-second gif and then transitions to the two-second gif. How can I save only a two-second duration gif? Any assistance would be greatly appreciated. Apologies for any language mistakes.