IPTV patch for MediaPortal 0.2.3.0 (1 Viewer)

stylistic

Portal Member
October 7, 2007
16
0
Home Country
Croatia Croatia
Thanks RUS for amazing plugin!
I'm having one problem, exactly the same situation as AIRJ had few pages back. WMP and VLC run stream normally, but when I run MP, I get bad FPS's (jumping from 1 to 60).

When I render url from Graphedit I get same structure as AIRJ had. I press play and video looks normal. Then I connect everything as shown in your graph, using Cyberlink MPEG Muxer, press play and I get same bad image as in MP. While running that, I also checked my CPU and it was running at 8%, so CPU is not a problem.

I'm ussing power DVD with MpgMux.ax version 5.0.1307. I've tried to copy lower version from AIRJ in system32 folder, but then my MP can't ever run TV. Can it be, that I need complete version of Power DVD with lower MpgMux.ax or is enough just to change that file in system32 folder?

I've spent weeks in trying to make this run and I'm out of ideas... Whatever you can do to help, would be much appreciated!

These are my CaptureCardDefinitions setting...

<filter cat="tvtuner" name="Elecard NWSource-Plus" checkdevice="false"/>
<filter cat="demuxer" name="Elecard MPEG Push Demultiplexer" checkdevice="false"/>
<filter cat="capture" name="CyberLink MPEG Muxer" checkdevice="false"/>

Thanks!
 

7wondersx

Portal Member
March 12, 2008
7
0
Home Country
Sweden Sweden
Now I am 95% sure that its the MPEG-2 Demultiplexer (mpg2splt.ax) that is preventing the AC3 sound from getting through. I replaced it with Cyberlink MPEG Splitter(scramble) in graphedit and it worked fine.

Now I have figured out how to delete mpgsplt.ax from system32 folder as a test to see if another filter is used instead. Unfortunately its not, so does anyone have any suggestions on how to replace mpeg-2 demultiplexer with cyberlink mpeg splitter so that I dont get the error below i.e. point MP in the right direction for the cyberlink input pin???

2008-03-16 21:00:24.340029 [ERROR][6]: mpeg2:FAILED to create mpeg2 demuxer
2008-03-16 21:00:24.762853 [ERROR][6]: SinkGraph:FAILED could not find mpeg2 demux input pin
2008-03-16 21:00:33.438079 [ERROR][6]: mpeg2:FAILED to render mpeg2demux video out:0x80004003
 

24RUS

Portal Member
April 9, 2007
44
7
Moscow
Home Country
Russian Federation Russian Federation
Can it be, that I need complete version of Power DVD with lower MpgMux.ax or is enough just to change that file in system32 folder?
To be sure of the proper reinstalling MpgMux.ax I would suggest the following actions:
1. regsvr32 /u C:\WINDOWS\SYSTEM32\MpgMux.ax
2. reboot
3. replace C:\WINDOWS\SYSTEM32\MpgMux.ax with the same file of another version.
4. regsvr32 C:\WINDOWS\SYSTEM32\MpgMux.ax
5. reboot

Now I have figured out how to delete mpgsplt.ax from system32 folder as a test to see if another filter is used instead. Unfortunately its not, so does anyone have any suggestions on how to replace mpeg-2 demultiplexer with cyberlink mpeg splitter so that I dont get the error below i.e. point MP in the right direction for the cyberlink input pin???
Point is that the "MPEG Splitter" filter is built into the Mediaportal code too deeply. A specific functionality of the "MPEG Splitter" is used to create the input/output pins on the fly e.t.c. Even if you found an alternative to mpgsplt.ax, there would be a little chance that the rest Mediaportal code will perform a specific AC3 pin handling. The solution is to modify very core classes of Mediaportal (like SinkGraphEx) - not feasible, IMHO.
But I can suggest a workaround: try to insert some direcshow filter, converting AC3 to usual stereo, before "MPEG Splitter". If it does the trick, add this filter to CaptureCardDefinitions.xml, connected correspondingly.

Good luck.
 

stylistic

Portal Member
October 7, 2007
16
0
Home Country
Croatia Croatia
IT WORKS!!! :)

Thanks 24RUS!
I completely forgot to unregister it in regsvr32. FPS are ok now, even thou few channels don't have sound, but compared to what I had before, this is great step forward.

Thanks again! ;)
 

7wondersx

Portal Member
March 12, 2008
7
0
Home Country
Sweden Sweden
IT WORKS!!!

