directshow and windows format for broadcast ?
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
directshow and windows format for broadcast ?

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
Yannick
Guest





Posted: Fri Oct 08, 2004 1:41 am    Post subject: directshow and windows format for broadcast ? Reply with quote

Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface (WMnetworksink)
Is it a way to publish the stream to a media server or to send it in unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Fri Oct 08, 2004 4:24 am    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

*Shtop!* These codecs are not ready, yet.

The codecs used by WM, even WM10, don't have a low enough latency to
be used as video conference codecs. So there will always be an
unacceptable delay even using the newer WM10 low-latency audio codecs
over most public networks, to make a VC app improbable with WM. Sorry
;-)

Cheers - Neil

On Thu, 7 Oct 2004 14:41:02 -0700, "Yannick"
<Yannick@discussions.microsoft.com> wrote:

Quote:
Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface (WMnetworksink)
Is it a way to publish the stream to a media server or to send it in unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?
Back to top
enze
Guest





Posted: Fri Oct 08, 2004 11:33 am    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

Hello,
look at the sdk sample: DSNetwork
enze, www.mpegcode.com

"Yannick" <Yannick@discussions.microsoft.com> schrieb im Newsbeitrag
news:80DD9DB5-3A46-4E39-8DE8-45BCB84E65A1@microsoft.com...
Quote:
Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface
(WMnetworksink)
Is it a way to publish the stream to a media server or to send it in
unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?


Back to top
Yannick
Guest





Posted: Fri Oct 08, 2004 2:23 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

ok thanks a lot
but let's just say I don't mind to have a 2-3 sec delay because the quality
improvement with WMV9 is awesome over others codec and I need very low
bandwidth stream with good quality
what should I do to use the WMF SDK in conjunction with my DShow filter
graph to send ASF stream over the network ?












"Neil Smith [MVP Digital Media]" wrote:

Quote:
*Shtop!* These codecs are not ready, yet.

The codecs used by WM, even WM10, don't have a low enough latency to
be used as video conference codecs. So there will always be an
unacceptable delay even using the newer WM10 low-latency audio codecs
over most public networks, to make a VC app improbable with WM. Sorry
;-)

Cheers - Neil

On Thu, 7 Oct 2004 14:41:02 -0700, "Yannick"
Yannick@discussions.microsoft.com> wrote:

Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface (WMnetworksink)
Is it a way to publish the stream to a media server or to send it in unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?

Back to top
Yannick
Guest





Posted: Fri Oct 08, 2004 3:55 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

Hi enze
thanks for your reply
it seems DSnetwork filter supports only multicast !
what should I do to have unicast rtp streaming or MMS posting ?


"enze" wrote:

Quote:
Hello,
look at the sdk sample: DSNetwork
enze, www.mpegcode.com

"Yannick" <Yannick@discussions.microsoft.com> schrieb im Newsbeitrag
news:80DD9DB5-3A46-4E39-8DE8-45BCB84E65A1@microsoft.com...
Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface
(WMnetworksink)
Is it a way to publish the stream to a media server or to send it in
unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?



Back to top
Jeremy Noring
Guest





Posted: Fri Oct 08, 2004 11:57 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

"Yannick" <Yannick@discussions.microsoft.com> wrote in message
news:80DD9DB5-3A46-4E39-8DE8-45BCB84E65A1@microsoft.com...
Quote:
Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface
(WMnetworksink)
Is it a way to publish the stream to a media server or to send it in
unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?


Streaming WMV9 in real time is a difficult task, as all of Microsoft's
components buffer unnecessary amounts of data. I have gotten WMV9 streaming
with less than 200 ms latency around the company LAN, but it involved
writing a custom render filter to send out samples, and a custom source
filter to receive samples, as well as adapting an RTP library for use in
both of those filters. None of the pre-built MSFT stuff will work for video
conferencing, which is ridiculous (huge oversight on MSFT's part, as it is
very possible, and the quality is exceptional) but also just the way it is.

You can get the WM ASF Writer to "stream" data out via http (see the
WMFSDK--configuring a network sink--for more information) but it's just as
slow as the encoder is. Basically, the bottom line is that if you desire
real-time, or close to it, forget about using any of the pre-built
components, because they're not going to work for you.

To create all these filters, look at the Ball filter sample in the
DXSDK--instead of generating a sample in fill buffer, implement a custom
network library that pulls samples off of the network and feeds them onto an
instance of the DMO decoder filter. To do the render sample, you need to
simply send the sample out via custom network interface instead of rendering
it. Also, keep in mind that the decoder always expects the first frame to
be a keyframe--otherwise, it typically chokes.

--
Where am I going?
And why am I in this handbasket?
Back to top
Yannick
Guest





Posted: Sat Oct 09, 2004 3:09 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

