Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: How to capture images from a live stream ?

HTVi
TV Discussion Newsgroups

How to capture images from a live stream ?
buddhikasgj 11/6/2008 4:29:01 AM
I want to capture images from live stream in small time intervals from live
broadcasting stream by a machine in the same LAN. Can i do this by using
Windows Media fromat SDK or using DirectShow SDK ? Also the otherway arround,
i want to Broadcast some images as a live stream as the images are available
to broadcast. can that also be done using those SDK's.
if yes how can do that?
Re: How to capture images from a live stream ?
Jerislav <jerislav[ at ]gmail.com> 11/6/2008 11:13:50 AM
On Nov 6, 5:29 am, buddhikasgj <buddhika...[ at ]discussions.microsoft.com>
wrote:
[Quoted Text]
> I want to capture images from live stream in small time intervals from live
> broadcasting stream by a machine in the same LAN. Can i do this by using
> Windows Media fromat SDK or using DirectShow SDK ? Also the otherway arround,
> i want to Broadcast some images as a live stream as the images are available
> to broadcast. can that also be done using those SDK's.
> if yes how can do that?

Ok, this isn't very hard. Use DirectShow and appropriate Source
filter, like WM ASF Reader if you want to use Windows Media Live
stream.
insert ffdshow filter and program it to grab frames every few seconds,
and output them on disc in JPG.

Easy, fast, almost no programing, which you still need to do, because
you can't set URL as source for WM ASF Reader trough graphedit.

Jerislav
Re: How to capture images from a live stream ?
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 11/6/2008 8:06:58 PM
From: "Jerislav"

[Quoted Text]
> do, because you can't set URL as source for WM ASF Reader
> trough graphedit.

Sure you can: File -> Render URL. It works as long as your
URL protocol is one of the WindowsMedia protocola or your
protocol is HTTP but the URL ends with one of the
WindowsMedia file extensions.

Anyway, depending on the kind of processing the OP wants to
perform on the images and the format he wants them in, the
easiest way may not be to use DirectShow but to use the
WMReader object in the WMF runtime.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: How to capture images from a live stream ?
buddhikasgj 11/7/2008 4:41:00 AM

[Quoted Text]
> Sure you can: File -> Render URL. It works as long as your
> URL protocol is one of the WindowsMedia protocola or your
> protocol is HTTP but the URL ends with one of the
> WindowsMedia file extensions.
>
> Anyway, depending on the kind of processing the OP wants to
> perform on the images and the format he wants them in, the
> easiest way may not be to use DirectShow but to use the
> WMReader object in the WMF runtime.

Actually what i am need to do is merge 4 parell live streams(ASF streams)
and make a one live stream. here what im going to do is capture images from
each stream and merge them in to a one image and make another stream using
those merged images to broadcast as a live stream again. ( 5 to 10 seconds
delay can be acceptlble between original 4 streams and the final otput
stream). im a newbie for directshow and WMF SDK and looking in to themnthese
days. So can i do this using WMF only. or what is shouk i do?
Re: How to capture images from a live stream ?
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 11/7/2008 9:05:42 PM
From: "buddhikasgj"

[Quoted Text]
> Actually what i am need to do is merge 4 parell live
> streams(ASF streams) and make a one live stream. here
> what im going to do is capture images from each stream
> and merge them in to a one image and make another stream
> using those merged images to broadcast as a live stream
> again. ( 5 to 10 seconds delay can be acceptlble between
> original 4 streams and the final otput stream). im a
> newbie for directshow and WMF SDK and looking in to
> themnthese days. So can i do this using WMF only. or what
> is shouk i do?

You can do it using WMF directly or through DirectShow.
DirectShow will require you to write a custom filter with 4
input pins, which is harder than just using WMF.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: How to capture images from a live stream ?
buddhikasgj 11/9/2008 5:20:07 PM

So as you mentioned earlier it doing WMF sdk. but it is still not clear to
my how to do that using WMF sdk.
1)Can u explain the major mile stones of the path i should go?
2)For have code i developed can read samples from the live stream using
Asynchronous Reader. As each sample is a video frame how can i convert that
sample in to a bitmap in IWMReaderCallback::OnSample method ?

Re: How to capture images from a live stream ?
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 11/10/2008 3:31:58 PM
From: "buddhikasgj"

[Quoted Text]
> So as you mentioned earlier it doing WMF sdk. but it is
> still not clear to my how to do that using WMF sdk.
> 1)Can u explain the major mile stones of the path i
> should go? 2)For have code i developed can read samples
> from the live stream using Asynchronous Reader. As each
> sample is a video frame how can i convert that sample in
> to a bitmap in IWMReaderCallback::OnSample method ?

Use 4 WMReader objects to read the 4 streams, compose the 4
bitmaps and send the composed images to 1 WMWriter
configured to compress them and broadcast them through a
WMNetworkFileSink.

Unless you configure the WMReader's otherwise, they will
decompress the frames and give you bitmaps. The content of
the INSSBuffer will be the bitmap pixels and the
BITMAPINFOHEADER is provided in the WM_MEDIA_TYPE::pbFormat
block of the IWMStreamConfig you can retrieve from the
WMReader's IWMPofile.

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen