Experimental Opera-video build with native Ogg Theora support

Howcome (full name: Håkon Wium Lie) already presented Opera with build in video support (read Haavards post, watch a YouTube-video or the longer video posted by Daniel on Operawatch).

Recently an experimental Opera-video version for Windows with native support for Ogg Theora was made publicly available including some sample Theora video pages (OperaLabs, Howcomes page and Haavards post).

Although I'm not experienced with videos I had to go for this experiment and I think it is quite interesting and maybe it will help us to get rid at least a little bit of this nasty Flash world.

… …

First Review

Let the experiments begin. Download, installation in yet another folder (it's the MSI installer and I was lucky it gave me this choice and not just Repair and Remove), start – no problem and no differences so far.

I went to Howcomes example pages and press play for every single videos – well, what a mess with all the sounds mixing together (my fault), which worked kind of – a little bit slow for some of the videos and some trouble with the opacity example. When I reopened Opera with the pages from last time and when I opened all videos from howcome the sound of the Opacity-Video is heard at once and doesn't even stop if all pages are closed. (one crash during quick and kind of randomly opening the howcome video pages from history – I hate single click Hotlist). The other videos actually played quite nice, also the three on one page at the same time.

Now I started to look how I can make videos by myself to put them on a HTML page (how to see further down) and made further experiences with this build. Big Theora videos caused very high CPU and made even VLC totally stall – VLC instantly stopped to play a video when I pressed play in Opera. I experienced this with a 640x480px, 30fps taken with my Fujifilm F30 and converted with ffmpeg2theora-0.18. While Opera had some frame drops it ate any CPU power it could get while VLC used "only" 60-70% without flaws (at least for the time Opera doesn't play back this videos). With half size videos Opera's performance was much better, although it still used 30-50% (VLC: 20-30%) of my CPU. I think this is nothing to blame Opera for (as it isn't a specialized multimedia app and it is an early still experimental build) but I think this is something which should be improved thinking of the low power target systems (mine is a 1.4GHz Centrino with 512MB RAM running WinXP home SP with a pretty fresh install and all patches applied). The downloaded file has nearly 8 MB instead of 4.7 MB which is the size of the comparable English MSI-Version of Opera 9.2. I think this is not only due to the Theora decoder (which should add 2 MB or less in the end) but it is probably not optimized for the end-user maybe even containing some debugging stuff. Speaking of the files it is quite interesting that it names itself 9.20 Beta, Build 8713 (current 9.20 Windows build is 8771) while the file name tells something about 9.50 (op950_8762_video_repack_with_lgpl_signed.exe) which may indicate that Opera9.2 was formerly treated already as 9.5 or – more probable – it is just because of the release date and as 9.2 is final the next targeted version number is 9.5.

Some more short notes on video playback:
– I could not rename or move the once played ogg-file until I closed Opera
– I had some crashes with my HTML pages after about every second manual reload as long as Opera couldn't find the videos (I moved the files).
– I had more problems with Opera than with VLC with badly encoded Theora videos (especially audio was bad)

My video page

I converted some self made vids of one of my favourite music group Faun into short pieces in Theora Ogg format and made a quick HTML page with a little bit more CSS than Howcomes example pages. I use floating divs which should make the index scale pretty well to different screen-sizes. The single videos are fixed size yet (320x240px) on normal screen layout, with projection (F11) I simply doubled the size (the slide feature does not work properly, it's just for a quick demonstration), with Shift+F11 Opera reduces the size by it's own (because I didn't apply style for media handheld). Additionally you can use the normal page zoom (e.g. "+" and "-")
And here are my videos for Opera:
>>> click the image <<<

How to add videos to a web-page

Although there is only one simple tag for video only HTML is not enough. With

<script type="text/javascript">
function Play(str)
{
var video = document.getElementById(str)
video.play();
}
function Pause(str)
{
var video = document.getElementById(str)
video.pause();
}
function Stop(str)
{
var video = document.getElementById(str)
video.stop();
}
</script>

And for each video you need following controls

<input type="button" onclick="Play('myVideo1')" value="Play" />
<input type="button" onclick="Pause('myVideo1')" value="Pause" />
<input type="button" onclick="Stop('myVideo1')" value="Stop" />

with the according id in the HTML tag

<video src="demo.ogg" id="myVideo1">

Furthermore there is the possibility for a closing video tag (it also worked without) where Howcome put a message for the case the page is displayed in a browswer without Theora support:

<video src ="theora.ogg" id="myVideo1">
<div class=fallback>Ogg Theora player missing</div>
</video>

How to convert videos to Ogg Theora:

For converting my AVI files to OGG I used ffmpeg2theora (current version is 0.18). It is a command line tool revealing it's options with -h at the end (there seems to be no help or further explanations on the webpages). In the end I used a BAT file to trigger ffmpeg2theora by simply dragging the AVI file onto this batch file.
The content I used in the batch file was something like:

X:\absolute-path\ffmpeg2theora-0.18.exe %1 -v 3 -V 1141 --optimize -x 320 -y 240 -S 1 -a 3 -s 172 -e 200 --artist Faun --title König_von_Thule --date 25.02.2007 --location Burg_Steinsberg-Sinsheim -o "%~dpn1.ogg"
pause

  • just copy it into a text editor, edit it according to your needs and save it with an .bat extension
  • 320x240px is the output size
  • -s 172 is the start time in Seconds and -e 200 is the end time (I changed this for every snippet I produced to put it here)
  • the target file will be in the same folder and will have the same name as the source file with the extension changed to .ogg
  • artist, title, date and location seem not to be used yet by any application (well I do not really know)
  • the pause command is useful for the case something didn't work properly – after the conversion you have to press any key to close the DOS box
  • the other options are quality settings – type "ffmpeg2theora-0.18.exe -h" into a DOS box to get the explanations

8 Replies to “Experimental Opera-video build with native Ogg Theora support”

  1. Thanks for the reminder Dan – I was there (and yes I know and like Opera’s IRC, I’m sometimes in #Opera as ReWiz, especially during the night)chatlog with beautified style by Orcinuschatlog with style by mechatlog cleaned up text only by RemcoLanting

  2. Anonymous writes:You should not use both -v and -V options when using ffmpef2theora. They are mutually exclusive:-v uses an engine that give a constant quality on the resulted video, (VBR, Variable Bit Rate);-V uses an engine that give a variable quality but constant bitrate (CBR, Constant Bit Rate) and is especially useful when streaming in slow network.

  3. I don’t know when there will be the next build with support of .ogg theora. It doesn’t look like it will be in the first release of Opera 10 while I think it will be implemented shortly afterwards as Firefox 3.5 already supports it (although it’s not any longer in the official standard draft for HTML5).You can find a much newer build than those mentioned in my original build on http://labs.opera.com/news/2008/11/25/ which is probably the latest public available build.

  4. Anonymous writes:thanks, I searched for Open Video and then was linked here from a webmonkey articlehttp://www.webmonkey.com/blog/How_Firefox_Is_Pushing_Open_Video_Onto_the_Webkeep up the good work Opera guys : )

  5. Holy Anonymous writes:Have you seen the latest xiph-comparisions of the recently released theora encoder?http://people.xiph.org/~greg/video/ytcompare/comparison.html (comuter generated content – vorbis/theora with aac/h264 and mp3/h263)http://people.xiph.org/~maikmerten/youtube/ (talking head – vorbis/theora with aac/h264)theora is a surprisingly good choice. i am impressed that optimizing the encoder could make that difference 😉

Leave a Reply