thank you very much Jeremy
it's a lot clearer
but I realize it's also a lot difficult
I don't have knowledge and time to create the network filter (sink and
source) and I still don't know how to extract the stream from the WM asf
writer filter without passing through an ASF file on disk ?
you're saying that you already did it
is your code available as open source or third party filter ?
any help appreciated !

"Jeremy Noring" wrote:

Quote:
"Yannick" <Yannick@discussions.microsoft.com> wrote in message
news:80DD9DB5-3A46-4E39-8DE8-45BCB84E65A1@microsoft.com...
Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface
(WMnetworksink)
Is it a way to publish the stream to a media server or to send it in
unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?


Streaming WMV9 in real time is a difficult task, as all of Microsoft's
components buffer unnecessary amounts of data. I have gotten WMV9 streaming
with less than 200 ms latency around the company LAN, but it involved
writing a custom render filter to send out samples, and a custom source
filter to receive samples, as well as adapting an RTP library for use in
both of those filters. None of the pre-built MSFT stuff will work for video
conferencing, which is ridiculous (huge oversight on MSFT's part, as it is
very possible, and the quality is exceptional) but also just the way it is.

You can get the WM ASF Writer to "stream" data out via http (see the
WMFSDK--configuring a network sink--for more information) but it's just as
slow as the encoder is. Basically, the bottom line is that if you desire
real-time, or close to it, forget about using any of the pre-built
components, because they're not going to work for you.

To create all these filters, look at the Ball filter sample in the
DXSDK--instead of generating a sample in fill buffer, implement a custom
network library that pulls samples off of the network and feeds them onto an
instance of the DMO decoder filter. To do the render sample, you need to
simply send the sample out via custom network interface instead of rendering
it. Also, keep in mind that the decoder always expects the first frame to
be a keyframe--otherwise, it typically chokes.

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


Back to top
Jeremy Noring
Guest





Posted: Tue Oct 12, 2004 10:26 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

"Yannick" <Yannick@discussions.microsoft.com> wrote in message
news:DC022E82-57AA-4ACE-AF6F-5C6FB05EA0D3@microsoft.com...
Quote:
thank you very much Jeremy
it's a lot clearer
but I realize it's also a lot difficult
I don't have knowledge and time to create the network filter (sink and
source) and I still don't know how to extract the stream from the WM asf
writer filter without passing through an ASF file on disk ?
you're saying that you already did it
is your code available as open source or third party filter ?
any help appreciated !


Sorry, it's code I wrote on the job, so it's not open source or even
technically "mine" to give out.

Is your project open source, or are you doing commercial work?

--
Where am I going?
And why am I in this handbasket?
Back to top
Yannick
Guest





Posted: Wed Oct 13, 2004 1:25 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

both
I was introduced to directshow for work and now I'm trying to write a small
DS app on my own because I and many of my friends complain about the poor
quality of messenger videoconferencing
by now I just worked with standard filters and I'm looking for as many info
as possibleon how to create filters that connect to standard filters
spec of tailored filter : take a captured live stream, encode with WMV
inside ASF format, send in RTP packet (or HTTP if fast enough) and of course
the receiver side that concatenate the RTP packets into a stream decode and
render.
I don't know where to start from since I did find no other project/sample
like this on Internet
that's why I'm so interested in yours and why I'm requesting (begging ? ;) )
every info you could possibly give me
in the last resort if your code is for sale I might be interested too






















"Jeremy Noring" wrote:

Quote:
"Yannick" <Yannick@discussions.microsoft.com> wrote in message
news:DC022E82-57AA-4ACE-AF6F-5C6FB05EA0D3@microsoft.com...
thank you very much Jeremy
it's a lot clearer
but I realize it's also a lot difficult
I don't have knowledge and time to create the network filter (sink and
source) and I still don't know how to extract the stream from the WM asf
writer filter without passing through an ASF file on disk ?
you're saying that you already did it
is your code available as open source or third party filter ?
any help appreciated !


Sorry, it's code I wrote on the job, so it's not open source or even
technically "mine" to give out.

Is your project open source, or are you doing commercial work?

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


Back to top
Jeremy Noring
Guest





Posted: Thu Oct 14, 2004 8:10 pm    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

"Yannick" <Yannick@discussions.microsoft.com> wrote in message
news:706B847C-A433-4143-BF19-9228A0B01296@microsoft.com...
Quote:
both
I was introduced to directshow for work and now I'm trying to write a
small
DS app on my own because I and many of my friends complain about the poor
quality of messenger videoconferencing
by now I just worked with standard filters and I'm looking for as many
info
as possibleon how to create filters that connect to standard filters
spec of tailored filter : take a captured live stream, encode with WMV
inside ASF format, send in RTP packet (or HTTP if fast enough) and of
course
the receiver side that concatenate the RTP packets into a stream decode
and
render.

I think you could get away with HTTP--and truthfully, with WMV9 (and the
same will hold true with MPEG4 and H.264, I think--but someone may have
better input on those codecs as I'm not very familiar with either of them
beyond the basics), you're going to have to make sure the data gets there.

While streaming media has traditionally been based on UDP (RTP on top of UDP
has been the foundation for quite some time), as compression technology
improves there's a distinct tradeoff: the more you compress something, the
less loss tolerant it is. In other words, as your compression improves, the
event of loosing some compressed data becomes increasingly difficult to deal
with.

In my experience, WMV9 is *very* intolerant to data loss, so UDP ends up
being problematic unless retransmit and/or lapses in performance are
tolerable. In fact, I don't think one can really make a video conferencing
solution on a lossy IP-based network using the more advanced codecs, simply
because loss rates are too high for the codec to function properly, and the
time it takes for a re-transmit over the internet pretty much screws hopes
for less than 200 ms of delay. It's possible to get a decent quality CIF
stream @ 150 kb/sec in WMV9--and VGA @ 300kb/sec isn't too shabby at
all--but in the event of data loss, one has to take some fairly radical
steps if real-time performance is the business requirement (IE: wait for
next keyframe, or retransmit, both of which have serious performance
implications).


Quote:
I don't know where to start from since I did find no other project/sample
like this on Internet
that's why I'm so interested in yours and why I'm requesting (begging ?
;) )
every info you could possibly give me
in the last resort if your code is for sale I might be interested too

In my opinion, the reason you don't find a lot of video conferencing
solutions is because the Internet itself is insufficient to facilitate
real-time transport of video at any respectable quality. Audio is possible
because reconstructing samples is possible, and the data rate is
significantly lower--a good audio stream is a tenth of the size of a good
video stream. The Internet is a lossy network that has very little respect
for the timeliness of delivery, which makes it a serious obstacle for
real-time transport of video streams. If you use an older codec that's more
loss tolerant, bandwidth is a serious issue since the typical broadband user
has an upload to the internet of less than ~300 kbit/sec. If you use a
newer codec to achieve greater compression, data loss is a serious issue.
It's a catch-22 that a lot of people haven't quite accepted yet. It's also
the reason the WMP buffers a ridiculous amount of data prior to displaying
it.

So, can you tell me a bit more about your project? Is your intent to do
streaming over the Internet, or just locally?

--
Where am I going?
And why am I in this handbasket?
Back to top
Yannick
Guest





Posted: Fri Oct 15, 2004 12:29 am    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

this is just amazing how cristal clear are your explanations on this topic
thank you so much
I've been roaming around for such a long time to obtain just a few hints
you should really think of righting a book about directshow and its
applications ! ;)
well you answered the question I was about to ask you about performance
issues over Internet
as you guessed my project is intented to work over Internet with basic DSL
connection (D1024K/U256K or U512)
I'll possibly give a try to some commercial solutions using H264 codec to
evaluate the performance impact of data loss while streaming over Internet
but your allegation are not very encouraging
maybe the solution is to introduce a small buffer of 200-300 ms that would
reduce or even suppress data retransmit impact on the streaming
now that you gave me all theorical basis to determine the right way to do it
I need to dive into it and gather all technical information available on WMV,
ASF, RTP, HTTP, streaming, ...
if you could redirect to online resources about this topics it would be the
cherry on the cake (it's a french expression ;)
thanks again for every thing
"Jeremy Noring" wrote:

Quote:
"Yannick" <Yannick@discussions.microsoft.com> wrote in message
news:706B847C-A433-4143-BF19-9228A0B01296@microsoft.com...
both
I was introduced to directshow for work and now I'm trying to write a
small
DS app on my own because I and many of my friends complain about the poor
quality of messenger videoconferencing
by now I just worked with standard filters and I'm looking for as many
info
as possibleon how to create filters that connect to standard filters
spec of tailored filter : take a captured live stream, encode with WMV
inside ASF format, send in RTP packet (or HTTP if fast enough) and of
course
the receiver side that concatenate the RTP packets into a stream decode
and
render.

I think you could get away with HTTP--and truthfully, with WMV9 (and the
same will hold true with MPEG4 and H.264, I think--but someone may have
better input on those codecs as I'm not very familiar with either of them
beyond the basics), you're going to have to make sure the data gets there.

While streaming media has traditionally been based on UDP (RTP on top of UDP
has been the foundation for quite some time), as compression technology
improves there's a distinct tradeoff: the more you compress something, the
less loss tolerant it is. In other words, as your compression improves, the
event of loosing some compressed data becomes increasingly difficult to deal
with.

In my experience, WMV9 is *very* intolerant to data loss, so UDP ends up
being problematic unless retransmit and/or lapses in performance are
tolerable. In fact, I don't think one can really make a video conferencing
solution on a lossy IP-based network using the more advanced codecs, simply
because loss rates are too high for the codec to function properly, and the
time it takes for a re-transmit over the internet pretty much screws hopes
for less than 200 ms of delay. It's possible to get a decent quality CIF
stream @ 150 kb/sec in WMV9--and VGA @ 300kb/sec isn't too shabby at
all--but in the event of data loss, one has to take some fairly radical
steps if real-time performance is the business requirement (IE: wait for
next keyframe, or retransmit, both of which have serious performance
implications).


I don't know where to start from since I did find no other project/sample
like this on Internet
that's why I'm so interested in yours and why I'm requesting (begging ?
;) )
every info you could possibly give me
in the last resort if your code is for sale I might be interested too

