Home
Monty - Blogging Theora [entries|archive|friends|userinfo]
Monty

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Blogging Theora [Aug. 8th, 2008|01:27 pm]
Previous Entry Add to Memories Tell a Friend Next Entry
[Tags|]

It's time for an update, especially during a period of rapid progress.

Over the past six months, I've been incrementally reorganizing the entire codebase from top to bottom. This in itself didn't really produce direct tangible performance benefits. However, I was finally able to implement the Holy Grail: efficient per-token RD optimization. This was the Big Win that would suddenly allow lots of big and small incremental improvements to pile up together and bring Theora's bitrate efficiency into the modern era.

Below is a short, sweet summary. Each image is a closeup of a frame, the encoded test clip is linked to the image:

Mainline Theora test clip: 580kbps

Current Thusnelda: 580kbps
Encoded with internal qi=50, skip lambda=5, token lambda=16

More details (and demo clips), as usual, on the demo page I prepared to keep Red Hat informed of my progress. The best part of all of this is that per-token opt was just the first big shoe to drop. The code reorg has all the ducks in a row. This should be quite a month for Theora.

The Thusnelda work demonstrates nicely the real liability of old bitrate formats: It's not that it isn't possible to update an old format like VP3 to modern performance, it's just that it takes more coding effort and cleverness to work within the structure of the old format than to cut your losses, break compatability and do it the newer easier faster way. Which is not to say I'm not looking forward to the day when we can finally extend Theora past the current spec again...

LinkReply

Comments:
[User Picture]From: [info]mighmos
2008-08-08 09:14 pm (UTC)

Looking good!

(Link)

That looks pretty good. I used to use Theora, but stopped because it just didn't look nearly as good as Xvid. If this works keeps up, I might have a new default file format again. I'm curious, what's the difference in file size between the two versions?
From: (Anonymous)
2008-08-08 11:19 pm (UTC)

Re: Looking good!

(Link)

The better looking one (above) is even 0.3 MB smaller in size.
From: (Anonymous)
2008-08-09 03:19 pm (UTC)

Re: Looking good!

(Link)

The post indicates the bitrate is the same (which it would have to be, otherwise the comparison is invalid).
From: [info]vorbote.myopenid.com
2008-08-08 11:37 pm (UTC)

Inshalllah!

(Link)

Do you remember Wayne and Garth genuflecting to Alice Cooper? If not, time to go renting Wayne's world... :-)
From: [info]https://login.launchpad.net/+id/3cX8ysT
2008-08-09 10:59 am (UTC)

(Link)

This is really impressive. I hope gstreamer devs start utilizing this new encoder soon and we can see as good looking videos, if not better than, in theora as the ones in xvid os h264.

Thanks for all your great work.
[User Picture]From: [info]xiphmont
2008-08-09 04:59 pm (UTC)

(Link)

It's not quite ready for deployment yet. For one thing, the RD lambdas are being set by hand right now because (surprise, surprise) the normal rho domain analysis assumptions don't hold after performing skip and token optimization. I believe xvid faced the same challenges when they implemented rho-domain, and eventually found a mapping that worked. That same work is still ahead for Thusnelda.

From: (Anonymous)
2008-08-09 04:56 pm (UTC)

Impressive

(Link)

