Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Google Graphics Software

FFmpeg's VP9 Decoder Faster Than Google's 101

An anonymous reader writes "A VP9 video decoder written for FFmpeg, FFvp9, now holds the title of being the world's fastest VP9 video decoder. FFvp9 is faster than Google's de facto VP9 decoder found in libvpx, but this doesn't come as too much of a surprise given that FFmpeg also produced a faster VP8 video decoder than Google a few years back with both single and multi-threaded performance."
This discussion has been archived. No new comments can be posted.

FFmpeg's VP9 Decoder Faster Than Google's

Comments Filter:
  • by MROD ( 101561 ) on Sunday February 23, 2014 @07:01AM (#46315273) Homepage
    So, is the quality of the output equivalent or has it suffered due to compromises due to the speed increase?
    • by K. S. Kyosuke ( 729550 ) on Sunday February 23, 2014 @07:07AM (#46315299)
      I'm not an expert, but I'd say that when decoding video, frame drops caused by CPU overload sort of tend to be more noticable than a few decoding artifacts. At least that's how I always perceived it.
      • I haven't looked at vp9, but I haven't known dropped frames due to a slow CPU to be a problem for at least 5 year, if not a decade. Perhaps on mobile devices, but we should be using hardware decoders in that use case. I'm not sure why more desktops and notebooks don't have hardware decoders for most of the popular formats.
        • Well, if you have CPU cycles to waste, just use the Google implementation, then! Not everyone is so fortunate in this imperfect world of ours.
          • Exactly. Having luxurious amounts of CPU power is not an excuse to do things badly anyway. Besides, you will save more battery on a laptop the less the CPU is being tasked.
        • by Anonymous Coward
          Nothing supports VP9 decoding in hardware. That's why it's already a massive fail.
          • by Bengie ( 1121981 ) on Sunday February 23, 2014 @08:21AM (#46315485)
            100 years ago, nothing supports H.264 in hardware either, yet here it is. I know, lets waste money making hardware for codecs that are not standards yet!
            • by Kjella ( 173770 )

              100 years ago, nothing supports H.264 in hardware either, yet here it is. I know, lets waste money making hardware for codecs that are not standards yet!

              Well HEVC decoding does have hardware support and is rolling out to consumer devices right [androidos.in] now [hdtvtest.co.uk]. The shift to 4K which requires new hardware for everybody is probably the only chance at making a new standard, otherwise you'll have a non-trivial number of consumers with non-VP9 devices which means HEVC will be the de facto standard. Google has made a lot of bluster about their codec before, but YouTube still serves up video in H264. Unless they get really serious about pushing VP9 in hardware and very soon, h

              • Unless they get really serious about pushing VP9 in hardware and very soon, history will repeat itself with HEVC/VP9.

                VP8 didn't have a chance, because H.264 was long established and popular YEARS before VP8/WebM was even released. H.264 had 7 years of no competition, so yeah, it caught on, and VP8 didn't.

                This time, though, VP9 was released head-to-head with H.265. Things could be very different. While companies start coming up with H.265 decoders, VP9 will be right there next to it, completely free to im

                • by Luckyo ( 1726890 )

                  Because developing software for it, as well as possibly dedicated silicon (if you're not talking about GPU decoding but actual dedicated hardware as is done in mobile in many cases today) is far from free.

                  • The software will be there. Google already requires Android devices be able to decode WebM, and I would expect them to update that to include VP9/Opus sometime in the future. Not to mention they provide a built-in media player to handle the formats.

                    • by Luckyo ( 1726890 )

                      I don't think you quite understand the complexity of the task at hand. Just because a huge company supports it doesn't mean that it will be there. Google itself is not exactly awesome with video players today (one of the big reasons to buy samsung for example is their vastly superior media player to that of google's own which lacks support for a lot of formats).

                      Specialists who actually can do necessary software design and programming in the field are rare, and most of them are already employed under very go

                    • Specialists who actually can do necessary software design and programming in the field are rare, and most of them are already employed under very good terms, or exceptionally idealistic and do not want to help the large megacorp known as google become even bigger and more powerful (ffmpeg crowd). This is not a problem you can throw money at and expect it to be solved.

                      As one of those specialists, and part of the ffmpeg crowd, I can safely say you're utterly wrong on just about every count.

                    • by Luckyo ( 1726890 )

                      Okay.

                      I guess then we'll be seeing tens and hundreds of ffmpeg-like encoders available for both free (as in beer), free (of bugs), and actually functional and with functional GUI front ends.

                      Makes me wonder why we haven't seen that back in divx days or h.264 days going right now if you are indeed correct and I'm wrong. What's holding all these people back?

            • by tepples ( 727027 )

              100 years ago, nothing supports H.264 in hardware either, yet here it is.

              100 years ago, there were no 3G phones. H.264 has been in hardware since the first 3G phones came out. To overcome this installed base, a streaming service that relies on VP9 would have to ship all-new phones to subscribers who happen to have purchased a phone before VP9 hardware support became common. How would it make a profit?

              • by Luckyo ( 1726890 )

                That's only partially true. Some parts of h.264 decoding were indeed in the phones, but early ones were cripplingly limited. I have an older 3G phone that can only decode h.264 MP at 180p. Anything more than that and it will not decode. Installing a player with software decoder will enable ability to decode more, but at hilarious speeds of fractions of a frame per second.

        • by Zuriel ( 1760072 ) on Sunday February 23, 2014 @09:03AM (#46315627)

          I haven't seen dropped frames in video in longer than that... on my desktop. My AMD E-350 based netbook, on the other hand... when it runs into something incompatible and can't do hardware decoding, it gets bad.

          Besides, even if you have a decently powerful laptop, each second your CPU spends in higher performance states costs you battery runtime. Faster code gives you less heat and longer battery life for free.

          • even if you have a decently powerful laptop, each second your CPU spends in higher performance states costs you battery runtime.

            Yes, but is it significant? I thought the screen was the limiting factor, and the help file for that just says "reduce the backlight brightness".

            • Yes, but is it significant? I thought the screen was the limiting factor, and the help file for that just says "reduce the backlight brightness".

              Yes it is, if you were paying attention Intel's Haswell managed to increase "light use" battery life (spends most of the time idle) by 50% just by reducing the idle power drawn by the processor and platform.

              If the processor had that much battery life impact when doing NOTHING, you can imagine it's of major importance to keep it idle as much as humanly possible.

        • Congrats on being rich. My desktop (purchased in late 2012) is incapable of playing 480p video without dropping frames.
        • I'm not sure why more desktops and notebooks don't have hardware decoders for most of the popular formats.

          They do. Most desktops, notebook, and smartphones have hardware decoders for the most popular format. VP8/9 isn't it.

        • by Luckyo ( 1726890 )

          Not entirely sure what CPUs you were using this decade, but unless you have always been on a very powerful server/gaming grade machine, or only decoded stuff that is packed with older codecs, you are presenting an impossible scenario.

          CPU power is very much behind the curve even today and has been so for last two decades at the very least when it comes to real time decoding of cutting edge video compression technology. It remains one of the barriers preventing widespread adoption of h.265 - in fact much of t

      • by gl4ss ( 559668 )

        ...yeah but when did you run out of cpu when decoding stuff last time? (counting on that you didn't do it on a raspberry..)

        however, since this is sw we're talking about it's entirely plausable that googles version looks crappier too....

      • by Anonymous Coward

        Agreed. And am I the only person in the world who still laments the transition to digital broadcast TV because analogue degraded far more gracefully? It was always worse picture rather than jerky/stalled picture, and worse sound rather than broken up sound.

        And, no, watching TV over the Internet is not better at all: it's an utterly inefficient waste of bandwidth, and not subject to the lack-of-decent-QoS of the Internet: e-m waves OTA don't suffer congestion!

        All that before the problem of having 400 crap ch

        • by tepples ( 727027 )

          e-m waves OTA don't suffer congestion!

          That's because the FCC or foreign counterpart has limited the selection of available programs to ease congestion.

          All that before the problem of having 400 crap channels rather than 4 good ones.

          What you define as a crap channel doesn't necessarily match what someone else defines as a crap channel.

        • I have given up on TV when analog OTA was switched off (in the country that used SECAM). Switching to digital should have made great sense because of the spectrum savings, but the 10 or 15 or so new channels are mostly garbage, the equivalent of shovelware. So the spectrum was polluted back anyway.
          You have to buy a flimsy digital tuner piece of shit to get TV on an old TV instead of using nothing, and live with two remotes instead of one (and taking up a scarce SCART input). The quality went down, because y

    • Re: (Score:2, Funny)

      by Hognoxious ( 631665 )

      The difference is because it doesn't send every twentieth frame to the mothership so they can target you with ads for buttplugs.

      Or whatever else prominently features in the movie you're watching. Obviously. Just an example.

    • Re: (Score:2, Informative)

      by Anonymous Coward

      They're talking about decoding, where the output is either correct or it's not. Unlike encoding, where you can trade speed for quality and where a bad implementation can achieve little of either and still be 'correct'.

      • That's only true when you have a constant bitstream.
        Recovering from dropped or badly ordered packets is usually different between decoders.

    • by rbultje ( 3548279 ) on Sunday February 23, 2014 @08:07AM (#46315463)
      The output is equivalent to what libvpx produces (as measured by MD5 on each output frame) on all files in the VP9 conformance suite.
    • So, is the quality of the output equivalent or has it suffered due to compromises due to the speed increase?

      It probably just means the reference implementation wasn't optimized very much.

    • Re: (Score:2, Informative)

      by Anonymous Coward

      Todays formats are different from the MPEG2 and DivX ;-) of yore and generally require decoding to be a bit-exact process. There is only one correct way to decode a frame. If a decoder gives a different result, it doesn't just have "bad quality", it's wrong. This has obvious benefits, when compared to the days where you had to be lucky and hope that your decoder uses the same way to implement a DCT as the encoder that was used, or suffer suboptimal results. However, since this fact isn't very well known yet

    • Also, how often does it crash?
      The winner of the current crash-record on my computer is ffmpeg.

    • by steveha ( 103154 )

      I'm not a video expert, but I did write an H.261 codec once.

      I don't think it's practical in a VP9 decoder to save time by cutting quality. The Huffman decoding stuff all needs to be bit-exact. The DCT is pretty standard; you would just get a fast implementation of DCT and use that.

      I suppose you could sleaze the mixing and filtering steps but the results would probably be so horrible that nobody would want to see it... part of how video decoding works is to refer back to previously-decoded images. The way

  • by Anonymous Coward

    Ever faster porn!

    • by Z80a ( 971949 )

      Or less fan noise while watching porn.

      • Re: (Score:2, Insightful)

        by Anonymous Coward

        Or less fan noise while watching porn.

        If you want less fan noise you should go with a format your system have hardware decode support for. That would not be VP9.

        • We're on a site traditionally slanted towards linux and FLOSS. Even when we have decoding hardware, it's not supported most time. There's even recent news about Ubuntu 14.04 specifically not supporting some of it!, depending on your hardware and drivers.

      • Fan noise would mask any user panting...
  • What is a "de facto" decoder? Something that is not supposet to decode VP9 but can be tricked/misused to do so?
    • "De facto" here means that it happens to be used by default by Chrome, but it isn't an industry standard reference decoder.
  • by tota ( 139982 ) on Sunday February 23, 2014 @09:55AM (#46315811) Homepage
    Just how slow am I talking about? As per the link, often about 50 times slower than x264.
    This may be OK for google, which encodes a video once and then sends it to many many customers (youtube), the bandwidth savings pay for the increased CPU cost.
    But for most users, that's just not acceptable. Until they get the speed up to a reasonable, we'll keep using what works: x264 or vp8
    • I don't see any problem with that. It makes perfect sense to used different codecs in different contexts.
    • by Mashdar ( 876825 ) on Sunday February 23, 2014 @11:07AM (#46316139)

      Most users never encode a single video in their life. (Except for cameras on devices, and who is doing 4k video on thier phone these days?)
      And if encoding takes 50x longer, that's 50x the resources Google needs to keep up with the work flow.
      So you have it totally backwards.

      Not to mention that we are talking about 4k-targetted codecs, so you should be comparing to H.265, not H.264. The additional computations for encoding H.265/VP9 are to reduce bandwidth requirements. If you don't care about bandwidth, feel free to generate a 5GB H.264 video.

      • We will likely see an increase of client-side encoding VP9 through WebRTC.
        Let others debate the extent of use, but browser-based video chat and screencasting will likely increase. This should pop many I've-never-encoded-a-video-before cherries.
        The usage of VP9 will not be solely for 4k videos.

  • by jez9999 ( 618189 ) on Sunday February 23, 2014 @02:08PM (#46317415) Homepage Journal

    Google use ffmpeg quite a lot through Youtube. I wouldn't be surprised if they'd contributed quite a lot to the ffmpeg codebase, fixing bugs and performance issues. How much of this did Google's staff actually write?

  • I love H.264. I do not love that its proprietary, nor do I believe it should be. x.264? I hope someone can create a free codec equivalent to or superior to H.264 so I give props to Google for giving it a go with VP8 and VP9.

    The founders of Oblong Industries, Inc. [oblong.com] were responsible for the visuals in the 2002 movie the Minority Report [imdb.com]. Their company started shortly after that movie and has been in the black for more than 10 years.

    These images show the technology as conveyed in the movie. [google.com] The video in

Sigmund Freud is alleged to have said that in the last analysis the entire field of psychology may reduce to biological electrochemistry.

Working...