Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a small animation formatted as a GIF image file which I would like to convert to a video. Is that possible?

share|improve this question
up vote 2 down vote accepted

Using a Nautilus Script


You can easily convert GIF files to videos by using the imagemagick suite and avconv. To make the process easier I have written a small Nautilus script that takes your GIF file and the desired framerate as its input and outputs an MP4 file.



# NAME          gif2mp4 0.1
# AUTHOR        Glutanimate (c) 2013 (
# LICENSE       GNU GPL v3 (
# DESCRIPTION   Converts GIF files of a specific framerate to MP4 video files.
# DEPENDENCIES  zenity,imagemagick,avconv

TMPDIR=$(mktemp -d)
FPS=$(zenity --width 200 --height 100 --entry --title "gif2mp4" --text="Please enter the frame rate.")
VIDDIR=$(dirname $1)

if [ -z "$FPS" ]

notify-send -i video-x-generic.png "gif2mp4" "Converting $(basename "$1") ..."

convert "$1" $TMPDIR/frame%02d.png
avconv -r $FPS -i $TMPDIR/frame%02d.png -qscale 4 "$VIDDIR/$(basename "$1" .gif).mp4"

notify-send -i video-x-generic.png "gif2mp4" "$(basename "$1") converted"

rm -rf $TMPDIR

Installation instructions

Please see here for more information on how to install this script: How can I install a Nautilus script?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.