Thanks 24RUS!
I completely forgot to unregister it in regsvr32. FPS are ok now, even thou few channels don't have sound, but compared to what I had before, this is great step forward.

Thanks again!

See if the channels that dont have sound are ac3 using remote connection in graphedit. If they are and you come up with a solution (such as the one 24RUS has suggested above which im working on now) let us know and I will do vice versa if I figure it out ;)
 

7wondersx

Portal Member
March 12, 2008
7
0
Home Country
Sweden Sweden
hello again :)

OK, now I can admit that I am officially lost!

When I run the standard set up through MP my graph comes up like the first image below.

When I render URL through graphedit it comes up like the second image. Note: the elecard push is still giving out regular audio as well so when i hit the play button there is an echo due to the 2 tracks. Removing one connection puts it right so I can hear with either track, regular audio or ac3.

Now, when I try to do the connections through CaptureCardDefinitions.xml so that elecard push uses the regular audio instead to send to muxer, the MP logs always state the below text and the graphs always show as though I had never manually entered the connections myself.

2008-03-18 01:49:08.856864 [Info.][6]: SinkGraphEx: Adding configured pin connections...
2008-03-18 01:49:08.857841 [Info.][6]: SinkGraphEx: Connecting <Elecard MPEG Push Demultiplexer>:0 with <CyberLink MPEG Muxer>:1
2008-03-18 01:49:08.862723 [Info.][6]: SinkGraphEx: Found pin: <1> <System.__ComObject>
2008-03-18 01:49:08.862723 [Info.][6]: SinkGraphEx: Connecting <Elecard MPEG Push Demultiplexer>:1 with <CyberLink MPEG Muxer>:0
2008-03-18 01:49:08.863700 [Info.][6]: SinkGraphEx: Found pin: <0> <System.__ComObject>
2008-03-18 01:49:08.863700 [Info.][6]: SinkGraphEx: Adding configured pin connections...DONE

In other words, how can I force the regular audio pin to connect to cyberlink mpeg muxer instead of the ac3 pin and if thats not possible where in the chain can I change the ac3 to regular audio.

Here is what my .xml looks like and I think its just the question marks I need to fill in to get this working or am I way off the mark??

<filters>
<filter cat="tvtuner" name="Elecard NWSource-Plus" checkdevice="false"></filter>
<filter cat="demuxer" name="Elecard MPEG Push Demultiplexer" checkdevice="false"></filter>
<filter cat="capture" name="CyberLink MPEG Muxer" checkdevice="false"></filter>
</filters>
<connections>
<connection sourcefilter="demuxer" sourcepin="?" sinkfilter="capture" sinkpin="?"></connection>
<connection sourcefilter="demuxer" sourcepin="?" sinkfilter="capture" sinkpin="?"></connection>
</connections>

Any help would be very, very much appreciated!
 

Attachments

  • Thru_MP_with_AC3_not_working.jpg
    Thru_MP_with_AC3_not_working.jpg
    46.7 KB
  • thru_render_url_getting_2_streams.jpg
    thru_render_url_getting_2_streams.jpg
    32.9 KB

24RUS

Portal Member
April 9, 2007
44
7
Moscow
Home Country
Russian Federation Russian Federation
Here is what my .xml looks like and I think its just the question marks I need to fill in to get this working or am I way off the mark??
You are pretty ahead in digging the Mediaportal guts. :cool:.
The output pins of the "Push Demultiplexer" filter appear in a half a second after its input pin has been connected to "NWSource-Plus". Since that, this patch doesn't use the "connections" tag from CaptureCardDefinition.xml. Instead of this "early" connection, the patch reconnects these pins dynamically on each TuneChannel() call.
To make the second audio pin of the "Push Demultiplexer" filter more preferable to connect to "Cyberlink MPEG Muxer", some changes in the source code need to be done (changes are shown in the bold typeface):

***** SinkGraph.cs
for (int i = 0; i < 40; i++)
{
System.Threading.Thread.Sleep(100);
int hr2 = _captureGraphBuilderInterface.FindPin(_filterDemux er, PinDirection.Output, null, MediaType.Video, false, 0, out oPin);
if (hr2 == 0) oPin.Disconnect();
int hr3 = _captureGraphBuilderInterface.FindPin(_filterDemux er, PinDirection.Output, null, MediaType.Audio, false, 1/*0*/, out oPin);
if (hr3 != 0) hr3 = _captureGraphBuilderInterface.FindPin(_filterDemux er, PinDirection.Output, null, MediaType.Audio, false, 0, out oPin);
if (hr3 == 0) oPin.Disconnect();
if ((hr2 == 0) && (hr3 == 0)) break;
}
hr = _captureGraphBuilderInterface.RenderStream(null, MediaType.Video, _filterDemuxer, null, _filterCapture);
DsError.ThrowExceptionForHR(hr);
hr = _captureGraphBuilderInterface.RenderStream(null, MediaType.Audio, oPin /*_filterDemuxer*/, null, _filterCapture);
DsError.ThrowExceptionForHR(hr);
*******

