8 ms·
About Adobe's Flash Player Not Having Access to H.264 HW Acceleration on OSX
- Zak 17y agoThe facts that Flash performs just as poorly on Linux as on OS X, and far worse on a fast PowerPC (youtube is painfully choppy on a G5 Quad) than a slow x86 (youtube is tolerable on an Atom) suggest explanations that differ from the Adobe party line.
- the100rabh 17y agoyeah why does Flash run so poorly on my 166Mhz P1. Crappy s/w right. Yeah its become fancy to criticize Adobe and flash, for everything.
- Locke1689 17y agoYour account is new so I'm going to give you some advice: generally people on Hacker News have a reasonably high technical baseline and it would do you well to assume so. For example, a number of FFmpeg and x264 developers frequent the site and we have a pretty good idea of how video decoding works.
- radley 17y agoI think it was sarcasm...
- telemachos 17y agoI think it was sarcasm... A sense of which, unfortunately, is in very, very low supply around here.
- kelnos 17y agoI quite easily recognized it as sarcasm. But it still wasn't funny. It was just kinda dumb and obvious.
- telemachos 17y agoI wasn't discussing whether or not the post was funny. I don't care if it was funny. I was reacting to what I think is an occasional problem with HN. In a nutshell, some people here take "serious" so far that it turns into "puritanically self-righteously lacking in any sense or awareness of humor or irony." That can lead to really bizzare misfires of communication. Case in point is the reaction to a recent comment by Jrockway's on the anti-IRS nutcase: http://news.ycombinator.com/item?id=1135693 http://news.ycombinator.com/item?id=1135693 (again, please don't feel the need to say whether you find his comment funny or in poor taste or whatever).
- kelnos 17y agoI think the comment you link to is actually kinda an odd illustration of your point[1]: the first reply (Poe's rule) clearly recognizes it as humor and suggests that others will take it overly-seriously. The second reply is somewhere in the middle -- at least it didn't start out with "OMG you are a terrible person how could you say that!!!11" I don't know who jrockway is: maybe he's making a joke, and maybe not. It's more likely that he's making a joke, but you never can tell on teh intarwebs... even in a place like HN. Regardless, I wouldn't consider pw0ncakes' comment puritanical or self-righteous in the least: in fact he/she slightly revels in the possibility of fat-cat execs getting their comeuppance. [1] Though I don't disagree with your point; I have indeed seen the issue of which you speak, though I can't think of any specific examples.
- dreyfiz 17y agoNo, it was just plain dumb.
- kierank 17y agoTo play devil's advocate a little bit it's funny how all the negativity is now focused on Adobe when not many months ago it was all focused on Apple's App Store policy.
- Zev 17y agoApple's fixed the criticisms from a few months ago (long submission updates, poor/inconsistent private API policy, etc). Not to say that you wouldn't have to look far to find new criticisms (their recent removal of "adult" apps, to name one). Adobe, on the other hand, hasn't fixed any of their problems. And they've had much longer to fix their problems than Apple has. Hell, it took less time for Apple to create a problem that had to be fixed then for Adobe to fix their problems.
- kierank 17y agoWell the Apple App Store problems were merely procedural issues whereas the Adobe issues are technically difficult problems that haven't been solved well by anyone and aren't helped by platform/codec war politics.
- Zev 17y agoInstitutional problems can be as hard to fix as technical problems. Whats going on at Adobe might be both types of problems. (Not to say Apple has an institutional problem, but, speaking in general.)
- Zak 17y agoFrom what I know of the issue, the technical problems with Flash are not difficult to solve. The fundamental problem seems to be that Adobe is not willing to put in the effort to make Flash work well on multiple platforms.
- DarkShikari 17y agoand far worse on a fast PowerPC This is because Mainconcept's H.264 decoder doesn't have Altivec optimizations, only x86 SIMD. The VP6 and FLV decoders, as far as I know, do have Altivec, probably because back when they were released, PowerPC was a significant market.
- yuvi 17y agoThe best explanation I've seen is http://www.kaourantin.net/2010/02/core-animation.html http://www.kaourantin.net/2010/02/core-animation.html when you also realize that for video playback and animation in general, OpenGL > Core Animation > Quartz 2D > QuickDraw for OS X 10.2 and newer (I think QuickDraw was better pre-compositing.)
- danh 17y agoAlso, Flash often, rather surprisingly, uses more CPU cycles when a video is paused than e.g. VLC does actually playing the darned thing (on OS X). I guess this must be because Apple doesn't allow Adobe access to its proprietary, hardware based empty loop optimizations...
- papersmith 17y agoIn my experience flash under Linux was much worse than OS X. One of the main reasons I switched to OS X was to make flex development less painful.
- Zak 17y agoThe overall experience is worse on Linux, with sound issues and on 64-bit Linux, clickable areas that don't line up with the visible controls. I was just talking about CPU usage.
- stevenwei 17y agoYou were doing Flex development on Linux? I'm so sorry... We tried that once but gave up after finding out that turning on a blur filter would segfault the Flash Player. Whoops!
- ninjac0der 17y agoNot a good way to make your point in my opinion. 3D rendering is also slower on both OSX and linux distributions. I don't doubt Adobe and their software is a problem, but I also think it's become far to popular to blame everything on Adobe.
- sparky 17y agoI don't see how the fact that other developers aren't complaining is proof that hardware acceleration is not useful. There is a full spectrum of how much access you allow browser plugins and client-side code to features of the underlying OS and hardware. Apple has chosen a relatively conservative point along that spectrum, Microsoft chose a more aggressive one (ActiveX). There is an obvious tradeoff between capabilities/performance and security. Google, with its Native Client sandbox, static analysis tools, etc. is attempting to get the performance of ActiveX with the security of more stringent sandboxes. This is an extraordinarily difficult problem, and Apple is justified in not wanting to deal with it. However, they are not justified in saying they're not leaving performance on the table. Adobe should be able to improve H.264 decode performance without HW acceleration, but it is unclear what the upper bound is on performance when running inside the browser sandbox. Certainly it can do no better than a native app. EDIT: wmf is probably right; though there is no browser-specific sandbox that prevents third-party browsers from allowing plugins access to underlying OS APIs, such an API for HW-accelerated video decoding doesn't exist. It's unclear to me if acceleration is just not supported by the driver at all, or if the capability is only exposed via a private API, reserving it for first-party apps like Quicktime. Certainly many of the GPUs included in Apple products support hardware acceleration, so it seems to be primarily a software issue.
- wmf 17y agoI don't think OS X has any browser plugin sandbox. The issue is not that browser plugins are denied access to the H.264 API for security reasons; there is no public H.264 API. Edit: There is a private H.264 API that is used by QuickTime.
- deleted 17y ago[deleted]
- staunch 17y ago"Lastly, does anyone really think it would be a good idea for web content plugins to have direct access to graphics card hardware?" As if there's no secure way to allow it access? Of course there is, and it should have that access if it means the difference between being able to stream video from the web well or not. I'm not clicking links to anymore of this guy's posts. He's the very definition of a mouthpiece. Nearly every post of his are bad rationalizations for Apple's policies.
- mikedouglas 17y agoAs if there's no secure way to allow it access? Of course there is, and it should have that access if it means the difference between being able to stream video from the web well or not. A safe, high level API exists: QTKit. Adobe wants direct access, so they've ignored this totally. Whether it makes sense to give hardware control to a piece of software notorious for instability and resource consumption is a judgment call, but it seems a pretty clear one.
- modeless 17y agoThis argument is ridiculous. Flash is native code and does not run in a sandbox. It already interacts with graphics hardware through numerous other APIs and has the ability to kill your system in innumerable other ways. An API for hardware acceleration of video decoding should be the least of your worries. Furthermore, this argument would apply just as well to WebGL, which gives graphics hardware access directly to Javascript on any website you visit. WebGL is awesome and I believe it can be done safely. I don't know much about QTKit but I think it's entirely plausible that it isn't flexible enough for use in Flash. Flash needs complete control over drawing because videos are integrated with other Flash content (likely rendered at least partially in software), and can be manipulated by ActionScript to produce effects such as 360 degree video: http://www.immersivemedia.com/work/cbc/hockey/index.html http://www.immersivemedia.com/work/cbc/hockey/index.html
- mattdw 17y ago> This argument is ridiculous. Flash is native code and does not run in a sandbox. It already interacts with graphics hardware through numerous other APIs and has the ability to kill your system in innumerable other ways. Actually, in Safari 4 (Intel, 64bit) each plugin runs in its own process, and it _is_ effectively sandboxed. If Flash crashes, it no longer takes down the browser, or even the tab a la Chrome; you just get a hole in the page.
- neilc 17y agoApple’s own QuickTime on Snow Leopard only makes use of H.264 hardware acceleration with a single graphics card: the Nvidia 9400M. If you don’t have that graphics card in your Mac, you don’t get H.264 hardware acceleration, period. Seems very surprising if H264 hardware accel is not also supported by the 9600M GT (which is an upgrade on some models of the MBP).
- octover 17y agoI subscribe that at least part of the 'problem' is Adobe's (previously Macromedia's) attention to the Mac. Flash has always been subpar, and I'm not alone in that the majority of apps that crash Flash is the root problem. If Adobe would step up their game it would probably go a long way, but they may have already blown their chance. Jobs does not like that Safari crashes unexpectedly, especially cause the layman user doesn't realize it was really the Flash plugin.
- cpr 17y agoAdobe's inattention to the Mac extends far beyond flash. All their applications now basically use a cross-platform UI that mocks both Mac OS and Windows conventions, and defines their own bizarre little world. (Flash is just more of the same.) Their Mac updater software is a Byzantine nightmare. I could go on. Just read some of the irate Mac users' commentary on John Nack's blog at http://blogs.adobe.com/jnack/ http://blogs.adobe.com/jnack/ .
- ricardo 17y agoAdobe ignored OS X for years and is now finding themselves in a position where they're losing a hold on Flash as the 'standard' for online video. Rather than fixing the technical issues they're focused on marketing. The last 3 years of iPhone sales have proven that people can live without Flash. All Apple has to do now is continue to ignore them and hold their ground while Flash slowly fades away.
- wmf 17y agoActually they are fixing Flash, although that doesn't excuse Doing It Wrong for all those years. http://www.kaourantin.net/2010/02/core-animation.html http://www.kaourantin.net/2010/02/core-animation.html
- DeusExMachina 17y agoYes, I think this is a little to late for them. It seems to me that they went along with something like "Apple has too little market share so it's not so relevant to us". In the meanwhile Apple become relevant increasing its computer market share with the Mac, conquering the third place in the smartphone market with the iPhone and creating a device (the iPad) that is targeted to a big new audience and in my opinion will take a big share on of the pie (also considering that this is the "multimedia" pie, one very relevant to Adobe). But in all these years they pissed of Steve Jobs, and he is the wrong person to have as an enemy when you will depend more and more on Apple platforms.
- pkaler 17y agoIt seems more like Adobe's development teams slowed down after the Macromedia acquisition.
- greyfade 17y agoIt seems more like they fired what few good devs they had, more like.
- coldnose 17y agoIf Adobe wants access to h264 acceleration, use the QuickTime libraries. In fact, why isn't Adobe using QTKit? Why are they rolling out their own appalling h264 implementation?
- wmf 17y agoAdobe claims there's a mismatch between QTKit and Flash Player's rendering model, so using QTKit would either introduce more overhead or require a re-architecture of Flash Player.
- Anechoic 17y agoHow does Perian handle it?
- wmf 17y agoAFAIK Perian doesn't use hardware decoding either. Also, Perian isn't bound by the weird Flash rendering model. http://blogs.adobe.com/penguin.swf/2010/01/solving_different_problems.html http://blogs.adobe.com/penguin.swf/2010/01/solving_different...
- duskwuff 17y agoPerian is just a set of decoders for QuickTime, not a full video player pipeline.
- GeneralMaximus 17y agoYes. Perian mostly includes ffmpeg decoders that plug into the OS X Component Manager.
- yuvi 17y agoBy not overriding Apple's decoder for baseline and main profile H.264
- bobbyi 17y agoWell then, I guess they need to re-architect some of Flash Player. They've had more than three years to get this figured out.
- raganwald 17y agoShould Flash Player be a kernel extension, so that it can ensure it gets plenty of CPU cycles and have direct access to whatever hardware it wants? Yes, that way developers code for the proprietary platform Flash, and Apple joins all the other PC manufacturers in making commodity hardware with little differentiation except styling.
- mooted 17y agoIMHO, Adobe should definitely act more responsible and finetune Flash Player to perform better across all platforms. But i disagree with John Gruber. #1) Flash is not "slower" on Mac . It uses up too much resources compared to its Windows edition. I switch between Windows(work) and Mac (personal) all the time and i have never seen anything Flash playing "slower" on mac.Flash makes use of GPU access (if required) not just for video playback. I assume Adobe's excuse for resource hungriness is , 'too much time marketing'? #2) As http://www.apple.com/quicktime/guide/hd/recommendations.html http://www.apple.com/quicktime/guide/hd/recommendations.html suggests, without a card you are going to experience crappy playback for HD video on Quicktime,Flash plugin and everything. #3)John is comparing native desktop video playback tools to a plugin that lives inside a browser. Lastly.. read staunch's comment. Why doesnt John have comments enabled in his blog?
- pohl 17y agoWhy doesnt John have comments enabled in his blog? "Sometimes a design decision is what you don’t put in, as opposed to what you put in." http://shawnblanc.net/2007/07/why-daring-fireball-is-comment-free/ http://shawnblanc.net/2007/07/why-daring-fireball-is-comment... I find his restraint refreshing.
- mattdw 17y ago> Flash is not "slower" on Mac . It uses up too much resources compared to its Windows edition. I switch between Windows(work) and Mac (personal) all the time and i have never seen anything Flash playing "slower" on mac. I think you'll find that, with regards to computer software "slower" and "uses more resources" are generally interchangable; it's a trade-off. And "slower" can be quite obviously observed when a "uses more resources" app hits a resource limit. For instance, there are flash games (not videos -- _games_) which are so choppy as to be unplayable on my dual core 2.5GHz MBP -- because it uses too much of "more resources," and runs out of cpu cycles.
- mooted 17y ago"slower" means "choppy" and is not interchangeable with "use more resources" as you suggests. I have never seen any flash content that runs choppy on my 2 GHz Macbook. Post an example and back up your claim.
- radley 17y agoIDEA: why not get Adobe's perspective before hitting "Publish"? Two views are better than rants.
- radley 17y agoOh that's right. This is better as a one-sided topic...
- armandososa 17y agoThis is off-topic, but, why does Gruber ends his posts with open ended questions when there's no way of leaving comments? Sites like CopyBlogger always suggest that ending a post with a question or two is a way to make sure that people will feel compelled to comment. What's the reason here? Is he (ab)using sites like HN as his comment system? Or is this a new form of linkbait?
- tvon 17y agoIt was a rhetorical question.
- armandososa 17y agoI don't think so. Aren't rhetorical questions devices intended to reinforce a point whose nobody shoukd answer? Do we even need an answer regarding the access of a plugin to the hardware card? See? that's a rhetorical question. Or isn't it?
- tel 17y agoProbably because of the sort of stuff found here http://daringfireballwithcomments.net/ http://daringfireballwithcomments.net/
- radley 17y agoSounds like he sent them a nasty letter. They stopped.
- ugh 17y ago“I encourage you to send me your comments regarding Daring Fireball. Unfortunately, I am at times a lousy correspondent — where by “at times” I mean “most of the time”. If I don’t respond to your email, or do so only after an inordinate amount of time has passed, please don’t take it personally. Please address correspondence to: comments@daringfireball.net” Daring Fireball – Contact
- blasdel 17y agoGoddamnit, why do people keep taking Adobe's statements at face value -- shipping versions of Flash on Windows aren't hardware accelerated either! The Windows Flash 10.1 plugin has been in public beta for less than 6 months, and only accelerates video decoding on minority hardware. A few percent of their install base has it, tops. Flash on Windows has decoded H.264 video at unaccelerated libavcodec speeds just fine without it going back to Flash 9 in 2007, and H.263 going back to Flash 6 in 2002. Neither of those codecs works nearly as well on OS X or Linux. They're pushing this angle because it makes them out to be the heroes -- see the passive-aggressive spiel you get when you visit the Flash page on an iPhone -- they'd love to frame everything as "if only Apple would let us". Unfortunately it's not true in the slightest.
- voidpointer 17y agoI'd love to see someone come up with actual facts around this Flash on Mac issue. There seems to be somewhat of a shortage of facts. Gruber has mostly hearsay (although he is very convincing with that). We'd need to do real benchmarking for various sorts of flash content. What about poorly written ActionScript in the SWF? Does it matter when you are running multiple instances of the player, etc. These ongoing political speculations are entertaining, but they are getting us nowhere.
- wmf 17y agoAs posted twice in this thread already: http://www.kaourantin.net/2010/02/core-animation.html http://www.kaourantin.net/2010/02/core-animation.html They're currently burning a lot of cycles just drawing to the screen.
- voidpointer 17y agoYep, that is already quite interesting. He doesn't say how this compares to the situation on windows (and linux). Nevertheless - this is already far more substantial.
- statictype 17y ago>Lastly, does anyone really think it would be a good idea for web content plugins to have direct access to graphics card hardware? Well, since moving all applications 'into the cloud' seems to be all the rage these days, it's inevitable that browsers expose deeper functionality of the underlying operating system. So, no, its not that unreasonable to expect it.
- Que 17y agoSuch constant extreme unfounded evangelism for Apple is making it very difficult to extract any true insight from John Gruber's "articles".
- hardwareguy 17y agoIs there some reason adobe can't use OpenCL to accelerate video decoding?
- wendroid 17y agoWhat is mildly amusing is that Gnash has had H.264 HW acceleration available for months. http://www.phoronix.com/scan.php?page=news_item&px=NzU1MA http://www.phoronix.com/scan.php?page=news_item&px=NzU1M... http://www.splitted-desktop.com/static/en/pdf/actu/Linux_with_Gnash.pdf http://www.splitted-desktop.com/static/en/pdf/actu/Linux_wit...