<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Bluish Coder: video</title>
 <link href="http://bluishcoder.co.nz/tag/video/atom.xml" rel="self"/>
 <link href="http://bluishcoder.co.nz/"/>
 <updated>2020-07-10T16:25:05+12:00</updated>
 <id>http://bluishcoder.co.nz/</id>
 <author>
   <name>Bluishcoder</name>
   <email>admin@bluishcoder.co.nz</email>
 </author>

 
 <entry>
   <title>Temporal Media Fragment Support in Firefox</title>
   <link href="http://bluishcoder.co.nz/2011/08/08/temporal-media-fragment-support-in-firefox.html"/>
   <updated>2011-08-08T12:00:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2011/08/08/temporal-media-fragment-support-in-firefox</id>
   <content type="html">&lt;p&gt;The W3C has a &lt;a href=&quot;http://www.w3.org/2008/WebVideo/Fragments/&quot;&gt;Media Fragments Working Group&lt;/a&gt; whose &lt;a href=&quot;http://www.w3.org/2008/01/media-fragments-wg.html&quot;&gt;mission&lt;/a&gt; is to specify temporal and media fragments in the Web using URI&#39;s. The &lt;a href=&quot;http://www.w3.org/TR/media-frags&quot;&gt;draft specification&lt;/a&gt; goes through in detail how these fragments work. I recently became a member of the working group and I&#39;ve been working on adding support for the &lt;a href=&quot;http://www.w3.org/TR/media-frags/#naming-time&quot;&gt;temporal dimension portion&lt;/a&gt; of the specification to Firefox.&lt;/p&gt;

&lt;p&gt;In the most basic form you can specify a start time and an end time in the fragment part of a URI in an HTML video or audio element. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;video src=&#39;/mediafrag/AudioAPI.webm#t=50,100&#39;&amp;gt;&amp;lt;/video&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &#39;#t&#39; portion of the URI identifies the fragment as being a temporal media fragment. In this example &#39;50,100&#39; means start the video at a current time of 50 seconds, and stop playing at 100 seconds. There are various other formats for the temporal media fragment &lt;a href=&quot;http://www.w3.org/TR/media-frags/#naming-time&quot;&gt;defined in the specification&lt;/a&gt;. Examples can be seen in the &lt;a href=&quot;http://www.w3.org/2008/WebVideo/Fragments/TC/ua-test-cases.html&quot;&gt;UA Test Cases&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Development of this feature is being done in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=648595&quot;&gt;bug 648595&lt;/a&gt;. I&#39;ve done test builds of the first iteration of the patch and they are available at my &lt;a href=&quot;http://bluishcoder.co.nz/mediafrag/&quot;&gt;Firefox media fragment test builds page&lt;/a&gt;. The page has builds, an example, and a list of limitations which are currently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temporal syntax only. This means no spatial or track dimensions.&lt;/li&gt;
&lt;li&gt;NPT time support only. No SMPTE time codes or Wall-clock time codes.&lt;/li&gt;
&lt;li&gt;When changing the media fragment portion of a URL the media is not immediately updated. You need to refresh the page to see the change. This is most noticeable when directly navigating to the video and adding or changing a fragment.&lt;/li&gt;
&lt;li&gt;The user interface for identifying the fragment in the standard controls is ugly and needs polish.&lt;/li&gt;
&lt;li&gt;The HTML standard includes an &#39;initialTime&#39; attribute for obtaining the start time. There is no way to obtain an end time so I&#39;ve exposed a &#39;mozFragmentEnd&#39; attribute on the video DOM object.&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>WDCNZ HTML Media Presentation</title>
   <link href="http://bluishcoder.co.nz/2011/08/08/wdcnz-html-media-presentation.html"/>
   <updated>2011-08-08T09:30:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2011/08/08/wdcnz-html-media-presentation</id>
   <content type="html">&lt;p&gt;Last month I went down to Wellington to give a joint talk at the &lt;a href=&quot;http://wdcnz.com/&quot;&gt;WDCNZ&lt;/a&gt; conference. The topic was &quot;HTML Media: Where we are and where we need to go&quot;. The talk was shared between &lt;a href=&quot;http://blogs.msdn.com/b/nigel&quot;&gt;Nigel Parker&lt;/a&gt;, Mobile and Developer Evangelist for Microsoft, and myself. The conference was excellent with some great speakers and talks.&lt;/p&gt;