It's a high time to compile Mediaportal from sources! It's easy. Good luck!
 

stylistic

Portal Member
October 7, 2007
16
0
Home Country
Croatia Croatia
IT WORKS!!!

Thanks 24RUS!
I completely forgot to unregister it in regsvr32. FPS are ok now, even thou few channels don't have sound, but compared to what I had before, this is great step forward.

Thanks again!

See if the channels that dont have sound are ac3 using remote connection in graphedit. If they are and you come up with a solution (such as the one 24RUS has suggested above which im working on now) let us know and I will do vice versa if I figure it out ;)

I've checked with graphedit and all channels have same structure - none using remote connection.

Now I'm getting very strange problem. Every time I run MP, channels are acting differently. Only few channels are always running smoothly. Most of them are causing MP to freeze, showing black screen, having delays with sound or no sound at all... etc. Funny thing is, that they act differently every time when I run MP. For instance, one channel could work perfectly for hours, but when I restart MP, same one wouldn't even start or could cause one of above problems...

When I render them in graphedit, all have same settings. Don't know where to go from here....
 

7wondersx

Portal Member
March 12, 2008
7
0
Home Country
Sweden Sweden
I've checked with graphedit and all channels have same structure - none using remote connection.

Now I'm getting very strange problem. Every time I run MP, channels are acting differently. Only few channels are always running smoothly. Most of them are causing MP to freeze, showing black screen, having delays with sound or no sound at all... etc. Funny thing is, that they act differently every time when I run MP. For instance, one channel could work perfectly for hours, but when I restart MP, same one wouldn't even start or could cause one of above problems...

When I render them in graphedit, all have same settings. Don't know where to go from here....

LOL, thats funny stylistic because im having the same issues as well. I think ive tracked it down to something to do with source ports. When I open up a channel that has the following characteristics it works fine:

User Datagram Protocol, Src Port: 50000 (50000), Dst Port: personal-agent (5555)

But whenever a channel opens with any other source port such as these it all starts going jumpy in lots of different ways:

User Datagram Protocol, Src Port: cplscrambler-in (1087), Dst Port: personal-agent (5555)
User Datagram Protocol, Src Port: kiosk (1061), Dst Port: personal-agent (5555)

I got these using wireshark. I highly recommend it.

So, as well as figuring out the ac3 issue, I am now trying to figure out the problems with these source ports. Any ideas on that 24RUS??

BTW: A big :D for all the help your providing here and I found a little program called ProgDVB along my travels which is helping me diagnose a lot of this as well as finding some channels that I never picked up on b4. It lets me do exactly what Im trying to acheive with your MP patch (i.e. choose regular audio instead of ac3 for any channel) but also suffers from the same source port issue!!!


It's a high time to compile Mediaportal from sources! It's easy.

Yeah right! :)
 

24RUS

Portal Member
April 9, 2007
44
7
Moscow
Home Country
Russian Federation Russian Federation
So, as well as figuring out the ac3 issue, I am now trying to figure out the problems with these source ports. Any ideas on that 24RUS??
AFAIN, in an UDP multicast session, source/destination address/ports of incoming (to HTPC) UDP packets are fixed for each channel. A source address corresponds to a place in a TCP/IP-network where an IPTV server resides. The destination address is the address of the multicast group (224.*.*.*). The source port is either statically preconfigured in an IPTV server (e.g. 50000), or is being chosen dinamically for each connection from a pool 1025-65534 of free udp sockets in an IPTV server OS (e.g. 1087). The distanation port is fixed for each channel (e.g. in 224.1.2.3:1234 the number of the destination port is 1234).
If you see a stable correspondence between the source port number and the picture quality, ask your IPTV provider about specificity of the IPTV server for this particular channel. Maybe servers sending UDP packets with differrent source ports are built on different OS'es? Also, try to find out a link performance between you and these servers. Pay extra attantion to timing, bandwidth and OS performance characteristics.
 

Users who are viewing this thread

Top Bottom