Convert a gif to movie clip with some loop count?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Convert a gif to movie clip with some loop count?

Post by agriz »

Is it possible to convert a gif to movie clip? ( flv, avi, mov, mpeg )

//EDIT

I have converted the gif to mpeg. But how to make it loop for sometimes?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert a gif to movie clip with some loop count?

Post by fmw42 »

when creating the gif animation use the -loop option before the output. -loop 0 will repeat indefinitely. see http://www.imagemagick.org/Usage/anim_basics/

see supporte formats at http://www.imagemagick.org/script/formats.php#supported

or type

convert -list format

to see if your platform and IM compile support those formats. You may need to install certain delegate libraries to actually allow the use of supported formats.
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Convert a gif to movie clip with some loop count?

Post by agriz »

Yes, i created that gif with loop 0

But i have to convert that gif to mpeg.

convert 1.gif 1.mpeg
The mpeg is not looping
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert a gif to movie clip with some loop count?

Post by fmw42 »

You probably need to do the conversion with the mpeg delegate itself where you can set other parameters. Or find some other third party application. I suspect IM just blindly converts the images and not the animation arguments. Probably need to search Google for it or go to http://libmpeg2.sourceforge.net/. Actually I think IM uses FFMPEG.
Last edited by fmw42 on 2012-07-23T15:18:55-07:00, edited 1 time in total.
rich2005
Posts: 32
Joined: 2012-04-09T11:07:36-07:00
Authentication code: 8675308

Re: Convert a gif to movie clip with some loop count?

Post by rich2005 »

A video file on its own does not loop. Some players have an option to loop indefinitely. VLC is one.
If you wanted a certain number of loops, you would need to join together copies of the same video clip.
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Convert a gif to movie clip with some loop count?

Post by agriz »

rich2005 wrote:A video file on its own does not loop. Some players have an option to loop indefinitely. VLC is one.
If you wanted a certain number of loops, you would need to join together copies of the same video clip.
Yes, It is now running the video for few seconds extra :)
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Convert a gif to movie clip with some loop count?

Post by agriz »

I have a little problem on the quality of mpeg.
The gif animation is looking good. But once converted to mpeg, it is not very good. The quality become worst.

Is there any way to fix this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert a gif to movie clip with some loop count?

Post by fmw42 »

Use ffmpeg by itself after creating your gif images. There was another similar post that went into more details
Post Reply