Converting animated gif to movie format to embed in pdf

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
rhaynes74

Converting animated gif to movie format to embed in pdf

Post by rhaynes74 »

Hi, I am attempting to embed a movie into a pdf file using the latex movie15 package.

It doesn't appear possible to embed an animated gif this way. So I need to convert it to a different
format.

convert file.gif file.avi produces a nice movie but again it doesn't embed properly.

.mpg files embed ok but

convert file.gif file.mpg results in a huge loss of quality. What flags do I need to keep the quality?

Or are there other formats I can use?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Converting animated gif to movie format to embed in pdf

Post by anthony »

The question is, is an animation or movie in a PDF even possible. I've never heard of it!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
rhaynes74

Re: Converting animated gif to movie format to embed in pdf

Post by rhaynes74 »

absolutely - just search google for "latex pdf movie15".
rhaynes74

Re: Converting animated gif to movie format to embed in pdf

Post by rhaynes74 »

anthony wrote:The question is, is an animation or movie in a PDF even possible. I've never heard of it!
Hi Anthony - so I have a way to embed .mov files in my pdf using LaTex.

I have a sequence of 20 (or so) high quality .gif files. I use

convert -delay 200 file*.gif file.mov

to produce the .mov file.

But the quality is terrible - the images (after the 1st it appears!) become very "blurry/grainy", what options do I need to keep the integrity of the original images ?

R Haynes
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting animated gif to movie format to embed in pdf

Post by fmw42 »

I am not an animation expert, but you probably have too many different colors from all the images, so that you exceed the gif 256 color limitation. You many need to produce a common color map and use that. see

http://www.imagemagick.org/Usage/anim_opt/#color_op
http://www.imagemagick.org/Usage/video/#gif
http://www.imagemagick.org/Usage/quantize/#map
rhaynes74

Re: Converting animated gif to movie format to embed in pdf

Post by rhaynes74 »

Hi - the same thing happens if I convert all the images to jpegs first and then attempt
to convert to a .mov file (.mpg or whatever).

R Haynes
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting animated gif to movie format to embed in pdf

Post by fmw42 »

still too many colors with jpg
Post Reply