How to Convert a Piece of Video to an Animated Png File

How to convert a piece of video to an apng file. Apng means animated png, and it’s a true-color replacement for the popular animated gif. So far apng is supported by Firefox3 and Opera 9.5. To convert a video clip to an apng file, you could convert it into image sequences with Mplayer at first. The image sequences can be scaled, cropped and converted to an animated png file with mplayer and apng assemblers. To read the following steps, users should have some basics about command-line prompt in Windows To start a command-line prompt in Windows, you should 1: click on the Start Menu; 2. click on the Run option; 3: Type cmd ; 4: click on the OK button. The directory of mplayer’s binary files should be added to the PATH environment variable too.



Use a video player such as Mplayer to play the source video, and try to find the interesting part of your video.


Cut the video and convert it into image sequences (png) with the popular Mplayer. e.g. mplayer video.avi -vo png -ss 00:00:10 -endpos 5.0 (cut 5 seconds out of video.avi from 10.0s to 15.0s)

Crop (optional)

Use photoshop or gimp to open one of these png images, and find the interesting region.

Use mplayer to crop the video.

e.g. mplayer video.avi -vo png -ss 00:00:10 -endpos 5.0 -vf crop=480:360:80:60 The crop area is a 480×360 rectangle beginning from (80,60). Convert

Now you can use any apng assembler to convert these images to an animated png file now. To get a smaller apng file, you can use Jtvmaker and set 15bit color output in its quality pane. By using 15bit color, size of the final apng file can be reduced by about 50%. The output of jtvmaker should be set to “Apng animation”. Sleeptime should be set to 40ms for 25fps animation. The apng option should be blend or overlap. Cross-fade loop animation is also supported in Jtvmaker too. Author: stevpan

Leave a Reply

Your email address will not be published.