|
|
|
date: Tue, 15 Jul 2008 11:50:21 -0700 (PDT),
group: microsoft.public.win32.programmer.mmedia
back
Re: Osprey 230 challenging project
From: "nsrinivas@gmail.com"
> I am planning on building a simple/flexible html/aspx
> page that presents captions on the web that are stripped
> out of video using an Osprey 230 card ? Is this possible ?
>
> Basically capture the CC from osprey 230 card from a
> video and send the CC text to a web page. Are there any
> samples that i can use to get started ?
Where is the capture card located, on the client (browser
side) or on the server?
Unless you plan on using some proprietary API to receive the
CC data, you must use DirectShow as explained here:
http://msdn.microsoft.com/en-us/library/ms788051(VS.85).aspx
However, the Line21Decoder filter will render the CC stream
into a bitmap stream, not a text stream. If you want a text
stream, you must decode the CC data yourself according to
the EIA-608-B standard (easier than it sounds). I am not
sure whether the Line21 filters have been removed in Vista.
To extract the data, you will need to replace the
OverlayMixer+VideoRenderer with a SampleGrabber+NullRenderer
and use the SampleGrabber in sample callback mode. Once you
have your text or bitmap stream, you need to render it, and
that depends on where the card is located.
If it is located on the client, you do not need any ASPX or
other server components: just write a browser plug-in (for
Mozilla-based browser) or ActiveX control (for IE) that
captures the CC and renders it (in which case the bitmaps
may be useful).
If it is located on the server, then you need to do a lot
more work because you will need to push the captions to the
client but HTTP only works in pull-mode and the usual AJAX
or refresh tricks do not work well with streaming timed data
like your CC stream. Which means you will have to write a
server-side component to stream the CC (which can not be a
simple ASPX page because that would not outlive the initial
HTTP request) and a browser plug-in to receive it. You can
avoid the last part by wrapping the CC (text or bitmaps or
compressed bitmaps) in an ASF stream and thus use
WindowsMediaPlayer as receiver. You will still need to write
the server-side streaming server though.
A solution might be to use WindowsMediaServices to do the
streaming and to run a custom encoder as a service of some
kid (maybe WindowsMediaEncoder9 can capture and stream the
CC data - I never tried - in which case your ASPX page would
"only" need to start WME9 and create a publishing point in
WMS).
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
date: Tue, 15 Jul 2008 16:21:43 -0400
author: Alessandro Angeli
|
|