I don't know if this is the best way of dealing with this problem, but I would do this:
— Use any reasonable format to encode the video (MPEG or Ogg Vorbis or whatever)
— Write a CGI script wrapper for mencoder, a part of the mplayer package (
http://www.mplayerhq.hu). Mencoder is a video conversion tool, driven from the command-line. You can specify any portion of the file to encode, and choose the output encoder using “-ovc copy -oac copy”. This will cause it to copy the raw video data rather than actually converting it.
— Point the HTML link to the mencoder CGI, and have the CGI return the generated video stream, preceded by “content-type: video/mpeg\n\n” (or whatever the MIME type should be). Pass the start times to the CGI as parameters.
Look at the Perl module CGI.pm for an easy way to write CGI scripts using Perl.
Hope that helps,
— Robert J. Lee