//
you're reading...
Video

HTML 5 and vorbis

With the advent of HTML 5  and it being adopted by almost all of the famous browsers, there is very good chance that the popular video format of the web over the next few years can move away from the proprietary formats to open vorbis format.

I am once again bewildered by the capabilities that ffmpeg brings to the desk. Almost most of the popular web video formats can be converted to ogg theora / vorbis in a jiffy

ffmpeg -i input.flv -acodec vorbis -ac 2 -vcodec theora -f ogg output.ogv

The above command converts an flv into ogv file using the audio codec vorbis and video codec libtheora.

Very simple isn’t it

Advertisements

Discussion

6 thoughts on “HTML 5 and vorbis

  1. Simple— but bad advice!

    You want -acodec libvorbis and not -acodec vorbis.

    FFmpeg has an internal vorbis encoder which is something of a toy: It produces very poor results. This internal encoder is what you get when you -acodec vorbis.

    The internal encoder has burned a lot of people and as a result has been disabled by default in the current development versions of ffmpeg, but most people are still using versions with it available.

    I strongly recommend ffmpeg2theora instead of ffmpeg. It’s even simpler and will produce better results.

    Posted by Gregory Maxwell | July 25, 2009, 1:24 am
    • Dude, I thank you for bringing this point. I have never try that command I usually use -acodec vorbis instead of the libvorbis.

      I noticed that you advice to use ffmpeg2theora instead of ffmpeg, but I have noticed that ffmpeg is much faster than ffmpeg2theora.

      On another note, I bought a Cowon O2 because it is able to play vorbis/theora and MKV codecs and container. But when I rip the audio from a file into an vorbis using ffmpeg2theora my cowon O2 do not know the format. On the other hand, if I use ffmpeg with the -acodec vorbis cowon can read it and play it back to me. Any ways I will give libtheora flag a try. Thanks.

      Posted by pookito | December 15, 2009, 12:36 am
      • Pookito, the –no-skeleton flag should take care of your O2 compatibility. Skeleton is an additional bit of metadata added to Ogg files with information about the codecs used inside. It is known to confuse some audio only players. ffmpeg2theora defaults to enabling it because ffmpeg2theora is primarily a video encoding tool.

        FFmpeg’s “internal” vorbis encoder is faster because it is a toy encoder. It isn’t doing 90% of the analysis that libvorbis does which is needed for good quality. Thankfully in the time since I posted above the ffmpeg developers have been convinced to disable their built in vorbis decoder by default, so if you install the latest development ffmpeg that trap should no longer be there.

        libtheora flag is not something useful. Unlike vorbis ffmpeg doesn’t have its own internal theora encoder. It always uses libtheora, although it doesn’t yet have full support for all the features of libtheora 1.1.

        Posted by Gregory Maxwell | December 17, 2009, 12:36 pm
      • Gregory:

        Thank you for the reply. I tried it and it work. My CowOn can play OGG format when ripping the audio file and then encoding it in Open format. Thanks for that.

        Now, my question is: why it can not do the same with theora video. When I encode with ffmpeg2theora, my CowOn can not play the video. This is weird for me because as far as I know it is the same codec but my PMP can not play it. 😦

        Posted by pookito | December 17, 2009, 3:32 pm
  2. Thanks for the comment. I haven’t played around much with the ogv conversion in ffmpeg, was just trying to check it out.
    -s

    Posted by sudharshan | July 25, 2009, 2:49 am
  3. I had also tried ffmpeg2theora, its easy to use and fast as well.

    Posted by sudharshan | July 25, 2009, 2:53 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: