Forgot your password?

typodupeerror
Graphics Software

Concrete Comparisons of Theora Vs. Mpeg-4 325

Posted by timothy
from the good-use-for-that-beta-you-downloaded dept.
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.)"
This discussion has been archived. No new comments can be posted.

Concrete Comparisons of Theora Vs. Mpeg-4

Comments Filter:
  • by spud603 (832173) on Monday June 22 2009, @02:19PM (#28425901)
    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).
  • by stdarg (456557) on Monday June 22 2009, @02:25PM (#28425987)

    I noticed in the last discussion that Theora does better when you take a single frame and look. It seems to have a lot more details. However, it's apparent in the clips that the detail comes at the expense of smoothness between frames. If you watch the background it's jumping around a lot, making it look fuzzy, presumably as Theora tries to preserve various details.

  • Subjective Measures (Score:4, Informative)

    by Anonymous Coward on Monday June 22 2009, @02:25PM (#28425991)

    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.

  • by hattig (47930) on Monday June 22 2009, @02:27PM (#28426013) Journal

    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?

  • by alexborges (313924) on Monday June 22 2009, @02:28PM (#28426039)

    "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....

  • by Anonymous Coward on Monday June 22 2009, @02:39PM (#28426205)

    gnome-terminal is better than windows command prompt.

  • by Freetardo Jones (1574733) on Monday June 22 2009, @02:40PM (#28426219)

    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.

    But it didn't. In actuality, the license costs for licensing MP3 has actually increased since the time that Vorbis was being initially designed in some cases by almost 25%.

  • License (Score:5, Informative)

    by XanC (644172) on Monday June 22 2009, @02:40PM (#28426221)

    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.

  • by Anonymous Coward on Monday June 22 2009, @02:41PM (#28426255)

    Firefox? Chrome? Blender?

  • by cyber-vandal (148830) on Monday June 22 2009, @02:42PM (#28426257) Homepage

    Apache? An argument can be made for Firefox vs IE too. Yeh open source sucks so much that Apple built OS X from it.

  • by TheRaven64 (641858) on Monday June 22 2009, @02:42PM (#28426265) Journal

    Theora is based on VP3, which is a generation older than MPEG-4. It's been improved a lot, but it's still old technology. Tarkin had a lot more potential, but a few years ago Theora was doing something and Tarkin was still mostly theoretical so the developers focussed on Theora. In hindsight, this may have been a mistake. Theora competes well with MPEG-2, but no one is using MPEG-2 for web distribution.

    Longer term, Dirac looks more promising. It's comparable quality to H.264, is royalty-free, and has two open source implementations. Schroedinger, the newer one, is MIT licensed, and so can be use anywhere. Currently, the CPU load is too high for everyday use, however.

  • by Anonymous Coward on Monday June 22 2009, @02:43PM (#28426289)

    Except for the Apache webserver, I'm stumped.

    Not coincidentally, most IT shops never consider Linux for anything outside of webserving.

  • by Draek (916851) on Monday June 22 2009, @02:49PM (#28426381)

    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.

  • by YA_Python_dev (885173) on Monday June 22 2009, @02:54PM (#28426457) Journal

    There are three things that this test doesn't consider:

    1. for the same bitrate (1000 kbit/s) the Mpeg-4 file is 5.2% bigger than the Ogg one;
    2. nobody uses video alone like in this test, there's always audio and the audio codec associated with Theora (Vorbis) rocks: same quality as MP3 for half the bitrate. Bits saved on the sound can be used to improve the video; and, yes, it is apples-to-apples comparing the overall bitrate of Ogg/Theora+Vorbis against an all-Mpeg-4 solution.
    3. but the most important detail is that they used a constant average bitrate encoding with Theora, which is known to give inferior results for the same bitrate to simply setting the quality to match the desired bitrate.

    For real life examples, that also include sound see "YouTube / Ogg/Theora comparison" [xiph.org] and "Another online-video comparison" [xiph.org].

  • by TheRaven64 (641858) on Monday June 22 2009, @02:54PM (#28426461) Journal

    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.

  • by RiotingPacifist (1228016) on Monday June 22 2009, @02:56PM (#28426499)

    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

  • by diegocgteleline.es (653730) on Monday June 22 2009, @03:13PM (#28426767)

    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.

  • by clone53421 (1310749) on Monday June 22 2009, @03:26PM (#28427003) Journal

    If the codec is included with their browser, that won't be a problem.

  • by mrchaotica (681592) * on Monday June 22 2009, @03:36PM (#28427219)

    When I compile mplayer with H.264 support who is paying the license.

    Nobody.

    Am I in violation of this license?

    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.

  • by Machtyn (759119) on Monday June 22 2009, @03:44PM (#28427395) Homepage Journal
    I believe the issue is that, even though Ogg Theora has a better license, the codec was really bad compared to other, similar codecs. At least, that has been the going concern. Given a choice between a better user experience or a better license *most* users will choose experience.

    The need to prove Ogg Theora is better is to attempt to counter this concern.
  • Re:License (Score:5, Informative)

    by Quantumstate (1295210) on Monday June 22 2009, @03:57PM (#28427669)

    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.

  • by Anonymous Coward on Monday June 22 2009, @03:58PM (#28427693)

    Because in its current incarnation it is more of an archive format than a web video format. E.g. it cares more about quality than bitrate. The amount of CPU power required to view DIRAC is just too high. So it is a great source format but it wouldn't work well for streaming

  • by devinoni (13244) on Monday June 22 2009, @04:37PM (#28428367)

    I had to use the direct links, but noticed that the ogg version was 10% taller but the same contents. A skewing like this could easily explain bad perceived quality, did anybody else notice this or it is just my Firefox 3.5 beta on linux that's messed up?

    10% taller visually? I think that's because that both videos were encoded at 704x576. That gives us an 11:9 aspect ratio for both, however the H.264 version has a 4:3 display aspect ratio set, so that it looks correct. It would be better if they had used square pixels for their raw source, so we don't need to compare anamorphic displaying of the videos as well.

  • by MBGMorden (803437) on Monday June 22 2009, @06:09PM (#28429945)

    Not really. Bitrate is the video data itself, but there will still be overhead associated with the format. So even at the same bitrate if one format has more intrinsic overhead then the file can be larger.

  • Pears and apples (Score:2, Informative)

    by rawler (1005089) <<moc.liamg> <ta> <nossleakim.kirlu>> on Monday June 22 2009, @06:14PM (#28430035)
    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!
  • by Bigjeff5 (1143585) on Monday June 22 2009, @07:35PM (#28431401)

    Yeh open source sucks so much that Apple built OS X from it.

    Unix was proprietary, and built by AT&T. Unix. [wikipedia.org]

    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.

Space is to place as eternity is to time. -- Joseph Joubert

Working...