In my opinion, the reason you don't find a lot of video conferencing
solutions is because the Internet itself is insufficient to facilitate
real-time transport of video at any respectable quality. Audio is possible
because reconstructing samples is possible, and the data rate is
significantly lower--a good audio stream is a tenth of the size of a good
video stream. The Internet is a lossy network that has very little respect
for the timeliness of delivery, which makes it a serious obstacle for
real-time transport of video streams. If you use an older codec that's more
loss tolerant, bandwidth is a serious issue since the typical broadband user
has an upload to the internet of less than ~300 kbit/sec. If you use a
newer codec to achieve greater compression, data loss is a serious issue.
It's a catch-22 that a lot of people haven't quite accepted yet. It's also
the reason the WMP buffers a ridiculous amount of data prior to displaying
it.

So, can you tell me a bit more about your project? Is your intent to do
streaming over the Internet, or just locally?

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


Back to top
Jeremy Noring
Guest





Posted: Sat Oct 16, 2004 12:15 am    Post subject: Re: directshow and windows format for broadcast ? Reply with quote

Vous etes Francais? =) J'ai habite dans Montpellier l'annee
derniere...mon francais n'est pas le meilleur, mais j'essaie... anyways:

It very well may be that there's a codec that's more conductive to video
conferencing--I sincerely hope this is the case, because other than that
video conferencing hasn't really improved in the last five or six years. On
a LAN, I think it'd be possible to make really high quality video
conferencing, so you might start there and learn some of the issues, and
then focus on a lossy network. Also, if you want to emulate a "lossy"
network, send the stream over wireless or powerline network interfaces--both
of them are lossy, garbage networks that don't reliably deliver data. Good
CAT5, however, is obscenely reliable--assuming you don't have saturation
issues.

I don't have many other resources; most of this is stuff I learned on my own
the hard way. I'd recommend playing around with that RTP library, and maybe
examining the codecs in more detail. What you really want out of a codec
for video conferencing are the following:

1. Good quality--this is a problem if you want loss tolerance, of course
2. Low bitrate--this is a problem if you want loss tolerance
3. Loss tolerance--you need to be able to drop a frame and have the
rendering continue as scheduled.

....You'll probably have to find something in the middle, as the newer codecs
meet the first two requirements with ease, but fail miserably with the
third.

Quote:
maybe the solution is to introduce a small buffer of 200-300 ms that would
reduce or even suppress data retransmit impact on the streaming

Keep in mind that the encoding, transportation, and decoding process of some
of the newer codecs can take ~100 ms with ease, especially if network
conditions are sketchy.

Cheers, and hopefully you'll have some nice filters made up in a while. ;)
jer

--
Where am I going?
And why am I in this handbasket?
Back to top
becapture.com
Guest





Posted: Sun Mar 06, 2005 1:23 am    Post subject: RE: directshow and windows format for broadcast ? Reply with quote

Hello all

Visit our site at www.becapture.com
We have applications in C++ , Dll , CSharp , VB that broadcast and receive
UDP And TCP Over LAN in MPEG2 using DSNetwork
We broadcast MPEG2 program Stream and MPEG2 transport stream.

I am sure you will find exactly what you need in our site.

Thanks
becapture.com


"Yannick" wrote:

Quote:
Hi,
I'm completely confused
I want to build a simple videoconference app using directshow
by now I've build a filter graph that capture live stream from a webcam,
grab sample, record asf file using WM ASF Writer and now I'm stuck
I have no idea how to send the stream over the network
First I've tried windows media encoder to capture the stream and send data
over the network (HTTP broadcast mode) but it's too slow
I thought I could use WMF in conjunction with directshow but the WM asf
filter (WMF wrapper) doesn't implement the network interface (WMnetworksink)
Is it a way to publish the stream to a media server or to send it in unicast
UDP/RTP mode using WMF or another filter ?
In the last resort, could you give some information on how to create a
network sink/source filter from scratch if none exists ?
Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB