News for hackers. Stuff that matters.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by DarkShikari on Monday December 21, 2009 @02:46PM (#1008452)
Another flaw in the spec is that it provides no means to specify client buffering behavior: you cannot tell the client how many seconds to buffer before playback. This completely breaks the buffering model inherent in modern video compression systems and basically only works properly at all if the users' connection is far higher than the bitrate of the video.

Until HTML5 has basic feature parity with Flash's video capabilities, it will probably not be used very widely. This is of course ignoring the fact that Firefox doesn't support a video format that anyone actually uses, and the fact that IE (still unfortunately the most popular browser) doesn't support anything at all.

The sad reality is that a single system often has the advantage over a group of conflicting, incompatible systems; even if the single system is bad, one at least only has to compensate for its weaknesses, and not for everything else's.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by tumult on Monday December 21, 2009 @03:44PM (#1008566)
You can actually control the buffering/playback with JavaScript. There are various ways to do this; one is with the TimeRanges object http://www.whatwg.org/specs/web-apps/current-work/#normalize... which will give you a representation of available time regions in the video resource. You can use this to determine when you want the client to begin playback. Your code can receive this after registering for an event and seeking the video.

Another way is with the readyState of the media element. In particular you want to look for numeric value 4, HAVE_ENOUGH_DATA. From the WHATWG:

All the conditions described for the HAVE_FUTURE_DATA state are met, and, in addition, the user agent estimates that data is being fetched at a rate where the current playback position, if it were to advance at the rate given by the defaultPlaybackRate attribute, would not overtake the available data before playback reaches the end of the media resource.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by DarkShikari on Monday December 21, 2009 @03:53PM (#1008583)
You can actually control the buffering/playback with JavaScript. There are various ways to do this; one is with the TimeRanges object http://www.whatwg.org/specs/web-apps/current-work/#normalize.... which will give you a representation of available time regions in the video resource.

I could understand this in mp4, which has a global index giving locations of all frames in the file, but how would this be possible in ogg, which has no global index? Without a global index, you can't know anything about time regions that you haven't yet downloaded.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by tumult on Monday December 21, 2009 @03:58PM (#1008590)
Then it probably doesn't work with ogg :)

I personally think it's a huge mistake for Firefox to support only ogg. It's a bad time for fragmentation in the push for open video on the web.

It should still be possible to get a rough estimate for when to start playback. Good enough for buffered autoplay.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by windsurfer on Monday December 21, 2009 @05:00PM (#1008690)
How can Firefox distribute the H.264 codecs without infringing on patents?
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by DarkShikari on Monday December 21, 2009 @05:09PM (#1008708)
How do Linux distributions distribute H.264 and AAC decoders? Debian does, Ubuntu does, Fedora does, basically everything in the world except GNUsense does--yet they do just fine with themselves.

The best solution would be to simply use system decoders, like Safari does. On Windows, this would be Directshow, on Linux this would be Gstreamer, and on OS X this would be Quicktime. The browser should have ABSOLUTELY NOTHING to do with video and audio decoding.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by vetinari on Monday December 21, 2009 @06:52PM (#1008931)
> Debian does, Ubuntu does, Fedora does,

They do not. For Debian and Ubuntu, it is in Multiverse (non-free) repositories. For Fedora, it in RPM Fusion repository. In other words, there is no distribution that distributes H.264 or AAC, so system decoders would not help at all.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by just_the_tip on Monday December 21, 2009 @08:14PM (#1009119)
>The browser should have ABSOLUTELY NOTHING to do with video and audio decoding.

I know! While we're at it, who had the brilliant idea to put image decoders in browsers? I say let QuickTime decode GIFs and PNGs.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by chrischen on Monday December 21, 2009 @08:34PM (#1009152)
If firfox does do it I believe they would still technically be required to pay licensing fees. The only reason they wouldn't is because mpeg la does not pursue them.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by windsurfer on Monday December 21, 2009 @07:10PM (#1008976)
We've had that kind of "standard" for embedding movies for years. The only reason you don't know that is due to it's unpopularity.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by wmf on Monday December 21, 2009 @07:12PM (#1008981)
They could take their mountain of cash and pay the licensing fee like Chrome does.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by thristian on Monday December 21, 2009 @10:21PM (#1009331)
Firefox could pay the licensing fee for the copies of Firefox they distribute themselves, but they can't pay the licensing fee for unknown downstream users - the various Linux distros who build their own Firefox builds, projects like Seamonkey and Camino, any random people who want to use the Gecko source for something. Mozilla is pretty committed to making sure that anyone who uses Gecko has access to all the HTML features that Firefox has, so having a special feature-filled Mozilla-branded version and leaving everybody else out in the cold is not really an option.

Although Chrome supports H.264 video, I believe Chromium does not.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by blasdel on Tuesday December 22, 2009 @06:10AM (#1009740)
The patents (and thus the license fees) only apply to object code -- distributing the source code ain't infringing shit.

Mozilla already has compile flags that generate binaries other people aren't allowed to distribute -- the logo and trademarks are decidedly non-free, hence IceWeasel.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by wmf on Monday December 21, 2009 @11:12PM (#1009399)
If Mozilla is more committed to open source ideology than making video actually work that's their choice, but they could do things differently if they wanted to.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by ZeroGravitas on Tuesday December 22, 2009 @05:32AM (#1009711)
Mozilla is a non-profit org dedicated to the open web. They can no more do things differently than a shareholder owned corporation can just decide to not make profits.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by pyre on Monday December 21, 2009 @08:34PM (#1009151)
IIRC the licensing terms on MPEG4 are pretty onerous.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by kierank on Monday December 21, 2009 @09:12PM (#1009217)
It's capped at a few million dollars. A pittance for Mozilla.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by pyre on Monday December 21, 2009 @04:59PM (#1008689)
The problem being patents/licensing. mp4 is patented up the 'wazoo' and has onerous licensing terms.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by wmf on Monday December 21, 2009 @07:14PM (#1008987)
you cannot tell the client how many seconds to buffer before playback. This completely breaks the buffering model inherent in modern video compression systems

My understanding is that HTML5 browsers will attempt to buffer as much as possible; is there any reason you'd want less buffering?

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by TeHCrAzY on Monday December 21, 2009 @08:48PM (#1009174)
When you don't want the video to start, when you only want to buffer the minimum required for smooth playback, to avoid wasted bandwidth when the user inevitablly closes the window (see youtube, they do this now), a myriad of reasons. Flexability allows inovation.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by warfangle on Monday December 21, 2009 @10:17PM (#1009326)
Why does the browser itself not implement its own buffering algorithm? I do not quite understand why this onus should be placed on the developer responsible for the video imbedding functionality of the hosted datum. Certainly allow the external developer the flexibility to override this functionality (easily enough done via language features of JavaScript). But why force all developers to implement competing but similar algorithms? (by example and anecdotal personal observations: netflix > hulu > CBS/tv.com, in terms of how buffering algos deal with potentially high but intermittent bandwidth [1]).

If this were abstracted to the browser level (discounting the fact that these long-format providers will likely never move away from their current flash/silverlight implementations), my choice of online tv watching would no longer be dependant on the competence of the content-providers buffering algorithm: currently, despite the fact that I enjoy several shows provided by CBS.com, I will not watch them online due to their shoddy buffering algos. I will not watch them via antenna, either (I watch on my own schedule, thanks).

Of course, as stated, these providers are hopelessly locked to their delivery platform due to DRM and contractual obligations. Ergo, most of this point is moot when it comes to long-format TV-oriented content distribution.

[1] in my experience, CBS does not buffer enough before playing, and does not buffer during the pause state. It also does not indicate how 'full' the buffer is during pause state, like hulu does. Netflix is, in my opinion, the best on this as it indicates on the seekbar the buffer level, and adjusts bitrate based on perceived bandwidth. When your bandwidth drops below the perceived bandwidth, it gives you an accurate status indication as to buffering activity. CBS, contrarily, simply buffers to the original perceived value and resumes play. This is problematic if you begin with high bandwidth but midway through stream something happens to negatively effect your bandwidth. If this situation occurs, you're likely to encounter a slideshow: video resumes for 5< seconds, whereupon it buffers once more. This results in >2s stutters every 3-10 seconds. Because CBS does not buffer during pause states, this renders the video unwatchable except during time periods when my bandwidth is constant: living on a highly variable cable node makes this time period nigh impossible to predict. Therefore I do not watch CBS shows - antenna or streaming - at all.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by nfriedly on Thursday December 31, 2009 @01:35AM (#1023952)
Does anybody else ever get problems from youtube doing this? I'm on a 30mb connection and videos still pause to buffer sometimes when I'm watching in HD.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by kierank on Monday December 21, 2009 @07:53PM (#1009075)
What do you mean by "as much as possible"?
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by DenisM on Monday December 21, 2009 @07:34PM (#1009030)
So that playback starts quicker?
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by est on Monday December 21, 2009 @04:49PM (#1008670)
Well, it won't be long till whatwg find another usability issue with `video` and stuff, and expanding HTML5 to a full featured bloated media player stack.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by aw3c2 on Monday December 21, 2009 @05:03PM (#1008695)
Your constant Theora bashing is so wrong. H264 is patented, patents are bad, Theora seems the best alternative. Get over it.
Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by DarkShikari on Monday December 21, 2009 @05:14PM (#1008720)
When did I bash Theora?

There's a lot wrong with Theora, but it's irrelevant to the discussion: what matters is what people actually use. If today it came up that there was a big patent on JPEG, would you propose that the entire web stop using JPEG tomorrow?

No matter how good or bad Theora is, the internet will not simply drop the existing standard formats and switch. It doesn't work that way.

This is also why browsers should use system decoders: it would make it easier to use a different video or audio format, since one could use anything that people had decoders installed for. This would stop the internet from being locked into a single format.

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by jdowdell on Tuesday December 22, 2009 @05:46PM (#1010998)
System-level video decoders were used in Macromedia Director during multimedia and early Internet days, but developers found it didn't work very well... you had to choose an architecture(s), then had to test for its presence and do version-detection, then handle the installation/support process for audience members who needed it.

"Use the system's video" sounds attractive, but just pushes the problem down the stack. Your mileage may differ, but I've seen people try it before....

Re:Why the HTML5 ‘Video’ Element Is Effectively Unusable by ZeroGravitas on Tuesday December 22, 2009 @05:36AM (#1009714)
It's a bit disingenuous to claim to promote choice when you're fully aware that the "choice" would be h.264 and that network effects would then render this a de-facto standard.