[annodex-dev] Proposal for prebuffering of videos in the Annodex Plugin

Michael Dale dale at ucsc.edu
Thu Oct 25 20:47:01 PDT 2007


sounds good :) ...If I recall correctly the html5 spec had playlists 
concept for a short period of time but has since abandon it... I have 
been doing testing of the mv_embed script with firefox 3 video builds 
and to get playlists functional I have to use multiple instances of the 
video element to pre-load future clips and have javascript calling clips 
in sequence... not all the hooks to make that happen are in place yet... 
so need to chat with chris about that.  (right now its supported with 
manual progression)
What Shane has proposed for oggplay seems ideal, but I don't think it 
will be worth the effort to try and get playlists back into the html5 spec.

I think playlists become super useful when dynamic ranged requests are 
supported... Is the segmentation going to happen on the server side or 
the client side? As far as I know at present oggplay can only seek in 
pre-buffered segments (unless the server is running mod_annodex)...  
When implementing playlist function do we want to think about buffering 
of a particular requested segment of video? or do we want to generally 
assume the server is running something like mod_annodex?

It seems to me it would be cleaner if the servers supported serving up 
ranges of video... mod_annodex does a mostly good job at that... But is 
not quite there, when we talked with brewster from archive.org he 
expressed interested in enabling serving of segments of video but it 
will need to be more stable before they can run it on the archive.org 
servers...
As I mentioned before I think a php based ogg spliter with no 
dependencies has the greatest potential for quickly spreading in the php 
based CMSs ;)

peace,
--michael

Shane Stephens wrote:
> Hi all,
>
> A little while ago, Michael Dale asked about the possibility of 
> pre-buffering of media in the Annodex Plugin's playlist.  There's two 
> possible uses that I can think of:
>
> (1) While the movie at position 'm' is being played, the movie at 
> position 'm+1' is preloaded, so that the transition between the two 
> movies is perfectly smooth.
> (2) A javascript interface that allows HTML pages to request a 
> particular playlist item be preloaded, and also allows HTML pages to 
> query whether each playlist item is preloaded already.
>
> So, first question: anyone have any other features that they'd like to 
> see supported with regards to pre-buffering?
>
> One potential problem with pre-buffering is that if the current video 
> is being downloaded at not much more than the required data rate to 
> provide smooth playback, then starting to download an additional video 
> might reduce the data rate of the first one to below the smooth 
> playback threshold, which would be a Bad Thing to have happen 
> automatically.
>
> Hence, I've made a list of potential code changes that would only 
> start pre-buffering the video after the currently playing one in a 
> playlist automatically, and only after the currently playing video has 
> finished downloading (videos are downloaded and stored in a local 
> temporary file in disk, often well in advance of actual decoding if 
> bandwidth is good).  On top of this, a javascript interface will allow 
> additional pre-buffer requests and status checks.
>
> Second question: can anyone see any other potential gotchas here?
>
> Final question: any other ideas / suggestions / etc?
>
> ----------------------------
> Here's the code change list:
>
> (1) add a method
> int reader_finished_retrieving(Reader *reader);
> which returns FALSE if the reader is still fetching data, and TRUE if 
> all data is now local.  FileReader implementations should always 
> return TRUE.
>
> (2) expose this method to the oggplay interface, to allow querying 
> from e.g. the plugin, as
> int oggplay_media_finished_retrieving(OggPlay *oggplay);
>
> (3) Use oggplay_media_finished_retrieving within the plugin's decode 
> loop (once per frame decoded, in plugin_oggplay.c), and indicate 
> completion to the plugin class in plugin.cpp
>
> (4) When plugin.cpp is notified that an oggplay instance has finished 
> downloading, then it can start the next instance.  This will require a 
> vector of oggplay instances which is manipulated at the same time as 
> the vector representing the playlist.
>
> (5) When the movie changes (for whatever reason) the oggplay preloaded 
> instances vector is checked first, before a new oggplay instance is 
> created.
>
> (6) Add a function to the javascript interface of the plugin which 
> allows additional prebuffering to be requested on any movie in the 
> playlist.
>
> (7) Add a function to the javascript interface of the plugin which 
> allows the prebuffering status of any movie in the playlist to be queried.
> ------------------------
>
> Cheers,
>     -Shane
> ------------------------------------------------------------------------
>
> _______________________________________________
> annodex-dev mailing list
> annodex-dev at lists.annodex.net
> http://lists.annodex.net/cgi-bin/mailman/listinfo/annodex-dev
>   



More information about the annodex-dev mailing list