Friday 15 April 2011

linux - Fastest way to create animated gifs from mp4 -


I get the batch process in animated GIFs in a very high number (200,000 +) small MP4 (less then 10s) have to keep. I think I have tried every possible command line to do this, but it still takes a lot of time to produce quality gifs. Currently I use FFPAP to open the image (JPG), and the image magikk converts them to collect. It creates a high-quality GIF, but takes a lot of time and uses a lot of memory and CPU, even with tile-to-memory storage and map boundaries.

I have also tried to create animated GIF using FFPAG, but the quality is awesome in the best. Besides, I tried to use gifsicle, which appears to be fast, but It only takes gifs as input, and uses ffmpeg to produce poor quality gifs.

Does anyone have some high quality command line dishes, GIF creation?

For the first time you should create a maximum quality JPG image using the mplayer And jpeg option set 100 (jpeg: quality = 100).

  mplayer -ao null -ss 0:00:00 -endpos 10 mts .flv -vo jpeg: outdir = jpeg_dir: quality = 100   

next , You need to convert by using convert to generate from JPG, just type:

  for i /Jpeg_dir/ * .jpg; Change "$ I" "$ {i% .jpg} .gif";   

and finally use gifsicle Animated GIF:

  gifsicle --delay = 10 --loop ./jpeg_dir / * .gif & gt; Anim.gif   

In addition, you can use the customizable level flag - customizable = 03 . File size may be helpful in reducing:

  gifsicle --delay = 10 --optimize = 03 --loop * .gif> In addition, Anim.gif   

In addition, you can manipulate with the number of colors - color of the current color num and - color scheme < / Code> to determine the most suitable palette.

< P> Apart from this, I try to manipulate with the described flag and found the most useful option to get better quality of GIF-image generated:

  gifsicle - delay = 3 - optimize Do = 03 - Color-mode mid-cut --loop * .gif & gt; Anim.gif   

To be consistent with the animation speed, be accurate with - delay = NUM ​​, depending on the FPS of the original video.

No comments:

Post a Comment