Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 62

Thread: h264 (x264) vs Theora

  1. #11
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: h264 (x264) vs Theora

    Quote Originally Posted by patrickaupperle View Post
    True, we do not know, I did not suggest otherwise. I simply am guessing (something we can always do, regardless of situation), without any backing nor a great understanding of the situation, that Theora is safe.
    Yes, and I said the only reason why people use Theora is because they believe it's safe.

    Back to the original questions, though. Is h264 really far superior?
    Yes. Theora is somewhere on the level of Xvid, a MPEG-4 ASP codec.

    I do not notice a difference between those two files.
    Upload the files, then I'll point out the differences for you. I've encoded a lot of video, and I ran lots of tests with Theora too.

    One, the h264, is 4/5 the size, but does that make a huge difference?
    Yes, 20% reduction is a huge difference, especially when you are trying to put a feature film on a single CD. With x264 you can do that in DVD resolution (704x480).

    Is the comparison fair? Do results on a single file matter at all?
    You'll get similar results with any other file as well.

  2. #12
    Join Date
    Apr 2007
    Beans
    513

    Re: h264 (x264) vs Theora

    Quote Originally Posted by VertexPusher View Post
    Yes, and I said the only reason why people use Theora is because they believe it's safe.


    Yes. Theora is somewhere on the level of Xvid, a MPEG-4 ASP codec.


    Upload the files, then I'll point out the differences for you. I've encoded a lot of video, and I ran lots of tests with Theora too.


    Yes, 20% reduction is a huge difference, especially when you are trying to put a feature film on a single CD. With x264 you can do that in DVD resolution (704x480).


    You'll get similar results with any other file as well.
    I posted the links earlier (from my server). I am uploading to megaupload, now. Will post links asap.
    Here is the source: http://www.megaupload.com/?d=4XKELM5W
    Here is the ogg: http://www.megaupload.com/?d=DFE677YY
    Here is the h264: http://www.megaupload.com/?d=F9FN8UH8
    Last edited by patrickaupperle; January 22nd, 2010 at 12:23 AM.

  3. #13
    Join Date
    Nov 2008
    Location
    London, UK
    Beans
    202
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Re: h264 (x264) vs Theora

    Hi,

    I'm sorry I can't post the results, as seen as I've used as source my own BD of BBC's Life (source is 1080i, avg 36 mbps, so could be like avg 18mps 1080p) to do this test.
    Imho nature sequences provide the best benchmark because are:
    • Full of details
    • Many different bright colors (most of all coral reef scenes)
    • Lot of motion
    • Lot of gradients as well

    Basically all things that human eye reacts and are hard to compress.
    Now, you can find some free 1080p video on Apple's HD website. They have the Shark video, underwater scene that should be good as well.
    Probably we could consider those videos reference.

    What I did was to test them in 720p, 1080p 2 passes with Handbrake 0.9.4 (uses libtheora 1.1) with same bitrate, using default settings but changing only the bitrate.
    Again, the results were appalling.
    With 2 mbps theora was really bad; with 4 mbps theora was ok, but for the same bitare x264 was able to preserve a lot of details. Small details that I wasn't able to see (they were blurred with libtheora) on my 19 inch display, let alone if I tried to see it on my 40 inch LED display...
    Now, I think if these (theora) guys want to improve their codec they simply have to start developing against 720p/1080p content. Here x264 shines a lot more; and I'm sorry because I would like to see theora succeed as well.
    I don't know if the PSNR ( http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio ) is similar, I doubt, but in case it is, theora is saving 'useless' information.

    Plus, let me add, x264 is multithread by defualt, libtheora is monothread. Is there a way to run theora multithread? Is it a Handbrake issue?

    Anyway, the best would be to produce maybe a 2mbps and 4mbps x264/libtheora of the Shark - Apple video, and produce PSNR as well, so we could agree more. Too bad I've used BBC's Life BDs.

    Let me know,
    Last edited by Emanuele_Z; January 21st, 2010 at 06:34 PM. Reason: typo

  4. #14
    Join Date
    Sep 2008
    Beans
    200

    Re: h264 (x264) vs Theora

    libtheora is monothread. Is there a way to run theora multithread? Is it a Handbrake issue?
    As you stated, libtheora is single threaded. Only the theora developers can fix this.

  5. #15
    Join Date
    Nov 2008
    Location
    London, UK
    Beans
    202
    Distro
    Ubuntu 12.04 Precise Pangolin

    Lightbulb Re: h264 (x264) vs Theora

    Hi,

    I've re-run some compression against an aquarium 1080p high bitrate source.
    As before I've converted to 720p and used a double pass.
    Target bitrate 3000 kbps. No audio. 15 FPS (so you know that video will be not smooth).
    Here is the link to x264:
    http://rapidshare.com/files/33895304...arium.m4v.html
    Here is the link to libtheora:
    http://rapidshare.com/files/33895990...arium.ogg.html
    And here the original:
    http://www.demo-world.eu/trailers/re...rium.part1.rar
    http://www.demo-world.eu/trailers/re...rium.part2.rar

    I can see some lost details in ogg video, but is not that bad at 3000 kbps. I guess at a lower bitrate we can start see more artifacts.
    Let me know what you think.

    Btw handbrake used 2 cores to convert the theora one, so maybe they've fixed it.

    Cheers,

    Ps. This site is cool for 1080p videos: http://www.demo-world.eu/trailers/hi...n-trailers.php
    Last edited by Emanuele_Z; January 21st, 2010 at 11:59 PM. Reason: add info

  6. #16
    Join Date
    Apr 2007
    Beans
    513

    Re: h264 (x264) vs Theora

    Quote Originally Posted by Emanuele_Z View Post
    Hi,

    I've re-run some compression against an aquarium 1080p high bitrate source.
    As before I've converted to 720p and used a double pass.
    Target bitrate 3000 kbps. No audio.
    Here is the link to x264:
    http://rapidshare.com/files/33895304...arium.m4v.html
    Here is the link to libtheora:
    http://rapidshare.com/files/33895990...arium.ogg.html
    And here the original:
    http://www.demo-world.eu/trailers/re...rium.part1.rar
    http://www.demo-world.eu/trailers/re...rium.part2.rar

    I can see some lost details in ogg video, but is not that bad at 3000 kbps. I guess at a lower bitrate we can start see more artifacts.
    Let me know what you think.

    Btw handbrake used 2 cores to convert the theora one, so maybe they've fixed it.

    Cheers,

    Ps. This site is cool for 1080p videos: http://www.demo-world.eu/trailers/hi...n-trailers.php
    I really want to look at those files to see if I can see the differences, but it looks like rapidshare is overloaded right now. Wow, rapidshare seems to be doing this a lot lately.

    Edit: I finally got those files. I actually see absolutely no difference between them. Of course, my eyes are not trained to such things. Also, I did not run them side by side (my computer already didn't like the m4v). This is promising, maybe theora 1.2, whenever it comes out, will put theora on level with h264.
    Last edited by patrickaupperle; January 22nd, 2010 at 04:59 AM.

  7. #17
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: h264 (x264) vs Theora

    I'll look at the files when I get home. Thanks for uploading the source as well. This way I can run an encode myself and upload it for you to compare. x264 has lots of encoding options, and the defaults in applications such as Avidemux are not always the best.

    There is one rule that applies to video encoding in general: Any encoder can produce transparent results (i.e. indistinguishable from the source) if there's no cap on the bitrate.

    So the question is: How much can you reduce the bitrate until artifacts become visible? This is what separates good codecs from less good ones.

    There are several reasons why Theora cannot be as efficient as H.264, even in future versions. The most obvious one is the number of reference frames. Theora supports two frame types: I-frames and P-frames. An I-frame is a frame that is fully encoded by itself, like a JPEG image. A P-frame is a frame that only contains changes since the previous I- or P-frame. This means that a P-frame has 1 reference frame: the frame that preceeds it. The ability to refer to a preceeding frame reduces the size of P-frames considerably, because only the things that have changed need to be encoded.

    In H.264, you can have up to 16 (!) reference frames, depending on the profile. And you can have B-frames, i.e. frames that refer not only backward but forward as well. H.264 even supports mixed references, i.e. reference frames can be chosen per macroblock. This makes H.264 extremely efficient when objects move in front of a static background or when objects appear and then disappear again. More reference frames means that less has to be encoded from scratch.

    Theora cannot add any of these features without
    • breaking compatibility and
    • violating MPEG patents.

    That's why H.264 will remain superior, at least until the patents expire.

    Go to http://www.apple.com/trailers/, download a movie trailer and encode it to Theora. I bet I can encode a H.264 file that is significantly smaller and looks at least as good, if not better. Apple's own H.264 encoder is not particularly good, but x264 is ahead of pretty much everything else.

  8. #18
    Join Date
    Nov 2008
    Location
    London, UK
    Beans
    202
    Distro
    Ubuntu 12.04 Precise Pangolin

    Red face Re: h264 (x264) vs Theora

    Indeed, the points are other.
    Basically h.264 and Theora (VP3) are part of the same (DCT/iDCT) family.
    If we can say that MPEG-1 is like a chimp, XviD can be seen as primitive man, Theora as barbarians (200 a.d.) and H.264 as 20th century man.
    They're all from the same species (the lossy compression technique is DCT/iDCT) but they are different, and difference is really noticeable.
    H.264 is more evoluted than Theora because, apart before examples, it can apply the DCT/iDCT technique not only on 8x8 blocks but on 4x4. It does implement arithmetic compression (in two different ways) that is able to save up 15% of size. It does implement many other features.
    We know for sure that a large part of these nifty features are patent protected (in US only, in the rest of world those are not, because software can't be patented)
    The questions (for Theora devs/creator) are:
    • With current Theora (VP3) format, is there a way to achieve better encoding without having to extend the format itself?
    • Can Theora (VP3) format be extended to include new algorithms to achieve better encoding (but this could be not backwards compatible)?


    I've re-ecoded the same short clip to 1500 kbps (this time preserving the original frame rate). Now the artifacts appear more noticeable and frankly if H.264 is acceptable, Theora becomes appalling.
    I'll post the links later.

    On a side note, is there some script/utility to perform proper PSNR on the fly? Because probably this is the only way we have to base conclusions on objective results.
    For sure subjective results are improtant as well, but PSNR could be a good starting point.
    Again, I think, as a community, we should start focusing on 1080p/720p video compression; this is the future.

    Cheers,

  9. #19
    Join Date
    Apr 2007
    Beans
    513

    Re: h264 (x264) vs Theora

    Well, I think this has already shown that h264 is better than theora. In every case h264 did as well or better. In some cases, the difference was significant. Also, due to the whole b-frames thing, these results make perfect sense. I do agree that it would be nice to get that PSNR, though.
    Last edited by patrickaupperle; January 22nd, 2010 at 01:14 PM. Reason: Fixed some wording

  10. #20
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: h264 (x264) vs Theora

    PSNR results have to be taken with a grain of salt. x264 can perform some psychovisual tricks to preserve film grain and dithering noise. The results will look subjectively closer to the original, but the PSNR will be worse. For PSNR comparisons this feature should be turned off.

Page 2 of 7 FirstFirst 1234 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •