Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I created Ogv -videos with gtk-recordMyDesktop -screecasting program, trying to tackle this problem here with bruteforce over X. You can view the videos with VLC. Now the puzzle is to find some ways to convert Ogv -videos into Gif -animations so I can display them in SE. How can I do that?

share|improve this question

3 Answers 3

take a look at this:

..... After the Desktop Recorder has saved the recording into an OGV video, MPlayer will be used to capture JPEG screenshots, saving them into the 'output' directory.

On a terminal:

mplayer -ao null <video file name> -vo jpeg:outdir=output

Use ImageMagick to convert the screenshots into an animated gifs.

convert output/* output.gif

you can optimize the screenshots this way:

convert output.gif -fuzz 10% -layers Optimize optimised.gif
share|improve this answer
For a large number of images, I had to add -limit map 1 to convert (got a "Killed" otherwise). – Ax3l Sep 8 '14 at 15:12

echo '# Determine input WxH and FPS' 
eval "$(ffmpeg -i "$ifile" 2>&1 |sed -nr 's/.*Stream.*Video.* ([0-9]+x[0-9]+),.*[^[0-9.]([0-9.]+).*tbr,.*/WxH=\1;FPS=\2/p')"

echo '# Output multiple images from the input video'
ffmpeg -i "$ifile" -r $FPS -s $WxH -f image2 -vframes 100 -y ~/test-%03d.jpg 2>/dev/null

echo '# use ImageMagic "convert" to generate the animated .gif' 
convert -delay 20 ~/test-[0-9][0-9][0-9].jpg  ~/test.gif 

echo '# remove temp image files'    
rm -f  ~/test-[0-9][0-9][0-9].jpg

echo 'Done!'
share|improve this answer
Suggest converting to PNG, not JPEG, larger but reduces re-compression artifacts. – ideasman42 Mar 30 '14 at 6:50

You may try iDealshare VideoGo which is a professional OGV Converter:

As an OGV decoder, iDealshare VideoGo can fast and batch convert OGV to almost all popular video formats like convert OGV to GIF, MP4, convert OGV to AVI, convert OGV to MKV, convert OGV to MPG, WMV, ASF, Apple ProRes, MOV, RM, DV, FLV, WebM, VOB, 3GP, TS and etc. It even supporting converting OGV video to audio format like convert OGV to MP3, OGG, WAV, WMA, M4A, FLAC, AC3, AAC and etc.

As an OGV encoder, iDealshare VideoGo can easily create and encode OGV from other video formats including MP4, AVI, WMV, WTV, WebM, SWF, FLV, F4V, MOV, DV, AVCHD, MTS, MOD, TOD, MVI, MXF, DVR and etc.

share|improve this answer
Note that OGV Converter is available only for Windows and Mac. Given the text in the original question, I think the questioner is looking for something more unixy. – countermode Jul 31 '14 at 9:45

Your Answer


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