Difference between revisions of "Encoding Videos"

From Theora Playback Library
Jump to: navigation, search
(Created page with "There's not an abundance of tools to encode videos in the Theora format, so here you can read our recommended tools and techniques for encoding videos. First of all, libtheor...")
 
Line 17: Line 17:
 
if you have multiple images, use this:
 
if you have multiple images, use this:
  
'''ffmpeg2theora image_%05d.bmp -v 8 -o output.ogv'''
+
[[File:ffmpeg2theora.png]]
 +
 
 +
'''ffmpeg2theora image_%d.bmp -v 8 -o output.ogv'''
  
 
* the source string is formatted similarly to the way [http://www.cplusplus.com/reference/cstdio/printf/ C printf()] function works.
 
* the source string is formatted similarly to the way [http://www.cplusplus.com/reference/cstdio/printf/ C printf()] function works.
 +
 +
=== Known bugs ===
 +
 +
If you're encoding a video from separate images, do not use png files! ffmpeg2theora reads them wrong, I don't know why. We recommend BMP files.
 +
If you use png's, you get something like this:
 +
 +
[[File:ffmpeg2theora_bug.jpg]]

Revision as of 12:59, 27 November 2014

There's not an abundance of tools to encode videos in the Theora format, so here you can read our recommended tools and techniques for encoding videos.

First of all, libtheoraplayer supports multiple codecs, not just Theora, depending on which plugins you use, read more here: Codecs.

ffmpeg2theora

ffmpeg2theora is a command line tool available for all the major OS's and is the recommended way to encode Theora videos. As the name suggests, it uses ffmpeg to read the source files which means it can pretty much read any format. Make sure you encode only from uncompressed sources as described on the Best Practices page. Uncompressed sources are either a series of images or an uncompressed video file (AVI, uncompresed MOV etc).

This tool supports a lot of fancy methods, be sure to read the documentation. The simplest way to encode a video with it is by this command:

ffmpeg2theora uncompressed_source.avi -v 8 -o output.ogv

  • -v 8 indicates the level of quality. values between 6 and 8 are usually the best compromise. For mor control use the -V option to specify bitrate

if you have multiple images, use this:

Ffmpeg2theora.png

ffmpeg2theora image_%d.bmp -v 8 -o output.ogv

  • the source string is formatted similarly to the way C printf() function works.

Known bugs

If you're encoding a video from separate images, do not use png files! ffmpeg2theora reads them wrong, I don't know why. We recommend BMP files. If you use png's, you get something like this:

Ffmpeg2theora bug.jpg