It seems a little below xvid in terms of details, but smoother (although probably xvid improved from the doom9 tests I'm comparing with). Quite good overall, so given that theora is a free codec, it becomes extremely competitive.
[User Picture]From: [info]xiphmont
2008-08-09 05:01 pm (UTC)

Re: Impressive

(Link)

It is. It's still using the insanely bottom-heavy quantization matricies from VP3.2. The decoder can already handle the full Theora spec quantization extensions, it remains to implement any use of those extensions in the encoder.
From: [info]brunomiguel.myopenid.com
2008-08-09 10:38 pm (UTC)

(Link)

That's quite an improvement. Congratulations!
[User Picture]From: [info]Iain Cheyne [cheyne.net]
2008-08-10 08:53 pm (UTC)

Good work

(Link)

Please keep it up.
From: [info]yusufg
2008-08-11 12:35 am (UTC)

Current Thusnelda encoding doesn't playback well with VLC 0.8.6i on MacOSX 10.5.4

(Link)

Monty, Not sure what decoder is in VLC 0.8.6i on MacOSX 10.5.4, but when I try to playback the current Thusnelda encoding it renders all pixellated.
The Mainline Theora clip plays back fine.

[User Picture]From: [info]maikmerten
2008-08-11 08:55 pm (UTC)

Re: Current Thusnelda encoding doesn't playback well with VLC 0.8.6i on MacOSX 10.5.4

(Link)

There's a good chance that VLC is using the ffmpeg Theora decoder, which used to not implement all aspects of the Theora specification correctly. I can confirm that ffmpeg cannot correctly decode the test files provided here.
From: [info]https://login.launchpad.net/+id/tbzQdGG
2008-08-19 05:41 pm (UTC)

You're quite right.

(Link)

Good catch. While vlc appears to work properly on Ubuntu (maybe it uses a different backend?), ffmpeg decodes the Thusnelda streams as brightly-colored flashing blocks. I filed a bug at Launchpad (https://bugs.launchpad.net/ubuntu/+source/ffmpeg/+bug/259087), the Ubuntu bug tracker, on that. It's also been (a few days ago) filed at the ffmpeg tracker (http://roundup.mplayerhq.hu/roundup/ffmpeg/issue579), which is linked from Launchpad.
From: [info]https://login.launchpad.net/+id/tbzQdGG
2008-09-03 05:32 pm (UTC)

And it's fixed.

(Link)

The problem--which turned out to require a really minor change--is fixed in FFmpeg r15166 (http://roundup.mplayerhq.hu/roundup/ffmpeg/issue579). Now that's service!
From: (Anonymous)
2008-08-12 04:12 pm (UTC)

Using HTML5 Video tags would be nice

(Link)

It would be good if folks using the Opera labs release or Firefox nightlies could get an early taste of the HTML5 video experience in your page with the demos.
From: (Anonymous)
2008-08-12 04:24 pm (UTC)

Re: Using HTML5 Video tags would be nice

(Link)

Also, shouldn't those be .ogv files.
[User Picture]From: [info]xiphmont
2008-08-19 10:57 pm (UTC)

Re: Using HTML5 Video tags would be nice

(Link)

I thought of that, but when I went to grab a nightly to try out, files without audio played back with no attention to timing, playback only worked first time through, and the controls were all shifted out of the frame. In short, using the video tags is high on my list-- but not before they actually work right :-)

As for the .ogv comment, yes you're right of course. Old habits.

Monty
From: (Anonymous)
2008-08-18 01:59 pm (UTC)

(Link)

That improvement is very very noticeable... Great work!
From: (Anonymous)
2008-08-18 07:20 pm (UTC)

(Link)

Hello Monty

I've read about the Thusnelda project 3 months ago and i'm very enthousiast about it :)
My question is: is it possible to correctly decode a video stream encoded with Thusnelda,using entirely the current Theora specification?If not,which modifications are needed on the decoder side?
I'm sorry for my bad english

Kind regards
Alberto
[User Picture]From: [info]maikmerten
2008-08-19 10:01 am (UTC)

(Link)

Thusnelda stays 100% within the Theora 1.0 spec. Spec-compliant decoders are able to decode Thusnelda streams without any change.
From: (Anonymous)
2008-08-19 02:18 pm (UTC)

(Link)

Many thanks for this information,maikmerten :)
Cheers

Alberto
[User Picture]From: [info]gr1b0k
2008-08-25 03:10 pm (UTC)

(Link)

i interested in ogg and i write about it in russian(also about svg), were i can read more developers news about ogg?
From: (Anonymous)
2008-09-20 08:08 pm (UTC)

Sweet!

(Link)

This is actually an exciting improvement! I've been looking forward to being able to use an unencumbered video format that didn't suck, so this is encouraging.
From: (Anonymous)
2008-09-28 12:51 am (UTC)

Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

I see a lot of improvements in these clips.

Is there any version of ffmpeg2theora that uses Thusnelda to do some tests?
[User Picture]From: [info]xiphmont
2008-09-30 07:14 am (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

Not yet. Thusnelda is unfinished (and waiting for me to get back to it as I push out overdue releases of other software. Hopefully I've just finished that tonight! Theora 1.0 being the most overdue of the releases :-)

What's unfinished about Thusnelda is the auto-setup code. Right now it has to have about ten different dials hand set for a given encoding mode. I'm hoping it's about a month from alpha.
From: (Anonymous)
2008-09-30 08:03 am (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

How far is Theora 1.0 release?
[User Picture]From: [info]xiphmont
2008-09-30 08:34 am (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

I signed off on 1.0b4/RC tonight and handed it off to get binaries built and tarballs rolled. That becomes 1.0 about a week later if no new blockers come up.

I'm officially back on Thusnelds.
From: (Anonymous)
2008-10-11 04:27 pm (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

New release of ffmpeg2theora has a version with Thusnelda.
From: (Anonymous)
2008-10-31 05:40 pm (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

Is there a standard command-line test to see if a video was encoded with Thusnelda (e.g., ogginfo or oggzinfo output)? -G. Chriss
[User Picture]From: [info]xiphmont
2008-11-01 03:56 pm (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

The Thusnelda encoder sets the vendor string in the comment tags to "Xiph.Org libThusnelda I XXXXXXXXX" where the Xs are a date string.
[User Picture]From: [info]xiphmont
2008-11-01 03:57 pm (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

Hm, I wonder how it's doing that given the number of Thusnelda setup values that need to be set entirely by hand right now....
From: (Anonymous)
2008-11-01 04:37 pm (UTC)

Re: Is there any version of ffmpeg2theora that uses Thusnelda?

(Link)

"New release of ffmpeg2theora has a version with Thusnelda."
I don't think this is correct; the reason I asked about the version string is that I got Theora ~1.0 video after compiling both theora-thusnelda and ffmpeg2theora from SVN. -G. Chriss
From: (Anonymous)
2008-10-08 11:05 am (UTC)

Another update?

(Link)

Can we please get another update about the Thusnelda stuff?
From: (Anonymous)
2009-03-06 03:36 pm (UTC)

Re: Another update?

(Link)

Hello,

i would be as well interested in the recent development of Thusnelda and Ogg Theora. We use it as video solution for the online archive of the Slovak Philharmonic Orchestra: http://stream.filharmonia.sk ..