Concrete Comparisons of Theora Vs. Mpeg-4
icknay writes "With the upcoming Firefox 3.5 and HTML5 video, there's natural interest in Theora vs. Mpeg-4, but without much evidence either way. Here's clips encoded at various rates to provide concrete comparison between Theora and Mpeg-4. Theora performs decently, but requires more bandwidth than Mpeg-4 (although this is a 1.1alpha release of Theora and Theora has a much better license than Mpeg-4). The quality comparisons are very subjective, but you can try the clips yourself and see how it breaks down. There was an earlier discussion about this, but it lacked much concrete evidence. (Disclosure: it's my page.)"
Both make terrible concrete. I recommend you buy some mix at the hardware store instead.
Disclosure: I'm trying to stress test my server. Please nuke it into the slag of its constituent parts.
Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.
I sort of knew Theora was a bit behind than Mpeg-4, but I didn't realize by how much. The Theora clip that has a 60% higher bitrate than the Mpeg-4 still looks fuzzier to my eyes (especially the moving grass).
Subjective measures are really the best way to evaluate video quality. There are (objective) quantitative measures such as PSNR, but they don't really tell you what the impact of video compression does for the eye. Video quality evaluations mostly involve showing clips (like these) to a large amount of people and asking them which they liked better. There is a lot to consider in terms of how the video responds to packet loss, jitter, etc.
The important line from the article: "Theora uses 1600kbps, or about 60% more bandwidth than Mpeg-4 to reach about the same quality."
Also useful to get some scale: "The uncompressed clip is 349 megabytes, while the 1600kbps Theora clip is 2 megabytes -- Theora may lag Mpeg-4 at this time, but it still yields great compression."
and "Theora is significantly better than Mpeg-2. Mpeg-2 required about 2400 kbps to hit the subjective quality level above, 50% higher than Theora's bandwidth."
Some things I would have liked to have seen: 250kbps, 500kbps, 2mbps, 8mbps videos, with subjective quality difference (rather than same subjective quality at different bitrates). Theora is apparently very good at lower bitrates, and not everybody has an awesome broadband connection, so they may be forced to watch lower-bitrate streams. Does the HTML5 video tag support selecting streams based upon available bandwidth?
dude... get with the program... its all about streaming now... THEY encode, u stream n watch...
The situation seems pretty clear to me.
Theora is just not as good as H.264; you can get better quality with the same bits in H.264, or similar quality in fewer bits.
Theora is, however, good enough for general use for Internet video. It's at least as good as H.263, which actually has been used for years. (Breathless claims that Theora would need twice as many bits as H.264 are just silly.)
Since Theora is free in all ways, browsers can just build it in, and sites like Wikipedia are going to use it. Since H.264 is better, sites with money will pay the H.264 fees to save money on bandwidth. And, if I had a web business, I'd hesitate to paint myself into a corner with H.264; the patent owners have the power to jack up the royalties if they decide to.
In short, both Theora and H.264 will be found on the Internet in the near future. And we can all just get along.
(Now watch Theora fanboys and H.264 fanboys team up to mod this post down through the floor... :-)
P.S. Ogg Vorbis never toppled MP3 from the throne. However, the existence of Vorbis may have exerted some downward pressure on the licensing fees for the paid codecs. In a similar way, the existence of Theora may cause the patent holders for the other video formats to not try to charge quite as much.
steveha
lf(1): it's like ls(1) but sorts filenames by extension, tersely
"but the average computer user isn't going to spend months learning how to use a CLI and then hours compiling packages so that they can encode videos with Theora"
HUH?
There are plenty of visual apps to do this, no need for cli and whatnot....
NO SIG
The license is the single most important thing. It determines whether or not you can use the software at all, or for your specific purpose, whatever that is.
When we're talking about establishing a standard for the Web, which everybody is expected to be a) able and b) allowed to use, there is nothing more important than the license.
The license is the single most important thing. It determines whether or not you can use the software at all, or for your specific purpose, whatever that is.
When we're talking about establishing a standard for the Web, which everybody is expected to be a) able and b) allowed to use, there is nothing more important than the license.
Apache? An argument can be made for Firefox vs IE too. Yeh open source sucks so much that Apple built OS X from it.
60% is bit of a price to pay, however IMHO the point of the video tag is tighter integration with your website than is easily achievable with flash. Hopefully theora will improve and compete with mpeg-4, but there are still many advantages to using it over flash for embedded video (for stand alone pages, it doesn't matter so much as most users have a plugin to handle mpeg-4)
*Interacts with the rest of the page easily (TBF actionscript, et al can achieve this)
*Much lower cpu usage. While flash is particularly bad, theora is particularly good
*Cross architecture. As people browse the web on phones, pdas, etc, this does actually matter
*Much less likely to be exploitable (TBF webhosts don't care, but users should)
*Open standards.
I don't think theora should be seen as simply a tool to replace flash videos but it should be seen as an opportunity to better integrate video into sites and/or make video content available to more people annoy people with video backgrounds
IranAir Flight 655 never forget!
The license is the single most important thing. It determines whether or not you can use the software at all, or for your specific purpose, whatever that is.
Actually the license has really no effect at all for the end user in either of these cases. The only people who are effected by the license are people who are either creating H.264 encoders/decoders or those who are creating and streaming H.264 content. And even the costs of running a website with over 1 million subscribers is only $100,000 a year and if you have that many subscribers and that much traffic $100,000 is nothing to you. And for most small sites (anything with less than 100,000 subscribers) you pay no royalties at all.
Let the porn industry sort it out.
Seeing as they are the only people that actually make real money on the web, we can count on them to pick the most cost effective and highest quality video technology.
When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
Dirac is supposed to be a great opensource, patent-free codec, yet nobody seems to care a lot about it in all those HTML5 video talks....
The reference implementation of Theora, like that of Vorbis is under a BSD-style license to help it gain wider adoption, so your point is valid even for propietary browser makers such as Opera.
No problem is insoluble in all conceivable circumstances.
There are three things that this test doesn't consider:
For real life examples, that also include sound see "YouTube / Ogg/Theora comparison" and "Another online-video comparison".
There's a hidden treasure in Python 3.x: __prepare__()
The license means that every product that includes an encoder or decoder for MPEG-4 (including AVC / H.264) needs to pay the MPEG-LA a small free for every version they sell (or give away). This is incompatible with Free Software. Imagine that FireFox included an MPEG-4 implementation. The Mozilla Corporation makes enough money that they could afford to pay the maximum annual fee for this license, but what happens after you download it? If you give a copy of FireFox to someone else, then you need to pay the license fee (except you can't, because the MPEG-LA doesn't offer licenses except in large quantities). Maybe Moz. Corp. could pay that license too, but what happens in a few years time when they decide to stop? Suddenly, no one can redistribute any copies or derived works of FireFox. The root problem is that it is not possible to get a license for MPEG-4 that permits the kind of arbitrary redistribution that Free Software entails. Although the license fees are capped, they are capped annually, so each year you need to pay again or you no longer have a license to distribute code implementing the patents.
This is why Theora is better as a standard format. Anyone can implement it, at no cost and with no restrictions. H.264 is better quality, and so makes sense as an optional format for HTML 5 to support, but requiring it would mean that it would be impossible for the second-most-popular web browser to be HTML compliant. Of course, in an ideal world, the W3C, Mozilla Corporation, Google, or some other interested party would just buy the H.264 patents outright and let them lapse, but somehow I don't think that's very likely.
I am TheRaven on Soylent News
It's not "a little better", it's:
- available to be implemented by anyone and everyone without paying a cent or even asking for permission, with a BSD implementation available to all for free.
vs
- full of patents held by the big names of the industry, available under per-user licensing fees and any implementation not blessed by them exposes itself and anyone who uses it to big, very costly lawsuits in the US.
And when we're talking about a proposed standard for the entirety of the world wide web, things like that do matter.
No problem is insoluble in all conceivable circumstances.
I hope you realize that Firefox was initiated by Mozilla, or did they finish the full frontal lobotomy after your first post?
Apache, lighthttpd, vsftpd, squid
Linux , bsd, darwin kernels
mythtv
vim/emacs/nano
mysql/PostgreSQL
GCC/llvm
IranAir Flight 655 never forget!
Firefox is a slow, bloated piece of crap that fails in comparison to Chrome or Safari.
Chrome falls into the "proprietary or whatever" category because it's made by Google. Basically, open source projects that weren't initiated by a commercial vendor suck.
Blender is a joke compared to commercial software in that field.
"I've asked this every time this topic comes up. Can anyone name a SINGLE piece of open source software that does anything better than it's closest closed source (or otherwise "proprietary" via patents or whatever) counterpart?"
FF's closest counterpart is clearly IE, considering marketshare, and FF is certainly better than IE. In terms of memory usage, FF beats Chrome and Safari. In terms of page loading times, nothing beats FF + Adblock Plus. You dismissed Chrome, yourself, and the only things Safari does better than FF is 1) display advertisements and 2) run javascript.
"I zero-index my hamsters" - Willtor (147206)
I don't want to disagree with your overall point or start a flame war, but really, putting MySQL up against Oracle/MSSQL?
C'mon.
The license matters a whole lot less than the potential patent encumbrance for the codec.
The developers of Theora state that the codec is not encumbered by patents, but to my knowledge, there's been no legal tests of that and no intensive review of the possible areas of infringement by a patent attorney. That's a serious issue for the uptake of the codec by vendors, since they're potentially on the hook if it later turns out that the codec infringes on people patents and the holders want to be dicks about it.
And it's encumbered in ways that affect how people can use it. For example, LAME (and various other MP3 stuff) isn't included in Debian or Ubuntu; people have to go out of their way and use non-standard, often unsupported repositories.
emerge lame
How did I go out of my way?
Did I break the law?
Chrome falls into the "proprietary or whatever" category because it's made by Google. Basically, open source projects that weren't initiated by a commercial vendor suck.
The rendering engine used by Chrome and Safari (webkit) wasn't made by any company. In fact, its origins are KHTML. the rendering engine used by KDE.
The license is the single most important thing. It determines whether or not you can use the software at all, or for your specific purpose, whatever that is.
Actually the license has really no effect at all for the end user in either of these cases. The only people who are effected by the license are people who are either creating H.264 encoders/decoders or those who are creating and streaming H.264 content.
Which is everyone. The Web isn't just a TV, that's where it's power comes from. And lets not forget mashing, which requires encoders and decoders. If developers have to pay when writing this software, the software gets more expensive and content creation gets stiffled.
Who is this 'Anonymous Cowardon' who keeps posting? Somewhere behind my computer a small pile of spaces seems to have leaked out...
If you copy and paste it into a text editor, you'll discover that there's actually a collision between a space and an anti-space there. (That's sort of like anti-matter, but more digital.)
Nobody.
Yes!
This is why stuff like that gets separated from everything else and marked something like "non-Free" or "non-U.S. users only." Check it, you'll see.
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
Only one point I wanted to mention (since the article and comments have all been--- oddly balanced for Slashdot)
The article points out that current Thusnelda is not as high quality as the best available h264 encoder at high bitrate video and unlimited encoding time. No argument there, it's true. Thusnelda still has a ways to go, despite the distance it's come; the current alpha still has no Adaptive Quant whatsoever, which will go in before final release.
However, the vast majority of users are not using x264. If you look at the h264 YouTube encoder, which has been designed for speed rather than 'work as long as you like to optimize the output', suddenly Theora is exactly on-par. In short--- Theora is every bit as good as the way that the real world is going to end up using h264 for the forseeable future. And the users of that 'inferior' h264 encoder seem pretty happy with it.
Anyway, this isn't disagreeing with anything you've said, it's simply a practical way to look at the difference.
Monty
If you are seriously going to put Java against .NET and MySQL against SQL Server (which is dishonest, because Oracle is the kickass proprietary database at the top of the heap), you have clearly never used either of the latter. Shit, MySQL barely even counts as a database.
If you'd said PostgreSQL you'd have looked a little more credible (because PostgreSQL is actually a very good database!), but I'm going to put my money on "you're a fucking idiot."
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
Could somebody please explain to me why the license matters?
Because $x per copy costs a lot when you're distributing an infinite number of copies, as most Free Software programs are.
People providing decoders have to pay the license fee.
"Royalties to be paid by end product manufacturers for an encoder, a decoder or both (âoeunitâ) begin at US $0.20 per unit after the first 100,000 units each year. There are no royalties on the first 100,000 units each year. Above 5 million units per year, the royalty is US $0.10 per unit."
This causes issues for free software especially with the gpl because there is a clause which says you cannot restrict the distribution of the code but by having to pay a license fee this is a restriction.
Basically, open source projects that weren't initiated by a commercial vendor suck.
Huh? This is an utterly ignorant claim, almost not worth replying to.
But if you look at good open source projects, I doubt you can find even a significant minority (much less majority) that were initiated by a commercial vendor.
Anything from things like Linux to most libraries should in no uncertain terms confirm the idea that no, it's not commercial entities that seed most good open source products or projects. It is useful to also have companies starting OS projects, and sometimes taking ownership. But it's not much of a requirement. Just icing on the cake.
What is much more useful is the opposite: good open source projects resulting in new companies. That is much more common than the reverse.
I like paying taxes. With them I buy civilization -- Oliver Wendell Holmes
You paid H.264 licensing fees when you bought your Mac, AppleTV, and iPhone. you're not seeing them as line items, but you're definitely paying them.
You are probably violating patents by ripping to H.264 with handbrake. Of course if you're in the US you're already violating the DMCA probably by ripping DVDs so what the heck.
Moving forward, large video streaming services will have to start paying significant fees to stream H.264 video.
You may not see the problem in paying for this, but you are definitely paying.
Because it will cost firefox 5 million + to have h.264 included per year....Are you going to foot the bill?
But wait theres more. In order to get a license you need to sign a contract. Now that contract has things like *all* playback implementations *must* support various DRM etc (aka zones). These strings make firefox or another implementation non free, lack freedom and generally incompatible with most GPL type licenses.
Oh and they are going to charge for content soon too.
I find discussion of quality at these bit rates quite funny. I have decided most people must be blind....
The Grey Goo disaster happened 3 billion years ago. This rock is covered in self replicating machines!
Strike two. Popularity != Quality. McDonalds has sold billions of hamburgers, but I don't ever see them on a list of best burgers.
The proof is in the pudding folks, go to any open source developer meeting and most people will be using Macs with OS X, and if they are web developers they will be using Safari, Flash and Mpeg4, not Linux, Theora or any other substandard, second rate "open source" tools or libraries.
You go far to prove your own point there don't you.
Anything can be found funny, from a certain point of view.
Wow, I just had to comment on this. The article itself is of course nice and intriguing (and the video-clip chosen is an excellent clip to give the codec a hard-time. The grass, and medium-mask net in the background, wow.)
The problem with the article is that it really compares pears with apples, and is not too specific about what pears and what apples. The main problem here is that is uses different suites for conversion, in one hand ffmpeg with some probably well-tuned defaults for x264 (-vpre hq), and on the other hand ffmpeg2theora, that may be tuned for different defaults and different coding-settings. Especially, there are two parameters not covered by the article that may have a huge impact. Multipass-encoding, and keyframe-density.
Multipass-encoding is a technique where you let the encoder skim the content several times, gatherings statistics on progressive levels. Multipass encoding has huge benefits, and can sometimes cut the mbit/quality in half, or more.
Keyframes are special frames in the video-stream where the content can be synced. Between those frames only progressive frames happen, so you can't skip to those frames. Keyframes usually take up a lot more space than the frames in between so you want as few as possible of those, but if you make them too few, you will be limiting seeking severly, and for live content, the zap-time will increase.
Then there's the issues of whether different processing filters were used between the sets, and of course exactly WHICH versions of the codecs were used. "June-something" isn't really a good spec.
To make it a bit more equal comparison, and also with known versions, I tried redoing it myself, using a gstreamer-pipeline and the same source-material used in the article. The pipelines used were:
gst-launch-0.10 filesrc location=soccer_4cif.y4m ! decodebin ! x264enc bitrate=1000 ! avimux ! filesink location=soccer_4cif.y4m.avi
gst-launch-0.10 filesrc location=soccer_4cif.y4m ! decodebin ! theoraenc bitrate=1000 ! oggmux ! filesink location=soccer_4cif.y4m.ogv
Unfortunately, I don't have much time, or hosting space to share the encoded results, but trust me, it was NOT in favor of x264 with these settings. On the bright side, you can try it out for yourself, and fiddle with different settings, all versions are directly from updated Ubuntu Jaunty repositories, as of today. Just install gst-tools, and all gst-plugins even from multiverse.
Happy encoding!
Yeh open source sucks so much that Apple built OS X from it.
Unix was proprietary, and built by AT&T. Unix.
Nextstep used parts of FreeBSD and NetBSD, sure, but that was just the cheap path to Unix.
If you accept the GP's premis, his point is still valid.
Nice try though, kthxbye.
Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
Does anyone remember it? The author screwed up and coded parts of it on university time so had to revoke the GPL license since they could not prove which parts were or were not university property.
I spent a month compressing a highly scaled video clip and was able to put about 20 seconds on a floppy. I could compress a complex jpeg with the static compressor into 4 - 20k.
http://www.linuxjournal.com/article/4367
Bandwidth wise it's marvelous, it's the number crunching to compress it that's the killer. I'm not a coder and his paper is marginally comprehensible but there is no way I could recreate the codec.
I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty