0

In Microsoft PowerPoint 2013, I have a single slide containing a fairly complex animation. I would like to convert this animation to an animated GIF file.

I have tried saving the animation directly from PowerPoint into an mp4 or wmv video file. Unfortunately, both of these formats use lossy compression. When converted to GIF (using FFmpeg and ImageMagick), the output file is larger than necessary because it faithfully reproduces all of the mp4/wmv compression artefacts.

Is there any way to get PowerPoint to save a lossless video of my animation? Converting a lossless video to GIF should result in a significantly smaller file, as well as slightly cleaner output.

If it is not possible to get such a lossless video, is there any other recommended way to create a GIF of my animation?

4
  • What ffmpeg command do you use to convert to GIF?
    – Gyan
    May 10, 2016 at 17:51
  • @Mulvya - I am extracting the video frames using ffmpeg -i FromPowerPoint.mp4 FromPowerPoint\ffout%03d.png, then converting to a GIF using ImageMagick's convert.exe -layers optimize -loop 0 FromPowerPoint\ffout*.png FromPowerPoint.gif
    – user200783
    May 11, 2016 at 1:41
  • And how does the Powerpoint video look - blocky or clean enough?
    – Gyan
    May 11, 2016 at 9:00
  • @Mulvya - The MP4 video looks fine. The artefacts are very minor to look at, but seem to be significantly increasing the memory footprint of animated GIF frames.
    – user200783
    May 11, 2016 at 10:18

1 Answer 1

2

Try using ffmpeg to generate the GIF as well. It's a two step process.

Step 1 Generate a palette

ffmpeg -i ppt.mp4 -vf palettegen palette.png

Step 2 Generate the GIF

ffmpeg -i ppt.mp4 -i palette.png -filter_complex paletteuse out.gif

If the above doesn't produce an acceptable result, we can try using ffmpeg to screengrab the PPT animation and use that as the source.

5
  • Thank you for this suggestion. It produces a good-quality GIF, but unfortunately one which is large in size: 2.8MB compared to the 2.3MB generated by convert.exe as above. If I just run ffmpeg -i FromPowerPoint.mp4 FromPowerPoint.gif, the GIF is poor quality (with obvious dithering), but is only 1.0MB in size.
    – user200783
    May 11, 2016 at 12:52
  • 1
    As you suggest, it looks like screen recording might be the way to go - unlike mp4 or wmv this can be done in a lossless manner. I tried using a "ScreenToGif" tool and was able to produce a good-quality GIF of only 0.9MB. I was not aware that it was possible to use ffmpeg to record the screen - do you have any information on how to do this?
    – user200783
    May 11, 2016 at 12:52
  • This size discrepancy looks to do with the framerate. What does ffmpeg say in ffmpeg -i gif-ffmpeg.gif and ffmpeg -i gif-screentogif.gif? FFmpeg has multiple methods to record the screen in Windows. But let's see what the framerate probe shows.
    – Gyan
    May 11, 2016 at 13:15
  • All four versions of the GIF give the same output from ffmpeg -i: Stream #0:0: Video: gif, bgra, 384x384, 10 fps, 10 tbr, 100 tbn.
    – user200783
    May 11, 2016 at 13:40
  • Interesting. Basic method to record the screen, in this case, is ffmpeg -f gdigrab -framerate 10 -i desktop -c:v libx264rgb -preset ultrafast -pix_fmt bgr0 out.mp4 - This will then need to be cropped and run through the two step process.
    – Gyan
    May 11, 2016 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .