Pages

Thursday, August 23, 2018

Converting an animated GIF to OGG Theora video

Converting an animated GIF to OGG Theora video


You should be familiar with using the command line prompt in order to follow this tutorial.

Converting an animated GIF to OGG Theora video

Programs used:

  • mplayer.exe inside latest SMPlayer folder. Note: You arent using the smplayer executable, but the mplayer command-line tool in one of its subdirectories.
  • ffmpeg2theora-0.25.exe (because version 0.26 ignores the requested frame rate)

Steps:

  1. download the 7 frame 9 megabyte File:Scm.gif to PC
  2. Open command line prompt in Windows.
  3. mplayer Scm.gif -vo yuv4mpeg (This outputs a yuv file)
  4. ffmpeg2theora-0.25.exe stream.yuv --inputfps 1 --framerate 1 --videoquality 10 --output stream025ifps1fr1vq10.ogv

Converting Theora to animated GIF

Programs used:

  • mplayer.exe inside latest SMPlayer folder. Note: You arent using the smplayer executable, but the mplayer command-line tool in one of its subdirectories.
  • gifsicle - for fixing the framerate of the outputted GIF
Steps:
  • Run this command: mplayer.exe video.ogv -fps 1 -vo gif89a -nosound

The command above will convert video.ogv to "out.gif". MPlayer has problems with certain input OGG video files. This may be due to an improperly encoded Theora file.

If the GIFs framerate is off, use gifsicle to examine the created GIF:

  • gifsicle.exe --info out.gif

Use gifsicle to fix the framerate of the GIF that MPlayer creates, for example:

  • gifsicle.exe --delay 100 out.gif > out100.gif
One major problem is the colour reduction: the user must choose how the colour palette is to be reduced to GIFs 256 colour limit. If MPlayers default reduction looks bad (it may look blocky) then the video needs to be converted to a sequence of images so that their colour palettes can be manually changed.

Hope that helps. If you found this useful, leave a thank you comment.

visit link download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.