Bulk video to gif creation

Feb 8, 2013
1,089
27
0
juliantrueflynn.com
Anyone have experience with this?

If I have a large sum of videos where I need to mass crop, trim 5 seconds off beginning/end, and change to gifs, is this possible? Haven't been seeing any suitable tools?

Bonus feature would be mass splitting video clips too at certain amount of seconds too.
 


If you are comfortable with the linux command line:
Code:
ffmpeg -t <duration> -ss <starting position in hh:mm:ss format> -i <video_file> output%04d.gif

That will create a bunch of (not animated) gif files with names like output001.gif, output0002.gif, etc.

Then, you can assemble them into an animated gif with something like gifsicle or imagemagick
 
If you are comfortable with the linux command line:
Code:
ffmpeg -t <duration> -ss <starting position in hh:mm:ss format> -i <video_file> output%04d.gif

That will create a bunch of (not animated) gif files with names like output001.gif, output0002.gif, etc.

Then, you can assemble them into an animated gif with something like gifsicle or imagemagick
Checking into this... So they wouldn't be outputed as animated gifs that would be web-ready? I would need another step of turning them into animated ones?

Edit: Would the outputted ones, that I need to combine to turn into animated gifs. Would it have any issue knowing when to start and stop the gif files? Like if I outputted all these images to a folder. Would something like imagemagik know to start a new gif at 0001.gif? Sorry if this is a stupid question

Thanks for this, appreciate it
 
Would something like imagemagik know to start a new gif at 0001.gif?
Sort of. Ffmpeg numbers them like this so they will list in order for any command. Like, if you type "echo output*gif" they will show in the right order. It's basically the unix shell that's putting them in order.

Since they are in the right order, any tool that can combine single frame gif files into an animated gif can handle it:

Code:
#example with gifsicle
gifsicle --delay=10 --loop output*.gif > animated.gif

#example with imagemagick
convert   -delay 10  -loop 0   output*.gif   animated.gif

Those will be unoptimized gif files, so pretty large. Gifsicle seems to do well with optimization...add -O2 to the command line example above and it will optimize the file size.
 
Photoshop can work with animated gifs. It shows all the frames and you have to do "Save For Web" and select choice of Gif as the output, and it's animated.

I just use screen to gif for copying vids to gifs, easy to trim the ends, then open in ps and reduce the image size, then output as gif and works great.

Super shitty resolution so it loads fast, but you can keep it higher.
cops1reduced.gif
 
Photoshop wouldn't quite work for this process - but yea PS actions are awesome.

If anyone cares what I ended up with. There's an app called Video2Gif that does what the command line stuff does above but just a little easier for me. Costs $5 in app store for desktop. Handles bulk videos and offers settings for the output of the videos that help make them look more unique which is nice.

Still might do it the command line way because that might be easier to automate completely down to any new Dropbox uploads.

Thanks again everyone for their help.

https://itunes.apple.com/us/app/total-video2gif/id486259694?mt=12

'Unique' content bros