FFmpeg Announces High-Performance VP8 Decoder
An anonymous reader writes "Three FFmpeg developers — Ronald Bultje, David Conrad, and x264 developer Jason Garrett-Glaser — have written the first independent, free implementation of a VP8 video decoder. Benchmarks show that it's as much as 65% faster than Google's official libvpx. The announcement also gives a taste of what went into the development process, as well as the optimization techniques used. Currently it's only fully optimized on x86, but ARM and PowerPC optimizations are next in line for development."
As someone who spends most of their work day implementing someone else's specifications I know exactly where they are coming from. I honestly cannot tell if people are bad at writing spec's because they're simply lazy or if they need to be trained to document their file formats completely.
When I think back to my University days we never really learned how to write a specification and wonder if that wouldn't be a course worth teaching. Perhaps you get the students to write a program that outputs a set of complex information into a format, and then get them to write an end to end specification to both read and write that format.
My favourite moments are when you realise that the current implementation not only doesn't follow the spec' but directly contracts it (e.g. A "bool" that can be TRUE, FALSE, "", "null", or "nan").
Abolishing software patents will take years. Most of the short-term goals are a waste of time, or a distraction by companies that don't really want to end the problem, but WebM is a project that would have a big impact, and has a good chance of succeeding. Great to hear that Xiph continues to support it!
File formats and compatibility are the biggest problem caused by software patents. They're how monopolies get too powerful, and they're how companies with people-friendly terms get locked out of commercial software development. (Commerce isn't the only valid form of software development, but it's important for the sustainability of a project.)
Expert in software patents or patent law? Contribute to the ESP wiki!
I usually rip my DVDs to ~1.2GiB Xvid avi files at native res using mencoder (not reencoding the audio), and have been doing this for many years. Does anyone know what combination of muxer and audio/video codecs is preferred nowadays? I'm thinking of using Matroska with Vorbis for audio but I'm completely lost as to what video codec to use. As for which tools to use, I find most of what I need in the Debian repositories but I'm open to suggestions.
Also, I prefer quality over size but over 1.2GiB for a 90 minutes DVD is too much IMHO.
"ill rip my dvds to x264 that are a bit smaller and better quality then your xvids"
True enough. Not automatically preferable though because they require more than double the cpu to decode.
"if vp8 can give me as good a quality viewing in less space it wins"
Probably not. x264 has a number of innate visual advantages to compressing video that were previously mpeg compressed. VP8 generally seems to win on raw uncompressed video in the races I've seen.
As for cpu, it does count, especially if you are streaming to a set top box or old pc for playback). I don't know what kind of cpu power is required to play back VP8.
Probably not. x264 has a number of innate visual advantages to compressing video that were previously mpeg compressed. VP8 generally seems to win on raw uncompressed video in the races I've seen.
And the problem is, where do you find raw, uncompressed video? About the only place you will find it is if you are transferring an analog source to a dedicated internal capture card. Virtually everything else uses some form of MPEG or H.264 compression.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
> Probably not. x264 has a number of innate visual advantages to compressing video that were previously mpeg compressed. VP8 generally seems to win on raw uncompressed video in the races I've seen.
You are right and wrong at the same time. x264 has many psycho-visual optimizations (these lower PSNR) that make it look better, while VP8 is optimized for PSNR, which doesn't necessarily look good. If you compare x264 in baseline profile (not what you'd use for a DVD rip) and VP8 at best settings, VP8 might beat x264 at PSNR, but it'll still look worse.
Now, for recompression: This is basically misinformation, based on a comment made by the VP8 devs in the MSU test, where VP8 did relatively better on the only uncompressed source. Of course this source (moving calendar) also has very peculiar properties with regards to motion compensation, which is more likely the reason for different performance. MPEG compressed content doesn't actually bias against VP8 more than against H.264, since VP8's block transform is actually more similar to MPEG2's than that of H.264.
Long story short: Until VP8 gets psycho-visual optimizations, it'll always look worse than x264 at the same bitrate. Once it does get them, it might be possible for VP8 to reach x264 quality in baseline profile. Baseline is only used for phones and the like, though.
One of the best ways I have seen to avoid that kind of ambiguities is in the PNG specification. (rfc2083)
By not only explaining how something should be done but also expressing the reasoning to why this method has been chosen the person implementing the specification can follow the same reasoning and in the cases where the "how" not is specific enough the "why" will make it evident.
One of the worst ways is probably rfc1034 with it's many "I think it should be done this way but I refuse to say if it is important or why I have chosen this method. Here is some pseudocode in a language that I just invented."
Then you've been fooled. The study you're referring to used videos pre-compressed with other MPEG standards, and the VP8 guys claimed that that biased it toward other MPEG-like codecs. They said VP8 got better with an uncompressed source.
VP8 got better. On a single test. A single test is not conclusive for anything but that single test. Note that, even for that single test, it still didn't beat H.264 -- it merely got better.
What we know (not assume), is that the core of VP8 is almost identical to the H.264 Baseline profile. VP8 is an MPEG-like codec! It's got a few small tweaks, some that help and some that don't. The features that would give it an obvious advantage or disadvantage on pre-compressed video are identical.
Agreed. The fact that VP8 generally does hold its own side by side with x264 is a pretty impressive testament to the codec.
But who cares if VP8 is technically a better codec if it doesn't actually produce superior results with the source video we work with? If it cuts CPU for decoding while offering on par quality that would be a solid advantage.
If it produces adequate results, then I for one will use it simply because of the stance it takes with regards to patent encumbrance. To me that is perfectly sufficient, because I'm not trying to create any HD video... yet? I don't want to get into building disk farms. Anyway, I shouldn't have to worry about things like whether the camera that says pro on it has a professional H.264 license associated with it, or whether the video editing software whose name ends in pro has a professional H.264 license... but last I heard, there were rather high-profile examples of each indeed not having same. This is not something that I want to have to worry about. Indeed, I would say that an intellectual property law system which permits this to become something you have to worry about is broken as designed.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
And then when the implementation has a bug, it never get fixed because, by definition, it is the specification, and alternate implementation have to introduce the same bug in their code.
I rip h.264(libx264 level 4.1 high profile), with ACC 5.1 and 2.0(muxed properly combine left front/rear, split center) sound in a mpeg4 container. because that is what my ps3 will play back. i use ffmpeg's -cfq setting.
# ffmpeg -i ${INFILE_THAT_FFMPEG_CAN_DECODE} -map 0:0 -map 0:1 -deinterlace -vcodec libx264 -vpre hq -crf 22 -threads 0 -level 41 -acodec libfaac -ac 6 -ab 256kb -r 24000/1001 ${INFILE_THAT_FFMPEG_CAN_DECODE%.*}.mp4 -map 0:1 -acodec libfaac -ab 256kb -newaudio
The above gets generated with a lengthy python script that i'm till slowly working bugs out of.
All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
last I heard, there were rather high-profile examples of each indeed not having same.
Of course there are.
You owe MPEG LA nothing until you are distributing product on a commercial scale - and by commercial I mean the premium cable channel with a minimum of 100,000 paying subscribers. The broadcast station serving 500,000 households.
H.264 royalties on sales of your 30 minute Star Trek fan-flick max out at 2 cents a disk or download. Wake them when you have a check for $20,000 to deliver.
Who said anything about copyright infringement? This is for personal use. There's no distribution to other parties involved.
And the problem is, where do you find raw, uncompressed video? About the only place you will find it is if you are transferring an analog source to a dedicated internal capture card. Virtually everything else uses some form of MPEG or H.264 compression.
You don't. I work in the TV industry and don't get much access to uncompressed video, not from a camera anyway. In the SD world, the camera gets dropped down to a 270mbit stream (165mbit of video data), which uses YUV, compressing the chroma, and uses interlaced video, compressing the vertical resolution. We use anamorphic pictures too, so horizontal res is compressed. Even graphics tend to be a yuv422 stream. That's about the closest I get to uncompressed.
In the HD world it's a similar issue, with 1080i at 1.5gbit (I've never seen 3gbit outside of IBC).
While codecs exist for higher bitrates (2:1, 3:1 etc, upto about 80mbit), most of our SD work is 50mbt d10, 30mbit d10, and even dv25, giving a massive amount of compression before it even gets onto the editing system. HD tends to be 100mbit at most.
H.264 royalties on sales of your 30 minute Star Trek fan-flick max out at 2 cents a disk or download.
I will not knowingly support any scheme that penalizes my media's popularity, however trivial it might be.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
What copyright? All the software he mentioned is OSS. H.264 is a format, it can't be copyrighted.
Maybe you meant software patents? That depends on where he lives.
Dilbert RSS feed
270mbit stream (165mbit of video data)
And I should add, that as it's interlaced, ffmpeg's x264 encode/decode unfortunately wins out against both vp8 and dirac at around 4mbit.
Nice script, but two things..
First, ffmpeg's deinterlacer kinda sucks. Especially if you're working with NTSC broadcast (60000/1001fps) content, because really you want to be doing a pullup. Since in your example you're using 24000/1001, I guess it's progressive content. In that case, do you really need to deinterlace at all? If you do, you might be interested in the "top" parameter (see the manpage) for setting which field is first in interlaced content; usually it won't be necessary, but it's nice to have the ability. Just throw "-top -1" somewhere in there so it'll always autodetect, or if you want to get fancy, leverage ffprobe to tell you which field is first; I think you can do that with 'ffprobe -show_streams'.
Second, I find a crf of 18 to 20 to be ideal for DVD content, particularly fast motion. Higher values tend to *just barely* starve the encoder of data during high/fast motion; it's more noticeable on a scaled-up display IMO.
What are the opinions of other ffmpeg+x264 users out there?
For the last time, PIN Number and ATM Machine are redundancies!
By not only explaining how something should be done but also expressing the reasoning to why this method has been chosen
Yes - a truly excellent thing to do. They should do the same thing with laws - define the law as they currently do but also provide a justification for the law. That way the law can be challenged in the future when the justification no longer holds. In addition, no one will ever misinterpret the meaning of a law and use it for purposes for which it was not designed.
Now back to format specifications - code makes for a very poor specification. While code can implement a specification, it generally does so in an unorganized fashion. Specifications should be clear - having no ambiguities or vagueness. Code is not so clear. And as the parent mentioned, generally does not communicate reasoning to the reader.
Mathematically based definitions are great - they are both clear and organized. Tools such as lex/flex/yacc/bison combine code with mathematical definitions to implement such specifications. The ideal format specification would include a mathematical definition along with reasoning explaining the design decisions.
Until I can play mkv files in a cheap DVD player then they're a non-starter for me. AVI might be rubbish but it works.
I also wanted to chop up a mkv file into pieces the other day and there doesn't seem to be an equivalent to VirtualDUB for this, I thought there would be something by now.
Is matroska gaining any support in the mainstream world or is it just another niche format like ogg?
No sig today...
Clearly written code with no 'clever' tricks can be part of a decent spec, but never all of it. Rationale matters as does an indication of possible future versions (is there a version field because we EXPECT to run against shortcomings or is it just future proofing).
Even with code, ambiguity remains. If there are numerically tagged fields, MUST they be included in numerical order or did this code just happen to do that? When the code writes that struct onto the wire, is it big endian or little endian? In some cases, there is deliberately more than one way to do things within spec. In that case, example code will tell you ONE of them.
Not at all, mathematicians have figured out how to be precise many many many years ago. Admitedly dijkstra helped a lot, but mathematics has been able to produce exact specifications for much longer than programming has existed for.
Here's Xiph's support: http://www.xiph.org/press/2010/webm/ With Xiph's support, and now ffmpeg folk working on it, WebM's looking very good.
Expert in software patents or patent law? Contribute to the ESP wiki!
Normally i'm doing dvd some progressive, some interlaced/telecine'ed content, some of it is interlaced, most isn't. I was under the impression that -deinterlace didn't do anything if the content wasn't interlaced. I'll look into the -top option. The full python code can be found at, http://github.com/cynyr/ps3enc It is a huge mess i know.
All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
seems like someone has a ps3. I'm doing the same thing to my dvd collection.
All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
A "bool" that can be TRUE, FALSE, "", "null", or "nan"
That's why I like Perl so much. Anything can be a Bool., and it's easy to understand: if it is "something" it is true; otherwise it is false (like 0, "0.0", "", undefined, or that NaN nonsense). It's the sort of thing that drives me crazy in places like PHP or Javascript, where you suddenly need "===" operators or crazy tests for something that should be completely obvious.
Of course, that makes offtopic, flamebait and whatnot all true.
Hey thanks for the link! A mess isn't a problem; hell, it's better than what I have -- nothing!
I could be wrong about -deinterlace using cycles when it isn't necessary; I'm very much an amateur at this stuff still. For me, I've been using mencoder with -vf pullup,softskip for telecine'd content. It's slower, but the results (IMO) look better than ffmpeg, particularly for animation. For the mencoder tasks, I use a modified version of the script found at this blog: http://blog.dastrup.com/?p=34
For the last time, PIN Number and ATM Machine are redundancies!
The movies ya dolt.
Alas it does not.
is that a Pi in your face?
By not only explaining how something should be done but also expressing the reasoning to why this method has been chosen
Yes - a truly excellent thing to do. They should do the same thing with laws - define the law as they currently do but also provide a justification for the law. That way the law can be challenged in the future when the justification no longer holds. In addition, no one will ever misinterpret the meaning of a law and use it for purposes for which it was not designed.
That is what already happens in some European countries. It is part of being a judge to interpret laws while taking the intention of the lawmaker into account. Laws have accompaning documents that detail these (and you can tell from history/press from that time).
Now back to format specifications - code makes for a very poor specification. While code can implement a specification, it generally does so in an unorganized fashion. Specifications should be clear - having no ambiguities or vagueness. Code is not so clear. And as the parent mentioned, generally does not communicate reasoning to the reader.
Mathematically based definitions are great - they are both clear and organized. Tools such as lex/flex/yacc/bison combine code with mathematical definitions to implement such specifications. The ideal format specification would include a mathematical definition along with reasoning explaining the design decisions.
In design theory there is the notion of explicit and implicit knowledge. Unless you are very reflective and a very experienced designer, you will not be able to make all your knowledge and your whole decision process explicit.
There is also a theorem in logic preventing you from writing the perfect universally understood specification.
NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
Except he is encoding his own movies, since movies from P2P networks already come encoded (and nobody re-encodes, it would be stupid), and ripping his own DVDs/Blue-rays was considered fair use even if it breaks encryption, in the case RealNetworks v. DVD-CCA.
Dilbert RSS feed
If you intend to edit the HD content, you might like it to be more than 100Mbps. For example, the default settings for ProRes HQ 50i content results in variable bitrate files up to 185Mbps and DNxHD 50i is 184Mbps. (60i content differs, with DNxHD at 220Mbps). AVC-Ultra (and AVC-Intra derivative) is up to 200Mbps.
There are other sub-100Mbps options, such as XDCAM HD422 @ 50Mbps, but it really depends on your productions - high-end natural history and drama, then I'd want as much more than 100Mbps as my systems could handle. Factual, comedy and news/current affairs would most likely be fine at the lower bitrates. HD content is broadcast at atrociously low bitrates anyway. However, from an archival point of view, I'd like to see higher bitrates used.
HDCamSR is only compressed at 440Mbps.
Brought to you by the author of such childrens' classics as "Some Kittens can Fly!" and "All Dogs go to Hell."
If you intend to edit the HD content, you might like it to be more than 100Mbps.
I might, however corporate strategy has settles on dvcpro-100 as the base codec. As it's news, a lot of the footage coming in has been squished through a satellite in any case, or at very best been shot on a 35 or 50mbit camera.