Skip to content

Instantly share code, notes, and snippets.

@sir-ragna
Last active April 27, 2016 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sir-ragna/4018b3d8f639b2bb8b28595ec2c9a6da to your computer and use it in GitHub Desktop.
Save sir-ragna/4018b3d8f639b2bb8b28595ec2c9a6da to your computer and use it in GitHub Desktop.
MAKING WEBM WITH FFMPEG

MAKING WEBM WITH FFMPEG

Easy way out of this

For people who are afraid of the commandline https://gitgud.io/nixx/WebMConverter

Skip to the download link: http://nixx.is-fantabulo.us/WebM%20for%20Retards/latest.zip

Installation

These are the installation instructions for linux. Windows users can just download the executable and skip to the step usage.

Download ffmpeg from http://ffmpeg.org/ Extract the file tar -xf ffmpeg-3.0.1.tar.bz2

Install the dependencies. The libvpx is a library that is needed to output the webm format. And some parts to incorporate it into ffmpeg seem to be written in yasm.

aptitude install libvpx-dev yasm -y

Onto the compiling. Don't forget the --enable-libvpx flag. Adjust -j flag to rougly the amount of cores you have in your machine to speed up the compilation.

cd ffmpeg-3.0.1/
./configure --enable-libvpx
make -j5
sudo make install

Usage

How to create a simple webm from a movie.

ffmpeg -t 12.2 -ss 25.5 -movie.mp4 -vcodec libvpx -strict -2 funny.webm

Deconstruction:

  • -t 12.2 take a 12.2 seconds clip
  • -ss 25.5 start at the 25.5 seconds mark
  • -i movie.mp4 is the input file
  • -vcodec libvpx use the codec you need for webm for output
  • -strict -2 use vorbis sound(which is experimental) so you also have sound
  • funny.webm the output file name

This link contains a few tips to improve the quality: https://wiki.installgentoo.com/index.php/WebM

Bonus

Acquire video material from youtube by using youtube-dl. https://rg3.github.io/youtube-dl/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment