How to encode a video to webm format and use it as a GIF replacement.

Posted: April 17, 2014. At: 10:14 AM. This was 4 years ago. Post ID: 7170
Page permalink:

This is how to encode a video to webm format without sound to create a GIF replacement. The ffmpeg utility allows encoding a video in different formats. This is the perfect command for encoding a good quality webm video.

ffmpeg -i gzdoom_2012_11_04_20_34_10_391.avi -ss 00:01:00.000 -to 00:01:20.000 \
-codec:v libvpx -quality good -cpu-used 0 -b:v 500k -qmin 10 -qmax 42 -maxrate 500k\
 -bufsize 1000k -threads 4 -vf scale=-1:480 -an hell.webm

This is how to encode with sound in ogg vorbis format.

ffmpeg -i Unreal-noork.wmv -ss 00:00:20.000 -to 00:00:40.000 \
-codec:v libvpx -quality good -cpu-used 0 -b:v 500k -qmin 10 \
-qmax 42 -maxrate 500k -bufsize 1000k -threads 4 -vf scale=-1:480 \
-codec:a libvorbis -b:a 128k output2.webm

The webm format is used increasingly on such websites as 4chan instead of GIF. This allows HD full-color videos in only a couple of megabytes. And it is supported natively by the Firefox web browser. So why not use it on your website?

Read more about webm support on Youtube here: This offers the ability to play videos without the need for the problematic flash plugin. I am trying to watch a video on ABC Iview and it will not work at all with the 11.2 flash plugin. That is a problem when they are not using HTML5 and have a limited budget to implement support for this in the future. But hopefully, webm and HTML5 will be the future.

No comments have been made. Use this form to start the conversation :)

Leave a Reply