Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Graphics Software Businesses Google Media The Internet

YouTube, HTML5, and Comparing H.264 With Theora 361

David Gerard writes "Google Chrome includes Ogg support for the <video> element. It also includes support for the hideously encumbered H.264 format. Nice as an extra, but ... they're also testing HTML5 YouTube only for H.264 — meaning the largest video provider on the Net will make H.264 the primary codec and relegate the equally good open format Ogg/Theora firmly to the sidelines. Mike Shaver from Mozilla has fairly unambiguously asked Chris DiBona from Google what the heck Google thinks it's doing." DiBona responded with concerns that switching to Theora while maintaining quality would take up an incredible amount of bandwidth for a site like YouTube, though he made clear his support for the continued improvement of the project. Greg Maxwell jumped into the debate by comparing the quality of Ogg/Theora+Vorbis with the current YouTube implementations using H.263+MP3 and H.264+AAC. At the lower bitrate, Theora seems to have the clear edge, while the higher bitrate may slightly favor H.264. He concludes that YouTube's adoption of "an open unencumbered format in addition to or instead of their current offerings would not cause problems on the basis of quality or bitrate."
This discussion has been archived. No new comments can be posted.

YouTube, HTML5, and Comparing H.264 With Theora

Comments Filter:
  • Re:repeat of ogg? (Score:2, Informative)

    by Egdiroh ( 1086111 ) on Sunday June 14, 2009 @04:01PM (#28328649)

    Any chance we can blame Slashdot for VHS too?

    He wasn't blaming slashdot for mp3/aac he was blaming them for the fact he adopted ogg. The analogous quote would be, "Any chance we can blame slashdot for adopting Betamax too?

  • Re:repeat of ogg? (Score:4, Informative)

    by vadim_t ( 324782 ) on Sunday June 14, 2009 @04:06PM (#28328693) Homepage

    Rip to FLAC, then encode that into whatever fits the device best.

    In my experience, finding a player that does .ogg isn't that hard. Look at the players made by Cowon for instance, they're very nice.

  • Re:repeat of ogg? (Score:5, Informative)

    by nxtw ( 866177 ) on Sunday June 14, 2009 @04:07PM (#28328695)

    Ogg Vorbis was better in quality than MP3 - back then (and even today) the most popular compression for music. However, AAC and WMA are also better than MP3 - and people actually sold music in AAC and WMA formats as well as MP3.

    Theroa is not better than h264 (the new popular standard for video on the Internet, many Blu-ray discs, HD satellite, and HD broadcast in some parts of the world), so it's not a repeat of Vorbis at all. Theora just scores higher on a scoring algorithm when compared ot a single h264 encoder, the open-source x264.

  • Re:repeat of ogg? (Score:4, Informative)

    by Bagels ( 676159 ) on Sunday June 14, 2009 @04:15PM (#28328773)
    Not to defend ogg vorbis too much, but it has actually achieved success in a few realms - it's the audio format of choice on Wikipedia, which is one of the web's most popular sites, and it's used in tons of video games (precisely because it doesn't need to be licensed, I think). The things that made it successful in those areas (matching ideology and price/compression performance, respectively) don't really mean much to the average MP3 player user, though.
  • Re:Decoding Chips (Score:3, Informative)

    by faragon ( 789704 ) on Sunday June 14, 2009 @04:21PM (#28328829) Homepage

    The problem is encoding, not decoding, as the decoding is done in third party hardware (final user). Also in the transcoding process, i.e., decode from whatever to h264/Theora, decoding is much faster than encoding (because of pattern matching and movement analysis). Anyway, bandwidth is the main problem, as uploaded video is reencoded *once*, and played *many* times.

  • Re:repeat of ogg? (Score:5, Informative)

    by julian67 ( 1022593 ) on Sunday June 14, 2009 @04:29PM (#28328893)

    There are an awful lot of players which support ogg. Almost anything from Cowon, iRiver or Sansa does. And almost all the Chinese brand/no-name/shop brand players support ogg even though they fail to explicitly state this (preferring to emblazon their players and packaging with mp3 and wma logos). I used to import and sell mp3 and mp4 players and generally it's only the very cheapest mp4 video players which don't support ogg, that's the ones which claim asf container support is something to brag about.....usually these use an old rockchip video processor.

    I have 5 personal players. 2 are old iRivers, H140 and H340, 2 are tiny no name Chinese mp3 players and one is a Chinese mp4 video player. Only the iRivers claim to support ogg audio but the cheap mp3 players handle it fine as well. I lived in SE Asia and every cheap mp3 player I ever checked played ogg audio too. Not a single one made mention of it in the instructions, the specs, on the box or on the player.

  • by Anonymous Coward on Sunday June 14, 2009 @04:43PM (#28329021)

    Every HTML5 feature is OK'd by Mozilla, Opera and Apple. Microsoft has voice there too, but they don't seem to give a damn about it. HTML 5 would have specified Theora as baseline if Apple, Microsoft and Nokia didn't protest. Opera and Mozilla protest H.264 as baseline, thus HTML 5 doesn't specify any codec.

    HTML 5 cares about things like YouTube/GMail, because that's where web users spend a lot of time today, and HTML4 is lacking for these types of applications. Ian Hickson (editor of HTML 5) doesn't want to specify science-fiction, but something that real browsers and real websites use, that's why there's a lot of "working backwards" from actual needs and implementations.

  • by selven ( 1556643 ) on Sunday June 14, 2009 @04:44PM (#28329031)
    Stop misquoting the motto! It's "don't be evil", not "do no evil". Google is just saying that they don't intend to screw over their own customers, not that they intend to become the moral custodian of justice for the entire world.
  • Re:Decoding Chips (Score:4, Informative)

    by benwaggoner ( 513209 ) <ben.waggoner@mic ... t.com minus poet> on Sunday June 14, 2009 @04:50PM (#28329089) Homepage

    No, the problem is decoding too. Software decode is fine on the desktop, but a non-starter for phones. Good phone video requires and uses ASIC or GPU acceleration. Theora, as a much older and simpler codec will probably decode faster in software than a maxed-out H.264 bitstream, but even if it could get to full-screen on a handset, it'd require a lot more bandwidth, and would run the battery down very quickly.

    "Bandwidth is the problem" is also very much Theora's problem. The rather...odd example linked to aside, for any interesting bitrate or quality, Theora will need at least 2x as many bits to hit the same quality level as H.264 High Profile.

    The example page is a little confusing. While they compare Theora to H.264 (and admit it wins), their "money" compare is to H.263, which is a VP3 era codec in its own right. If they compared a good H.264 encode to Theora at the 327 Kbps bitrate, H.264 would turn Theora into a thin red paste.

  • Re:repeat of ogg? (Score:5, Informative)

    by Dutch Gun ( 899105 ) on Sunday June 14, 2009 @04:53PM (#28329119)

    Ogg Vorbis is also used in video games because it has some other advantages: it supports 6-channel audio, and has support for bit-accurate decoding, allowing seamless looping of audio, and it sounds better at lower bitrates. I know MP3s can be kludged to do some of these, but it's easier just to use Vorbis in these cases.

    Our upcoming game will actually be shipping with both MP3 and Ogg Vorbis audio. The MP3 decoder we're using is significantly more efficient than the reference Vorbis libraries, and allows us to play more simultaneously decoded channels. However, if a piece of audio needs to loop, to use multi-channel, or if we're encoding a LOT of it (music, voice-overs, etc), we use Ogg Vorbis.

    Honestly, the cost of the license isn't really an issue at all. It's all about what does the job best for us, and MP3 and Vorbis each have strengths and weaknesses.

  • Spotify. (Score:3, Informative)

    by mjrauhal ( 144713 ) on Sunday June 14, 2009 @04:59PM (#28329181) Homepage

    While not being a fan (or a user) of Spotify for their DRM stuff (I'm sure it's all mandated by the media lobby, but regardless) and the opaque pricing which the boss of a large (by Finnish standards) local media company Poptori suspected doesn't really get distributed all that well to artists.

    However, fact is that it's gotten pretty popular in pretty short time at least in some circles, and guess what: Vorbis. Presumably for royalty and quality per bandwidth reasons (over MP3, in any case).

  • by Wesley Felter ( 138342 ) <wesley@felter.org> on Sunday June 14, 2009 @05:02PM (#28329197) Homepage

    Pirates have the advantage that they don't have to pay for patent licenses, so H.264 and Theora are both "free". But for law-abiding companies like Mozilla and Google, Theora is free and H.264 isn't.

  • Reread Shaver's methadology:

    A keyframe interval of 250 frames was used for the Theora encoding.

    10 seconds is absurdly short for any kind of codec test. That's almost as long as the buffer would be, and current Thusndela builds don't include full buffer management. Plus he picked a pretty low motion section of the clip. He should the full clip. Current Theora builds are plenty fast; it'd be faster than realtime on a laptop.

    In a real codec compare, CBR is often the best way to see differences between codecs and implementations, since that's where rate distortion really shows its stuff. How well a codec can preserve quality with high motion in a fixed buffer is a key differentiatior.

    That said, I believe that the Theora+Vorbis results are substantially better than the YouTube 327kbit/sec. Several other people have expressed the same view to me, and I expect you'll also reach the same conclusion. This is unsurprising since we've been telling people that Theora is better than H.263

    His primary quality comparison is between Theora and H.263, not H.264. H.263 is even older than VP3 which Theora is based on. As to H.264 he says:

    In the case of the 499kbit/sec H.264 I believe that under careful comparison many people would prefer the H.264 video.

    Yep. And it would be a huge differential if he'd picked a more challenging section of the source.

    And while it doesn't have any impact on the comparison, no compressionist would use those frame sizes. We always try to round to the nearest mod16 value, so that we have macroblock alignment.

    Thus 480x272 and 400x224 would be more efficient choices in both cases. 400x226 is particulary egregious, as it means the codec is really encoding at 400x240 internally with 14 lines of padding.

  • Re:repeat of ogg? (Score:5, Informative)

    by iMacGuy ( 199233 ) <astrange@ithinksw. c o m> on Sunday June 14, 2009 @05:30PM (#28329409) Homepage
    > Theora just scores higher on a scoring algorithm when compared ot a single h264 encoder, the open-source x264. It doesn't even do that; it only scored higher when using Xiph's PSNR tool, because it respected a buggy colorspace header written by ffmpeg that didn't match the video. x264 won rather heavily when that was fixed, but /. never retracted the story.
  • by binarylarry ( 1338699 ) on Sunday June 14, 2009 @05:45PM (#28329497)

    I liked this troll better when it talked about tron fanzines and linux web sights.

  • Re:repeat of ogg? (Score:2, Informative)

    by cdonati ( 1381963 ) on Sunday June 14, 2009 @05:58PM (#28329551)
    Even something like an iPod will support ogg files with the right firmware. For example, I put rockbox [rockbox.org] on my iPod and now it can play ogg, FLAC, and whatever other files I've thrown at it. I don't even have to use iTunes to add music to the player; I can just copy the music files to the iPod's hard drive. Rockbox recognizes them and sorts them by their tags. I didn't even have to format the iPod's hard drive. It just installed alongside the original firmware, allowing me to use whichever one I wished. Rockbox also supports a bunch of other players from Archos, Cowon, iriver, Olympus, SanDisk, and Toshiba.
  • But the cost of the H.264 licenses are vanishingly small compared to the extra bandwidth cost of using Theora for a company like Google or Apple.

    Using H.264 is free as long as clips are under 12 minutes. A number which may sound familiar to YouTube users :).

    Here's info on the MPEG-LA licensing terms: http://www.mpegla.com/avc/avc-agreement.cfm [mpegla.com]

  • by Super_Z ( 756391 ) on Sunday June 14, 2009 @06:55PM (#28329913)
    This document [mpegla.com] describes the terms of the H.264 license. The license seems to cover both encoding and decoding.
  • by Ben Hutchings ( 4651 ) on Sunday June 14, 2009 @06:55PM (#28329915) Homepage

    10 seconds is absurdly short for any kind of codec test.

    WTFV. The keyframe interval is 10 seconds but the clip is nearly 5 minutes long.

  • Re:Decoding Chips (Score:4, Informative)

    by benwaggoner ( 513209 ) <ben.waggoner@mic ... t.com minus poet> on Sunday June 14, 2009 @06:58PM (#28329925) Homepage

    Where's your evidence? Why is Greg's example odd? Have you done a comparable experiment with a different video clip to justify your 2x claim, or more importantly, show that at the same bitrate Theora looks much worse on your clip?

    Xiph's own metrics show a 2x advantage on even a very easy short clip:
    http://web.mit.edu/xiphmont/Public/theora/demo7.html [mit.edu]

    And yes, I've done plenty of my own tests as well on Big Buck Bunny and many other clips.

    Why would it, since it didn't at 499Kbps? Or are you claiming that Youtube uses a bad H.264 encoder? Or do you think that example is rigged?

    YouTube doesn't use High Profile (no 8x8 blocks or adaptive quantization matricies) or CABAC entropy coding. So they're going to be at least 20% less efficient than the best encodes could be.

    Also, they trimmed the clip before the really interesting high motion parts. Most of the shots in the section they did use were static camera, and as animation is noise-free. Toss a nice grainy movie trailer in there and Theora shows basis pattern left and right.

    I wish he'd reported the Theora settings used in the encode.

  • Re:Theora FAIL (Score:2, Informative)

    by dirtyhippie ( 259852 ) on Sunday June 14, 2009 @09:06PM (#28330699) Homepage

    Exactly. Google would have to implement hardware decoding of theora, and then roll that out to all of its servers. We're talking about a huge investment there, so, lamentably, that's a non-starter. My guess is google is also using H264 for their highest resolution format, which means transcoding to theora would also introduce significant generation loss [wikipedia.org], whereas downcoding H264 to H264 is doable with far fewer artifacts.

    Saying the issue was bandwidth was bogus, but how often are companies straight with customers about their internal reasons for doing or not doing something?

  • Re:Theora FAIL (Score:3, Informative)

    by Curien ( 267780 ) on Sunday June 14, 2009 @11:59PM (#28331701)

    You obviously didn't bother to look at the spec at all. The DOM for all media elements (which includes video elements) allows you to specify a callback function to execute at certain timestamps.

    (You can also just read the current playback position, eg from a timer callback, but that only provides 1-second precision.)

  • by Daengbo ( 523424 ) <daengbo@gmail. c o m> on Monday June 15, 2009 @02:03AM (#28332273) Homepage Journal

    But the cost of the H.264 licenses are vanishingly small compared to the extra bandwidth cost of using Theora for a company like Google or Apple.

    You should RTFA since it attempts to rebut that exact statement.

  • by TheTurtlesMoves ( 1442727 ) on Monday June 15, 2009 @02:20AM (#28332365)
    Total BS. Hardware decoders will do only a few little things so they can claim to be hardware accelerated. These little things will be the bits that don't have patents.
  • This?

    http://people.xiph.org/~greg/video/ytcompare/comparison.html [xiph.org]

    I read it, and have commented on it at length throughout this thread.

    Basically the article briefly says that YouTube's H.264 is better than Theora, and then goes on at length showin how Theroa is better than H.263.

    Xiph's own data shows H.264 has a big bitrate advantage at the same quality level even in a test that should favor Theora.

    http://web.mit.edu/xiphmont/Public/theora/demo7.html [mit.edu]

    in the Rate-Distorion graph, note they start the plot at 50 Kbps, so look at the actual numbers.

    For example, at 40 dB, x264 needs 70 Kbps and Theora needs 120 Kbps.

    The gap would be bigger with higher motion, more detail, longer content, and particular when there are buffer constraints. Also, x264 is (properly) tuned for perceptual quality more than strict PSNR accuracy.

    Theora suffers from not being a very mature implementation (which Xiph is making great progress on addressing) and being a 90's era codec design (about which Xiph can't do anything without breaking compatibility). And other codecs are getting better as well; if Theroa is refined enough to be reasonably optimal in a year, it'll be competing against the improved H.264 and VC-1 codecs of a year from now, and H.265 not that far away.

    There are all kinds of interesting things about Theora, but competitive low bitrate compression efficiency isn't going to be one of them.

  • by qubezz ( 520511 ) on Monday June 15, 2009 @11:35AM (#28335835)
    Sansa Clip, very good sound quality, ogg and flac support, starting at below $50, sold at every WalMart (although you should buy it ANYWHERE else.)

    http://www.walmart.com/catalog/product.do?product_id=8466133 [walmart.com]
    - $29.88 This might say it's not in stores near you, because the stores have 4GB ones that aren't on the web site..)

    Stop the whiny douchebaggery.

Beware of Programmers who carry screwdrivers. -- Leonard Brandwein

Working...