Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DSNetwork and MPEG2 source !!

13 views
Skip to first unread message

Yannick

unread,
Oct 11, 2004, 12:31:02 PM10/11/04
to
Hi,
I've been looking around for many weeks now and I still don't know how to
broadcast live video stream. First, I tried WME sdk but it's too slow (10 sec
delay is not real time!). Then I tried directshow and the WM ASF Writer
filter but I didn't succeed to connect the network sink and jeremy noring
told me it would be as slow as the WME.
So I looked at a tailored network filter but this seems to be such a pain in
the ass.
Once again Jeremy Noring told me I used to do something similar with great
result but I haven't found any resources related on the internet so I could
at least start doing something.
So in the last resort, I choose the DSNetwork filter to acheive some kind of
real time videoconference but I'm stuck again and again on the MPEG2 source.
In graphedit I add my webcam capture filter and the DSNetwork sender and it
says it can't find any intermediate filter to connect them !?
What's wrong ?
I'm desperate please help me with details or code samples

enze

unread,
Oct 11, 2004, 1:08:21 PM10/11/04
to
Hello,
did you try the network filters from moonlight/elecard?
this works good and fast !
enze, www.mpegcode.com

"Yannick" <Yan...@discussions.microsoft.com> schrieb im Newsbeitrag
news:F11AB212-4499-4BF9...@microsoft.com...

Thomas Hansen

unread,
Oct 11, 2004, 3:57:26 PM10/11/04
to
As I recall the MPEG-2 multicast sender filter input requires an MPEG-2
Transport Stream (possibly in push mode), and most webcams do not deliver
this. Worst case you need a MPEG-2 video encoder filter and a MPEG-2 ts mux
filter to hook them up. (Have a look at the VideoLAN client
(www.videolan.org), it can stream UDP directly to the DSNetwork receiver
filter, and has a number of muxers etc built in)

Thomas Hansen


"Yannick" <Yan...@discussions.microsoft.com> wrote in message
news:F11AB212-4499-4BF9...@microsoft.com...

Yannick

unread,
Oct 11, 2004, 4:49:17 PM10/11/04
to
thankx for the advice but I need stream and display the webcam picture on my
own
I've already built my own filter graph to capture the webcam stream, record
it on file, display it with text overlay and push it over the network
that's why I need to implement an MPEG-2 push source with the multicast
sender or another source filter with another network sink (home made or third
party)

Jeremy Noring

unread,
Oct 12, 2004, 2:19:28 PM10/12/04
to
> Hi,
> I've been looking around for many weeks now and I still don't know how to
> broadcast live video stream. First, I tried WME sdk but it's too slow (10
> sec
> delay is not real time!). Then I tried directshow and the WM ASF Writer
> filter but I didn't succeed to connect the network sink and jeremy noring
> told me it would be as slow as the WME.
> So I looked at a tailored network filter but this seems to be such a pain
> in
> the ass.

Yannick,
I wish I could send you some code, but unfortunately it's not mine to send
(owned by my company, so that'd be a big no-no on my part). Is your project
commercial or open source?

My recommendation to you is to write a custom rendering filter and a custom
source filter. The rendering filter takes the samples and sends them over
the network. The Source filter picks up the samples and forwards them on
into DirectShow, where you do whatever you want with them.

Unfortunately, writing a filter *is* a pain in the ass the first time
around. However, after you've done one or two, they're actually pretty easy
to crank out.


> Once again Jeremy Noring told me I used to do something similar with great
> result but I haven't found any resources related on the internet so I
> could
> at least start doing something.

I had the exact issues you did--needed < 1 second delay using the windows
media format, but no available stuff worked for me. I stumbled through the
DSNetwork filters for a while (which are utter garbage, I might add), and
finally just started writing my own filter because there really aren't any
other options.

Start with the Ball Sample for the source filter. Read the code line by
line. Instead of generating samples like that code does, in FillBuffer()
you'd receive data off of the network and render it. Also, take a long look
at the section in the DXSDK concerning writing custom and read about the
CSource and CSourceStream base classes. Also, read about CBaseRenderer.

Also, look at this RTP library. It's completely free, and should adapt well
for what you want to do:
http://research.edm.luc.ac.be/jori/jrtplib/jrtplib.html
Before you write any filters, write a simple application to send and receive
dummy data with the RTP library, to get a feel for how it works. So, here's
what you need to write to get this job done:

webcam capture -> Encoder -> CUSTOM RTP RENDER FILTER

Somewhere out on your LAN, you have another computer running a separate
filter graph that looks like so:

CUSTOM RTP SOURCE FILTER -> Decoder -> VMR or Disk or Whatever...

Step by step:
1. Download JRTPLIB (the RTP library)
2. Set up simple client/server app with JRTPLIB to send dummy data (doesn't
matter what the data is)
3. Read all the documentation about writing source filters
4. Read about the following base classes: CSource, CSourceStream, and
CBaseRenderer
5. Read the Ball Source Filter sample in the DXSDK line by line. Make sure
you understand it well. Modify it if that helps you understand it.
6. Read the Dump Filter sample (a rendering filter) line by line. Instead
of writing the samples to a TEXT FILE, make it send the samples out via the
RTP library. This should be easy since you previous wrote a client app, and
nothing is different. Data on the network is just data on the
network--there's nothing special about it, really.
7. Write the source filter.
8. Debug like crazy.
9. Deliver the goods.


> So in the last resort, I choose the DSNetwork filter to acheive some kind
> of
> real time videoconference but I'm stuck again and again on the MPEG2
> source.
> In graphedit I add my webcam capture filter and the DSNetwork sender and
> it
> says it can't find any intermediate filter to connect them !?
> What's wrong ?
> I'm desperate please help me with details or code samples

I personally wouldn't bother with the DSNetwork sample. It's convoluted,
difficult to understand, and complicated. It also doesn't work very well.
I would strongly urge you to read the Ball Source filter carefully, read the
documentation concerning custom filter development, and start writing a pair
of filters to send and receive data. It's really the only option available
to developers that doesn't suck.

Sorry to be the bearer of bad news, but....DirectShow doesn't have a very
friendly learning curve.

Good luck--feel free to email me (k i d j a n @ y a h o o d o t c o m) with
questions. Cheers.

--
Where am I going?
And why am I in this handbasket?


0 new messages