• Skip to primary navigation
  • Skip to main content
  • Skip to footer
amethyst website design logo

Amethyst Website Design

Affordable WordPress Website Design for Small Business

  • Home
  • About
  • Services
  • Praise
  • Portfolio
  • Blog
  • Contact »

Older

How To Encode Ogg Theora Video

February 18, 2010 Updated on February 18, 2010 Marcy Diaz

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on Email

Ogg-Theora video is the open source codec supported by Firefox, Chrome, and Opera to play HTML5 video. If the world were perfect, and all browsers supported Ogg Theora this would be the HTML code to play this simple HTML5 video demo:

<video src="Videos/cat.ogv" controls></video>

If you use this format instead, you will be ready to add the code to play H.264 and Flash:

<video width="320" height="240" poster="Videos/cat.jpg" controls>
     <source src="Videos/cat.ogv" type"video/ogg">
</video>

where “poster” is the image used while the video is loading, “width” and “height” refer to the video dimensions, and “controls” adds the native video controls. The Dev Opera site has information on other attributes and also how to script your own controls.

You can convert nearly any video codec into Ogg Theora using either Firefogg, an add-on for Firefox or ffmpeg2theora.  These work in all operating systems.

Dive into HTML5 and Theora Cookbook both have detailed explanations of how to encode Ogg video with Firefogg.

Ffmpeg2theora is a command line application, but it is easy to use. If you use Linux it is probably available in your repositories. If you use MacOS X or Windows, you can download and install ffmpeg2theora.

The cat video in the demo was taken with an inexpensive camera; the video from the camera was .mov format. To convert it to Ogg Theora, use the command:

ffmpeg2theora cat.mov -o cat.ogv

where cat.mov is the input file and -o means that you are writing to an output file named cat.ogv.

You can also change the video quality and the view size of the video; both of these affect the size of the output file.  For instance, using the command:

ffmpeg2theora cat.mov -v 5 -a 2 -x 320 -y 240 -o cat.ogv

-v is the video quality; 5 is the default; smaller numbers are lower quality
-a is the audio quality; 2 is the default; again smaller is lower quality
-x is the desired width of the output video
-y is the desired height of the output video

There are other parameters that can be used as well.  Theora Cookbook and It Came from the Internet have more examples.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on Email

You can have a beautiful, hardworking website for your small business.

Tell me about your website project for a personalized solution!

Contact Marcy »

___

Do you need website tips?

Sign up to get easy-to-use WordPress tutorials, Genesis theme customizations, and other helpful tips for your small business website.

Your email address will be used to send you blog posts. Privacy Policy

___

About Marcy

Marcy Diaz

I'm Marcy Díaz, the owner of Amethyst Website Design, a small business located in Phoenix, Arizona (in Ahwatukee Foothills). I help people, like you, grow your business with an affordable WordPress website design. Sign up for my blog and website tips that help you manage your own website.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

 

Footer

Meet Marcy

Marcy Diaz, Amethyst Website DesignAmethyst Website Design is a small business owned by Marcy Díaz. I help people, like you, with your website by creating an affordable WordPress website using Genesis themes to fit your business and budget. I especially love working with new and small business owners, and can help you with the online part of your business.
Read More »

Let’s Connect!

  • Facebook
  • Twitter
  • Pinterest
  • Linked In
  • GitHub

Contact Info

Amethyst Website Design

Email: Contact Marcy
Phone: 602.759.0501

PO Box 94782
Phoenix AZ 85070
Located in Ahwatukee Foothills

member of local first az
  • Sitemap
  • Cookie Policy
  • Terms and Conditions
  • Privacy Policy

© 2021   Amethyst Website Design   ◆   Log in

Using WordPress and the Genesis Framework

This site uses cookies for the best browsing experience. By continuing to use this site, you accept our Cookie Policy »OK, got it!