Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to playback live mpeg2 stream?

How to playback live mpeg2 stream?

How to playback live mpeg2 stream?

I have one "push" filter(based on the ball example) to receive the multicast stream from network. I connected it to the Microsoft's mpeg-2 demultiplexer and config the demux as transport mode. When start running, the video windows was created, but no active picture any more.
I guess it's cause from that the demux was not feeded valid data. Does someone meet this problem and give me some help?


RE: How to playback live mpeg2 stream?

I am interested in doing a similar thing. I might be able to help. But I haven't figured out how to use a push stream to receive streaming media. Can you direct me to the ball example or show me the code that you wrote .for the push filter.

RE: How to playback live mpeg2 stream?

maybe you could check the PID mapping of the output pin you've created on the demux filter. Another cause of trouble could be the format of datas on this pin (Elementary stream ??)

RE: How to playback live mpeg2 stream?

I meet this question too.
It's because that the Microsoft's mpeg-2 demultiplexer
did not support the live stream.
you can use the Elecard Mpeg2 decoder and demultiplexer.
I use it and my application is working well now.

you can download it from www.elecard.com

RE: How to playback live mpeg2 stream?

Dear Aresding
    Thank you for you help and advice.

    I want to playback the live transport_stream multicasted on the network. At first, I made a source_filter which support IFileSourceFilter interface, it can work with Elecard's demux and decoder, but the stream_feeding was not perfect. So I want to make a push_mode source filter.

    Did you means that in your application the Elecard's demultiplexer can work in push mode? And connected with a live_pushmode_sourcefilter?

    Will you give some details about it?

RE: How to playback live mpeg2 stream?

Elecard has two Demultiplexers - one works in pull mode with Async Source and Elecard's SyncToAsync Filters, and another in push mode and can be used with something like bouncing_ball_based_MPEG_TS_push_filter.
In order to use PushMode Demultiplexer you must connect it to your source, then play graph for a couple seconds (and send real data to Demuxer), Demuxer will find all streams in TS and will create correct output pins for them, then stop graph and render needed output pins on the Demuxer, and start play again.

RE: How to playback live mpeg2 stream?

If I'm not wrong,The elecard's filters is worked in push mode.but they can used in pull mode too.

RE: How to playback live mpeg2 stream?

Dear Posdnya an Aresding:

    According to yours advices, I tryed to connect my bouncing_ball_based_push__source_filter with Elecard's demultiplexer. And the push_soucce _filter support the MediaType as MEDIATYPE_Stream & MEDIASUBTYPE_NULL.

    But the connection was failed, cause the Elecard_demultiplexer's input_pin didn't provide the IID_IMemInputPin interface.

    Did I use the wrong demultiplexer or provide wrong MediaType? And where can i download the Elecard's push_mode_demultiplexer?

Thank Your!
Bruce An 2002/3/28

RE: How to playback live mpeg2 stream?

How did you get the pin?
I use codes as follow:
IPin *pInputPin;
if (FAILED(hr)) {
    MessageBox(NULL,"FindPin error","",MB_OK);
    return hr;


and it worked fine;

RE: How to playback live mpeg2 stream?

Dear Aresding:
    The following is my testing code. When connect the pins, it still return error as 0x80004002. I think the error is return by Elecad_demultiplexer's inputPin, because it didn't support the IMemInputPin interface, Do you think so? Are you sure your source filter is a push mode filter?

Bruce An. mailto: brucean@szonline.net

    // create the push_mode_source_filter
    hr = CoCreateInstance(CLSID_BouncingBall,
    hr = pGB->AddFilter(pBouncintBall, L"Bouncing Ball");

    IPin*    pSourceOutputPin;
    pBouncintBall->FindPin(L"1", &pSourceOutputPin);

    // Create the demux filter
    hr = CoCreateInstance(CLSID_ElecardDemultiplexer,
    pGB->AddFilter(pMpeg2Splitter, L"Mpeg-2 demultiplexer");

    IPin *pInputPin;
    hr = pMpeg2Splitter->FindPin(L"Input",&pInputPin);

    CMediaType mt;
    hr = pSourceOutputPin->Connect(pInputPin,&mt);

RE: How to playback live mpeg2 stream?

Sorry,my source filter is a pull mode filter

RE: How to playback live mpeg2 stream?

Dear Aresding:

    Thank you for your help and kindness.
    I have finished my job with MicroSoft's mpeg-2 demultiplxer.

Best Regards
Bruce An

RE: How to playback live mpeg2 stream?

Elecard finished demo application, which demonstrate live mpeg2 playback.
You may download it from http://www.elecard.com/download/
Moonlight UDP Streaming Application
It consists of server and client parts, and can work in unicast/multicast mode.
Source code is available with Elecard MPEG2 Video Decoder SDK

RE: How to playback live mpeg2 stream?

I am new to directshow.
The RenderFile() function returns a (0x80040216) error message for the following method:
hr = graph->RenderFile (filename,NULL);

It works fine if I hard code the path like
hr = graph->RenderFile (L"c:\\vmsencoding1\\movies\\stage\\10404.mpg", 0);

I tried to declare filename as  LPOLESTR ,LPCWSTR ,wchar_t*,
_TCHAR* and tried various castings too withourt any development.

Awaiting for a reply as this is a bit Urgent.

RE: How to playback live mpeg2 stream?

Can some one tell me why the links on elecard site always busy i am trying to download netasync_01.zip and it is always busy i haqve been tring for about 2 days

RE: How to playback live mpeg2 stream?

Hi DirectShow,
   Please send me your solution of MS mpeg-2 demultiplexer. Thanks.


RE: How to playback live mpeg2 stream?

Heaven_7 , netasync_01 have many bugs

RE: How to playback live mpeg2 stream?

posdnya, can you tell me where can i get source code  of
Elecard's MPEG2 Decoder, i find anyplace in this site, but failed.

RE: How to playback live mpeg2 stream?

you can't find source code of Elecard MPEG2 Decoder, because Elecard do not publish or sell it. It is licensed only in binary form

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close