{"size": 468, "ext": "js", "max_stars_repo_path": "Task_createGif/index.js", "max_stars_repo_name": "YiYangabc/breakvideosintoimages", "max_stars_repo_stars_event_min_datetime": "2019-08-14T14:15:18.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-21T08:02:42.000Z", "max_issues_repo_path": "Task_createGif/index.js", "max_issues_repo_name": "YiYangabc/breakvideosintoimages", "max_issues_repo_issues_event_min_datetime": "2020-07-16T20:39:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-03T20:52:04.000Z", "max_forks_repo_path": "Task_createGif/index.js", "max_forks_repo_name": "YiYangabc/breakvideosintoimages", "max_forks_repo_forks_event_min_datetime": "2019-06-24T14:22:12.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-25T19:23:39.000Z"}
{"max_stars_count": 11, "max_issues_count": 3, "max_forks_count": 2, "avg_line_length": 42.5454545455, "max_line_length": 120, "alphanum_fraction": 0.6068376068}
﻿const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const spawn = require('child_process').spawn;

module.exports =  function (context) {
      context.log('@@@ Activity 3 @@@'); 
      const gifName = (context.bindings.name.split('.'))[0]+'.gif';
      const ffmpeg=   spawn(ffmpegPath, ['-i',context.bindings.name,'-vf','fps=12,scale=854:-1','-f','gif',gifName]);   
      ffmpeg.on('exit',()=>{
        context.done(null, {fileName:gifName});
      });
};