Posted: . At: 10:30 AM. This was 8 years ago. Post ID: 9273
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Easy way to make a webm for Firefox playback with ffmpeg.

This is how to create a nice webm using FFmpeg on Linux. Firstly, capture the section of the video you wish to be encoded as a webm. This command will strip out a section of video from 00:09:23 to 00:09:33 and save it in the same format as the existing file.

jason@jason-desktop:~/Videos$ ffmpeg -i total.mkv -vcodec copy -acodec copy -ss 00:09:23 -to 00:09:33 out.mkv

Then we may encode it as a webm file.

This command encodes our webm with the best quality depending on the original source video of course.

jason@jason-desktop:~/Videos$ ffmpeg -i out.mkv -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output.webm

Now we have a quality webm file with no fuss. This file is only 1.3 megabytes too, not bad. This is better than opening the video in VLC and clicking record to capture a section of the video.

To create a webm with no sound, use the -an parameter to skip the sound and make the file slightly smaller.

~$ ffmpeg -i intro.wmv -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis -an intro.webm

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.