&lt;p&gt;Nigel and I covered using HTML video and audio elements and how they can be used today across multiple browsers and mobile devices. We also covered upcoming API&#39;s and directions in the web media area. Demo&#39;s were shown on Microsoft Internet Explorer 9, Windows Phone 7 (running the Mango update which has a browser that supports HTML media) and Firefox. Nigel has slides and a summary &lt;a href=&quot;http://blogs.msdn.com/b/nigel/archive/2011/07/18/wdcnz-html-media-where-we-are-amp-where-we-need-to-go.aspx&quot;&gt;in his blog post about the talk&lt;/a&gt;. I think it took a bit for attendees to get over the shock over a Mozilla and Microsoft representative sharing the stage and working together! Nigel&#39;s post explains how this came about.&lt;/p&gt;

&lt;p&gt;I spoke to a few Kiwi developers afterwards about using HTML video and there was a fair bit of interest in using it. The main obstacles seemed to be people unsure what codec to use and wanting support for adaptive streaming. The first is an education issue, getting people aware of what codecs to support for maximum coverage across browsers and how to encode to those formats. With regards to adaptive streaming there has been discussion between interested parties in various mailing lists and groups - it&#39;s definitely something that is wanted.&lt;/p&gt;

&lt;p&gt;At the time of the talk Nigel and I weren&#39;t able to find any existing New Zealand based sites that use HTML video. Hopefully this will change in the future and Microsoft New Zealand are leading by example by &lt;a href=&quot;http://www.microsoft.com/nz/rwc2011/&quot;&gt;using HTML video&lt;/a&gt; on their own site.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Firefox video scaling during YCbCr to RGB conversion</title>
   <link href="http://bluishcoder.co.nz/2010/11/24/firefox-video-scaling-during-ycbcr-to-rgb-conversion.html"/>
   <updated>2010-11-24T15:00:00+13:00</updated>
   <id>http://bluishcoder.co.nz/2010/11/24/firefox-video-scaling-during-ycbcr-to-rgb-conversion</id>
   <content type="html">&lt;p&gt;When I changed to using the &lt;a href=&quot;http://bluishcoder.co.nz/2010/03/12/changes-to-firefox-ycbcr-code.html&quot;&gt;Chromium YCbCr color conversion code&lt;/a&gt; I didn&#39;t use the code that scales the video during the conversion as there was no infrastructure in place to do this at the time.&lt;/p&gt;

&lt;p&gt;What this meant was we&#39;d do the YCbCr conversion on the original image size and then later, during rendering, scale this using the browser&#39;s scaling routines. This was slow in the case of large videos being scaled using the &#39;width&#39; and &#39;height&#39; attributes on video elements.&lt;/p&gt;

&lt;p&gt;YouTube&#39;s HTML 5 video user interface often scales down. By default it plays a good quality video scaled down to fit the standard YouTube user interface. In Firefox this results in a performance hit due to the slow scaling.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=577843&quot;&gt;Bug 577843&lt;/a&gt; was raised to address this issue. The fix was to implement scaling at YCbCr conversion time using the scaling code that already existed in Chromium&#39;s YCbCr code that we were using. This has now landed and will be in Firefox 4 resulting in better video playback when scaled.&lt;/p&gt;

&lt;p&gt;As part of this work I also updated to the latest Chromium code. This was done in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=583138&quot;&gt;bug 583138&lt;/a&gt;. This gives more performant conversion routines and better quality. This has also landed recently and will be in Firefox 4.&lt;/p&gt;

&lt;p&gt;For performance comparisons to see if there were improvements in playback I tested video playback using WebM, Theora and a commonly used open source flash-based video player playing an MP4 video. I compared dropped frame statistics using stats available from the flash player and the &lt;a href=&quot;http://bluishcoder.co.nz/2010/08/24/experimental-playback-statistics-for-html-video-audio.html&quot;&gt;experimental playback statistics&lt;/a&gt; I wrote about earlier.&lt;/p&gt;

&lt;p&gt;For a 1080p sized video, scaled down, the performance on my laptop improved by about 25% with these patches applied and was at least as good as the flash based player. For the Theora video performance was better - I suspect due to the lower CPU requirements to decode Theora video.&lt;/p&gt;

