We are still actively working on the spam issue.

User:Ergopon/WebM Tutorial

From InstallGentoo Wiki
< User:Ergopon
Revision as of 05:22, 23 April 2014 by Ergopon (talk | contribs) (Created page with "This guide assumes that you have installed gentoo. == The basic command == <code>ffmpeg -i input.mkv output.webm</code> Wow! Is it really that easy? Yes. Yes it is. Ho...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This guide assumes that you have installed gentoo.


The basic command

ffmpeg -i input.mkv output.webm

Wow! Is it really that easy? Yes. Yes it is. However, this will give you a really shitty webm that everyone will mock you for. You might as well be posting gifs. In order to make good quality webms, we need to add extra options to fine-tune it.

First, let's examine the structure of an ffmpeg command.

ffmpeg

Starts the ffmpeg program you have on your computer. Pretty straightforward.

-i input.mkv

The file you want to convert. You always need an -i in front. If the filename has space you need to enclose it in quotes: -i "my file.mkv"

output.webm

The name of the converted webm.

Basic options

Look at your webm. It is really shitty. How are you going to make it less shitty? By increasing the quality.

For webms, quality is controlled by 2 general settings:


1. Bitrate

Bitrate is simply the amount of data that goes into each second. Higher bitrates mean higher quality, but also with a bigger filesize.

-b:v BITRATE

"BITRATE" can be values such as 320K, 2M, and so on.


2. CRF

CRF is a setting that tries to make each second meet a certain amount of "quality." Some scenes need less data to look good, so the extra data can be used for other scenes.

-crf NUMBER

"NUMBER" can be a value from 4 - 63, where lower is better quality.


Place your settings after your input. For example:

ffmpeg -i input.mkv -b:v 2M -crf 10 output.webm

You should always set both a bitrate and a CRF or else it will default to something really shitty. Optimizing these two settings will make your webm pretty decent already.