&lt;p&gt;[update from feedback: Removed comment about YouTube&#39;s fullscreen not being hardware accelerated. Apparently Firefox trunk now accelerates it. Clarified that by &#39;flash player&#39; I meant an open source video player written in Flash, not an open source Flash implementation]&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Changes to Firefox Video Implementation</title>
   <link href="http://bluishcoder.co.nz/2010/09/15/changes-to-firefox-video-implementation.html"/>
   <updated>2010-09-15T06:25:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2010/09/15/changes-to-firefox-video-implementation</id>
   <content type="html">&lt;p&gt;I mentioned in my &lt;a href=&quot;http://bluishcoder.co.nz/2010/08/24/experimental-playback-statistics-for-html-video-audio.html&quot;&gt;previous post&lt;/a&gt; about the Firefox video implementation that some changes were going to be made to make our implementation more spec compliant. These have now landed and will be in Firefox 4. The relevant bugs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=571822&quot;&gt;Bug 571822&lt;/a&gt; - Fire timeupdate less frequently than once per frame&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=584615&quot;&gt;Bug 584615&lt;/a&gt; - Make media progress events be simple events&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Prior to these landing we would try to fire a &#39;timeupdate&#39; event every time a video frame changed. This allowed JavaScript applications to listen to this event and do things (like display subtitles) at fairly accurate time intervals. Unfortunately other browsers fire this event at different rates, usually with about 200ms between events. This made applications non-portable across browsers if they relied on per-frame events. As a result we&#39;ve moved to firing &#39;timeupdate&#39; no more frequently than 250ms. If you need to process time changes more often than this then it&#39;s best to use &#39;setTimeout&#39; or &#39;setInterval&#39; to query &#39;currentTime&#39; at the rate you need. This will work across all browsers that support the media API.&lt;/p&gt;

&lt;p&gt;The other change was to remove the &#39;progress&#39; information from the &#39;progress&#39; events. This was driven by a spec change. The &#39;progress&#39; events used to contain additional information about the byte position and total number of bytes for the download. This additional information has been removed from the spec and we were the only browser that implemented that part. To prevent cross browser issues we&#39;ve removed the information too. The alternative is to use the &#39;buffered&#39; attribute on the media element and work with time data. &#39;buffered&#39; support was also landed recently which is why we can now remove the non-compliant &#39;progress&#39; event data.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Experimental Playback Statistics for HTML Video and Audio</title>
   <link href="http://bluishcoder.co.nz/2010/08/24/experimental-playback-statistics-for-html-video-audio.html"/>
   <updated>2010-08-24T17:30:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2010/08/24/experimental-playback-statistics-for-html-video-audio</id>
   <content type="html">&lt;p&gt;Now that HTML video is getting more usage there have been requests for statistics during playback so performance can be measured from JavaScript. This has come up a few times on &lt;a href=&quot;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-May/026523.html&quot;&gt;the WHATWG mailing list&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I raised &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=580531&quot;&gt;bug 580531&lt;/a&gt; to add some additional data to media and video DOM elements to provide this information. The patch in that bug adds two attributes to the DOM HTMLVideoElement object, both prefixed by &#39;moz&#39; to prevent name clashes as they are experimental:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;interface nsIDOMHTMLVideoElement : nsIDOMHTMLMediaElement
{
   ...
   // A count of the number of frames that have been decoded and ready
   // to be displayed. This can be used for computing the decoding framerate
   readonly attribute unsigned long mozDecodedFrames;

   // A count of the number of frames that have been dropped for performance
   // reasons during playback.
   readonly attribute unsigned long mozDroppedFrames;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;mozDecodedFrames is an incrementing count each time a frame is decoded and ready to be displayed. mozDroppedFrames is incremented each to a frame is dropped to keep playback going at the correct frame rate. These can be used to compute the current framerate that the video is being decoded at, and the framerate that it should be decoding at by combining the two counts. This will give client JavaScript code an indication if the hardware is able to play the video.&lt;/p&gt;

&lt;p&gt;Another requested feature is information on the download rate. Currently the Firefox implementation of HTML video and audio uses a non-standard extension to &#39;progress&#39; events. We provide information attached to the event that gives the current byte position in the media file as it downloads, and the total bytes available. This was actually required by the &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/#video&quot;&gt;WHATWG spec&lt;/a&gt; at one point but it changed a while back and I don&#39;t think any other browser implements it.&lt;/p&gt;

&lt;p&gt;This has been used in experimental pages to compute things like download rate and we use it in our own controls implementation to display a progress bar as we didn&#39;t implement the &#39;buffered&#39; attribute. &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=462957&quot;&gt;Support for &#39;buffered&#39; has now landed&lt;/a&gt; so we want to &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=584615&quot;&gt;remove the non-standard &#39;progress&#39; information&lt;/a&gt; to be spec compliant.&lt;/p&gt;

&lt;p&gt;To address the needs of those using the progress data for bandwidth calculation I&#39;ve added two attributes to HTMLMediaElement:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;interface nsIDOMHTMLMediaElement : nsIDOMHTMLElement
{
   ...
   // The approximate rate at which the media resource is being downloaded in
   // bytes per second. If the rate is not available (possibly due
   // to not having downloaded enough data to compute a consistent value)
   // this will be NaN.
   readonly attribute float mozDownloadRate;

   // The approximate rate at which the media resource is being decoded in
   // bytes per second. If the rate is not available this will be
   // NaN.
   readonly attribute float mozDecodeRate;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;mozDownloadRate is an estimate, in bytes per second, of the current download rate of the media. If not enough information has been downloaded for a reliable estimate this will be NaN. mozDecodeRate provides the rate at which decoding is occurring. In the patch this is the length of the video divided by the duration and remains constant.&lt;/p&gt;

&lt;p&gt;Whether this gets landed is yet to be determined but I think the information is useful and I&#39;d be interested in any feedback on the data I&#39;ve decided to include. There is some feedback in the bug from the patch review already and there&#39;s plenty of time between now and when the Firefox 4 rush is over to look over ideas of what could be included, removed or changed. I &lt;a href=&quot;http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-August/027929.html&quot;&gt;posted about the proposed additions&lt;/a&gt; in the WHATWG mailing list and there are some responses in that thread.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Building Firefox with WebM support</title>
   <link href="http://bluishcoder.co.nz/2010/05/20/building-firefox-with-webm-support.html"/>
   <updated>2010-05-20T21:20:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2010/05/20/building-firefox-with-webm-support</id>
   <content type="html">&lt;p&gt;All the patches to get Firefox built with &lt;a href=&quot;http://www.webmproject.org&quot;&gt;WebM&lt;/a&gt; support have now been attached to their relevant bugs. These patches aren&#39;t ready for review yet but can be used to get a build that has the functionality of the &lt;a href=&quot;http://nightly.mozilla.org/webm&quot;&gt;special Firefox WebM builds&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To build use &lt;a href=&quot;http://hg.mozilla.org/mozilla-central&quot;&gt;Mozilla Central&lt;/a&gt; as the base with the patches from the following bugs applied:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=566241&quot;&gt;Bug 566241 - Video playback stops intermittently&lt;/a&gt; - This has now landed in mozilla-central.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=566498&quot;&gt;Bug 566498 - Move generic video duration computing into Ogg decoder&lt;/a&gt; - This has now landed in mozilla-central.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=566501&quot;&gt;Bug 566501 - Fix seeks needed only by Ogg backend&lt;/a&gt; - This has now landed in mozilla-central.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=567056&quot;&gt;Bug 567056 - Rename some variables&lt;/a&gt; - This has now landed in mozilla-central.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=566246&quot;&gt;Bug 566246 - nestegg, the webm container parser we use&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=566247&quot;&gt;Bug 566247 - libvpx, The VP8 SDK and associated build changes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=566245&quot;&gt;Bug 566245 - nsWebMDecoder implementation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Hopefully these will be finished, reviewed and landed in short order.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>VP8, WebM and Firefox</title>
   <link href="http://bluishcoder.co.nz/2010/05/20/vp8-webm-firefox.html"/>
   <updated>2010-05-20T04:40:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2010/05/20/vp8-webm-firefox</id>
   <content type="html">&lt;p&gt;For all the details on the recent announcing of VP8 video code support in Firefox, the WebM container and playing YouTube videos with Firefox, read &lt;a href=&quot;http://hacks.mozilla.org/2010/05/firefox-youtube-and-webm/&quot;&gt;Firefox, YouTube and WebM&lt;/a&gt; on &lt;a href=&quot;http://hacks.mozilla.org&quot;&gt;hacks.mozilla.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;More links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.webmproject.org/&quot;&gt;WebM Project&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://nightly.mozilla.org/webm&quot;&gt;Firefox builds with WebM support&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.webmproject.org/users/&quot;&gt;How to Play YouTube videos using WebM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And don&#39;t forget the &lt;a href=&quot;http://labs.opera.com/news/2010/05/19/&quot;&gt;Opera WebM builds&lt;/a&gt; and &lt;a href=&quot;http://build.chromium.org/buildbot/snapshots&quot;&gt;Chromium builds&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To find WebM videos on YouTube:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search using the YouTube search&lt;/li&gt;
&lt;li&gt;On the URL for the search and &quot;&amp;amp;webm=1&amp;amp;html5=1&quot; and visit that URL.&lt;/li&gt;
&lt;li&gt;Click on a video.&lt;/li&gt;
&lt;li&gt;Add to the end of that video URL: &amp;amp;html5=1&lt;/li&gt;
&lt;li&gt;Enjoy WebM goodness.&lt;/li&gt;
&lt;li&gt;Right click in Firefox on the video to get fullscreen.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;This post is available in &lt;a href=&quot;http://www.webhostinghub.com/support/vp8-webm-firefox-be&quot;&gt;the Ukranian language&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>HTML 5 Video Seeking and Redirects</title>
   <link href="http://bluishcoder.co.nz/2010/04/27/html5-video-seeking-and-redirects.html"/>
   <updated>2010-04-27T14:00:00+12:00</updated>
   <id>http://bluishcoder.co.nz/2010/04/27/html5-video-seeking-and-redirects</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=560806&quot;&gt;Bug 560806&lt;/a&gt; has landed on trunk. Seeking and duration works for videos hosted on some servers where it didn&#39;t before.&lt;/p&gt;

&lt;p&gt;Firefox&#39;s implementation of HTML 5 video allows seeking in unbuffered portions of the video as long as the server that hosts the video supports byte range requests.&lt;/p&gt;

&lt;p&gt;Firefox needs to know in advance if it can seek the video so it can correctly display the &#39;progress&#39; bar. It also needs this information so it can compute the duration (which requires seeking into the video to find the end time).&lt;/p&gt;

&lt;p&gt;Most servers that support byte range requests send an &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html&quot;&gt;Accept-Ranges&lt;/a&gt; header. If we see this on the initial request we know the server supports seeking.&lt;/p&gt;

&lt;p&gt;Some servers support byte range requests but do not send this header. &lt;a href=&quot;http://aws.amazon.com/s3/&quot;&gt;Amazon S3&lt;/a&gt; is an example of a server that does this. To detect if these servers support seeking we make our inital request for the video include a &#39;Range&#39; header that askes for the bytes from zero to the end of the file. Servers like S3 that support byte ranges will respond with a &#39;206&#39; response code meaning a partial request is returned. This is sent even though the byte range we asked for is actually for the entire file. Once we see the &#39;206&#39; we mark the resource as seekable.&lt;/p&gt;

&lt;p&gt;A very few servers don&#39;t send an Accept-Ranges header and recognize our byte range request as actually being for the entire file and return a &#39;200&#39; response code. Unfortunately we don&#39;t recognize resources hosted on these servers as seekable. This means Ogg media on these servers don&#39;t have a duration since we can&#39;t seek to find it.&lt;/p&gt;

&lt;p&gt;Another issue we came across, and exists in Firefox 3.5 and Firefox 3.6, is detecting seeking when the initial request for the media resource results in a &#39;3XX&#39; response code. This is a redirect to another URL. Current Firefox versions (and possibly other browsers) do not pass on the value of headers to the redirected URL. This means the &#39;Range&#39; header is removed and we don&#39;t get a &#39;206&#39; response code on the redirected request. In servers like Amazon S3 that don&#39;t send &#39;Accept-Ranges&#39; this means we don&#39;t support seeking.&lt;/p&gt;

&lt;p&gt;This is why videos hosted on Amazon S3 and similar serving platforms that arrive there via a redirect don&#39;t get a duration, show progress or allow seeking. It&#39;s a fairly common practice to hide the fact that Amazon S3 is being used by having a redirect from a URL on the web site domain that redirects to the S3 location which results in this problem.&lt;/p&gt;

&lt;p&gt;The following are two URL&#39;s that show the problem. The first is a direct link to the video. The second redirects to the final URL. In the first you can seek and see a duration of &#39;1:00&#39;. In the second you can&#39;t seek and no duration is shown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://double.co.nz/video_test/no-redirect.html&quot;&gt;No redirect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://double.co.nz/video_test/redirect.html&quot;&gt;Redirect&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This is &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=560806&quot;&gt;Bug 560806&lt;/a&gt; and has been fixed and is now on Firefox trunk and in the &lt;a href=&quot;http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/&quot;&gt;nightly builds&lt;/a&gt;. The fix was to explicitly pass the &#39;Range&#39; header along to the final URL. This workaround exists in a few other areas in Firefox and &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=311599&quot;&gt;Bug 311599&lt;/a&gt; discusses a similar issue for plugins.&lt;/p&gt;

&lt;p&gt;If your own videos are not seekable or showing a duration then you may be facing a similar issue and it might be worthwhile trying a nightly build and seeing if that fixes it. Other things to look at are the server configuration to make sure that byte range requests are supported and the Accept-Ranges header is being sent. If you use Amazon S3 you might want to try and get them to support Accept-Ranges. &lt;a href=&quot;http://developer.amazonwebservices.com/connect/message.jspa?messageID=162333&quot;&gt;This forum post&lt;/a&gt; discusses the issue.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Changes to Firefox YCbCr Color Conversion Code</title>
   <link href="http://bluishcoder.co.nz/2010/03/12/changes-to-firefox-ycbcr-code.html"/>
   <updated>2010-03-12T13:30:00+13:00</updated>
   <id>http://bluishcoder.co.nz/2010/03/12/changes-to-firefox-ycbcr-code</id>
   <content type="html">&lt;p&gt;I posted previously about &lt;a href=&quot;http://bluishcoder.co.nz/2010/02/19/comparing-colour-space-conversion-libraries.html&quot;&gt;colour conversion libraries&lt;/a&gt;. To replace the &lt;a href=&quot;http://wiki.xiph.org/OggPlay&quot;&gt;liboggplay&lt;/a&gt; conversion routines we decided to try the &lt;a href=&quot;http://code.google.com/chromium/&quot;&gt;Chromium&lt;/a&gt; libraries.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=551277&quot;&gt;Bug 551277&lt;/a&gt; adds the Chromium code and integrates it with the new &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=538323&quot;&gt;video layer painting code&lt;/a&gt;. The Chromium code uses a C fallback if MMX is not available but this is done at compile time. I modified it do runtime detection using Mozilla&#39;s &lt;a href=&quot;http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/SSE.h&quot;&gt;SSE.h&lt;/a&gt; and moved the generic C routine from the Linux specific implementation to be used on all platforms that don&#39;t have MMX. Some other minor modifications were done (function name, namspacing).&lt;/p&gt;

&lt;p&gt;I added an &#39;update.sh&#39; script that can be used to update against the latest Chromium code. Given the path to the Chromium source it applies a patch for the changes I made.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=551378&quot;&gt;Bug 551378&lt;/a&gt; adds YCbCr 4:4:4 conversion (YV24). The Chromium code supported 4:2:0 and 4:2:2 (YV12 and YV16 respectively). Theora also allows 4:4:4 per spec. There aren&#39;t many 4:4:4 Theora videos out in the wild and the fix in this bug only adds support in the slower C implementation. I detect if the video is a 4:4:4 video and fallback to the C code.&lt;/p&gt;

&lt;p&gt;At some point optimized MMX routines should be done for this. I&#39;ve raised &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=551844&quot;&gt;Bug 551844&lt;/a&gt; for this. This would probably make a good first bug for anyone who wants something small and self contained to work on. It would be good to contribute this back to Chromium when done too.&lt;/p&gt;

&lt;p&gt;Xiph has a &lt;a href=&quot;http://wiki.xiph.org/TheoraTestsuite&quot;&gt;test suite&lt;/a&gt; with example videos in the different formats.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>HTML 5 Video Element for Internet Explorer</title>
   <link href="http://bluishcoder.co.nz/2010/02/22/html5-video-element-for-internet-explorer.html"/>
   <updated>2010-02-22T13:54:00+13:00</updated>
   <id>http://bluishcoder.co.nz/2010/02/22/html5-video-element-for-internet-explorer</id>
   <content type="html">&lt;p&gt;Cristian Adam has been working on a plugin for Internet Explorer that implements the &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html&quot;&gt;HTML 5 video element&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;He has &lt;a href=&quot;http://cristianadam.blogspot.com/2010/02/ie-tag-take-two.html&quot;&gt;released&lt;/a&gt; a new version of the Xiph Ogg Codecs with a technical preview of the &amp;lt;video&amp;gt; element for IE. A screencast of it working is available &lt;a href=&quot;http://cristianadam.blogspot.com/2010/02/ie-tag-take-two.html&quot;&gt;at Cristian&#39;s website&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>
