MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » Archive » MyTV - Engine 0.2


Reply
 
LinkBack Thread Tools Display Modes
Old 2007-12-08, 20:44   #1 (permalink)
Portal Member
 
Join Date: Apr 2007
Location: Moscow
Posts: 44
Thanks: 0
Thanked 7 Times in 5 Posts

Country:


Lightbulb IPTV patch for MediaPortal 0.2.3.0

Hi All!

Finally I’ve managed adding IPTV support to the MediaPortal. It’s based on a “fake” IPTV tuner card, which receives RTSP/UDP/TCP unicast/multicast MPEG-2 traffic and feeds it to the rest MediaPortal directshow filters. Patch was checked on Windows Vista Home Premium and Windows XP MCE 2005.
Here comes the howto.
1. Download and install CyberLink PowerDVD (trial) from http://www.cyberlink.com. Actually, we need only “CyberLink MPEG Muxer” direct show filter, therefore any software, containing this filter will do.
2. Download and install http://www.elecard.com/products/prod...ecoder-plugin/. It has trial period and costs only $17.50 (thanks to Christmas discount).
3. Check if Windows Media Player can play any of you IPTV channel (menu File – Open URL - elecard://225.1.1.1:1234/udp). Replace 225.1.1.1:1234 with IPORT of your IPTV channel. GraphEdit could help too (menu File - Render URL, elecard://225.1.1.1:1234/udp, menu Graph - Play).
4. Install MediaPortal 0.2.3.0. Overwrite files in MediaPortal installation folder with the files from the supplied archive MP-0.2.3.0-iptv.zip (mind the directories in the archive).
5. Insert the fragment:
<capturecard commercialname="IPTV BuiltIn Card" capturename="IPTV BuiltIn" devid="IPTV BuiltIn">
<capabilities tv="true" radio="false" mpeg2="true" mce="false" sw="false" bda="false"/>
<tv>
<interface cat="capture" video="" audio="" mpeg2="0"/>
<filters>
<filter cat="tvtuner" name="Elecard NWSource-Plus" checkdevice="false"/>
<filter cat="demuxer" name="MainConcept MPEG Push Demultiplexer" checkdevice="false"/>
<filter cat="capture" name="CyberLink MPEG Muxer" checkdevice="false"/>
</filters>
<connections>
</connections>
</tv>
</capturecard>
to the file CaptureCardDefinitions.xml before </capturecards> at the very end.
6. Run MediaPortal Configuration, go to Television – Capture Cards – Add – (it should find IPTV Builtin Card) – Autotune – Add. Enter the channel name into the first edit box. The channel name must consist of channel description followed by space and the URL. For example: BBC World elecard://225.1.1.1:1234/udp
7. Disable a firewall.
8. Run MediaPortal.

Good luck!

p.s. For those, who wants to compile new exe and dlls themselves here is the diff:
***** SinkGraph.cs
71: protected string _videoCaptureFilterMoniker = "";
72: protected FilterGraph _filterGrph = null;
73: protected DirectShowLib.IFileSourceFilter _tvFileSourceInterface = null;
74: protected IBaseFilter _filterDemuxer = null;
75: protected IBaseFilter _tvTuner = null;
76: protected IGraphBuilder _graphBuilderInterface = null;
***** SINKGRAPH.CS.BAK
71: protected string _videoCaptureFilterMoniker = "";
72: protected IGraphBuilder _graphBuilderInterface = null;
*****

***** SinkGraph.cs
494: {
495: if (!channel.Name.Contains(@"://"))
496: _tvAudioTunerInterface.put_TVAudioMode(TVAudioMode.Mono | TVAudioMode.LangA);
497: if ( _graphState != State.TimeShifting && _graphState != State.Viewing )
***** SINKGRAPH.CS.BAK
490: {
491: _tvAudioTunerInterface.put_TVAudioMode(TVAudioMode.Mono | TVAudioMode.LangA);
492: if ( _graphState != State.TimeShifting && _graphState != State.Viewing )
*****

***** SinkGraph.cs
523:
524: if (channel.Name.Contains(@"://"))
525: {
526: IMediaControl mediaCtrl = null;
527: int hr;
528:
529: if (_mpeg2DemuxHelper.IsRendered)
530: {
531: mediaCtrl = (IMediaControl)_filterGrph;
532: hr = mediaCtrl.Stop();
533: DsError.ThrowExceptionForHR(hr);
534: }
535:
536: string streamUrl = channel.Name;
537: streamUrl = streamUrl.Remove(0, streamUrl.LastIndexOf(" ") + 1);
538: hr = _tvFileSourceInterface.Load(streamUrl, null);
539: DsError.ThrowExceptionForHR(hr);
540:
541: IPin oPin;
542: hr = _captureGraphBuilderInterface.FindPin(_tvTuner, PinDirection.Output, null, MediaType.Stream, false, 0, out oPin);
544: if (hr == 0) oPin.Disconnect();
545:
546: hr = _captureGraphBuilderInterface.RenderStream(null, MediaType.Stream, _tvTuner, null, _filterDemuxer);
547: DsError.ThrowExceptionForHR(hr);
548:
549: for (int i = 0; i < 40; i++)
550: {
551: System.Threading.Thread.Sleep(100);
552: int hr2 = _captureGraphBuilderInterface.FindPin(_filterDemuxer, PinDirection.Output, null, MediaType.Video, false, 0, out oPin);
554: if (hr2 == 0) oPin.Disconnect();
555: int hr3 = _captureGraphBuilderInterface.FindPin(_filterDemuxer, PinDirection.Output, null, MediaType.Audio, false, 0, out oPin);
557: if (hr3 == 0) oPin.Disconnect();
558: if ((hr2 == 0) && (hr3 == 0)) break;
559: }
560:
561: hr = _captureGraphBuilderInterface.RenderStream(null, MediaType.Video, _filterDemuxer, null, _filterCapture);
562: DsError.ThrowExceptionForHR(hr);
563: hr = _captureGraphBuilderInterface.RenderStream(null, MediaType.Audio, _filterDemuxer, null, _filterCapture);
564: DsError.ThrowExceptionForHR(hr);
565:
566: if (mediaCtrl != null)
567: mediaCtrl.Run();
568: Log.Info("SinkGraph:TuneChannel() loaded new url: {0}", streamUrl);
569: }
570:
571: if ( _channelNumber < (int)ExternalInputs.svhs )
***** SINKGRAPH.CS.BAK
518:
519: if ( _channelNumber < (int)ExternalInputs.svhs )
*****

***** SinkGraph.cs
1008: {
1009: if (_filterDemuxer != null)
1010: return true;
1011: if ( _tvTunerInterface == null )
***** SINKGRAPH.CS.BAK
956: {
957: if ( _tvTunerInterface == null )
*****

***** SinkGraph.cs
1021: {
1022: if (_filterDemuxer != null)
1023: return 100;
1024: if (_tvTunerInterface == null)
1025: return 1;
***** SINKGRAPH.CS.BAK
967: {
968: if ( _tvTunerInterface == null )
969: return 1;
*****

***** SinkGraph.cs
1036: {
1037: if (_filterDemuxer != null)
1038: return 100;
1039: if (_tvTunerInterface == null)
1040: return 1;
***** SINKGRAPH.CS.BAK
980: {
981: if ( _tvTunerInterface == null )
982: return 1;
*****

***** SinkGraphEx.cs
142: Log.Info("SinkGraphEx: Create new filter graph (IGraphBuilder)");
143: _filterGrph = new FilterGraph();
144: _graphBuilderInterface = (IGraphBuilder)_filterGrph;
145:
***** SINKGRAPHEX.CS.BAK
142: Log.Info("SinkGraphEx: Create new filter graph (IGraphBuilder)");
143: _graphBuilderInterface = (IGraphBuilder)new FilterGraph();
144:
*****

***** SinkGraphEx.cs
193: // through which the filters are accessable. More implementation independent...
194: if (dsFilter.Category == "tvtuner")
195: {
196: _tvTuner = dsFilter.DSFilter;
197: _tvTunerInterface = dsFilter.DSFilter as IAMTVTuner;
198: _tvFileSourceInterface = dsFilter.DSFilter as IFileSourceFilter;
199: }
200: if (dsFilter.Category == "tvaudio") _tvAudioTunerInterface = dsFilter.DSFilter as IAMTVAudio;
201: if (dsFilter.Category == "demuxer") _filterDemuxer = dsFilter.DSFilter;
202: if (dsFilter.Category == "capture") _filterCapture = dsFilter.DSFilter;
***** SINKGRAPHEX.CS.BAK
192: // through which the filters are accessable. More implementation independent...
193: if (dsFilter.Category == "tvtuner") _tvTunerInterface = dsFilter.DSFilter as IAMTVTuner;
194: if (dsFilter.Category == "tvaudio") _tvAudioTunerInterface = dsFilter.DSFilter as IAMTVAudio;
195: if (dsFilter.Category == "capture") _filterCapture = dsFilter.DSFilter;
*****

***** EditCaptureCardForm.cs
245:
246: availableVideoDevices.Add("IPTV BuiltIn");
247: availableVideoDeviceMonikers.Add("IPTV BuiltIn");
248:
249: FilterHelper.GetMPEG2VideoEncoders(availableVideoCompressors);
***** EDITCAPTURECARDFORM.CS.BAK
245:
246: FilterHelper.GetMPEG2VideoEncoders(availableVideoCompressors);
*****

Last edited by 24RUS; 2007-12-08 at 20:47..
24RUS is offline   Reply With Quote
3 Users Thank You:
Old 2007-12-08, 21:36   #2 (permalink)
Super Moderator
 
Spragleknas's Avatar
 
Join Date: Dec 2005
Posts: 6,339
Thanks: 650
Thanked 329 Times in 264 Posts

Country:

My System

Default

GREAT FIRST POST!

THANK YOU - THANK YOU - THANK YOU!!

FINALLY real IPTV @ MediaPortal... many people have requested this for a looooong time.


To bad one have to buy the Elecard codec. Do you know if it will be used for UDP streams only? I remember last time I tried it, it was used no matter what I played (only trial, so it got very annoying after 21 days).

Oh, and is this for both TVEv2 and TVEv3?

Last edited by Spragleknas; 2007-12-08 at 21:41..
Spragleknas is offline   Reply With Quote
Old 2007-12-09, 01:27   #3 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Thumbs up Nice!

Oh yeah! I have been waiting for this!

24RUS much appreciation to you for your hard work!

I will test this out and see how it goes!
maxrogers is offline   Reply With Quote
Old 2007-12-09, 03:26   #4 (permalink)
Super Moderator
 
Spragleknas's Avatar
 
Join Date: Dec 2005
Posts: 6,339
Thanks: 650
Thanked 329 Times in 264 Posts

Country:

My System

Default

Seems like this is indeed for TVEv2.
Spragleknas is offline   Reply With Quote
Old 2007-12-09, 05:45   #5 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Question IPTV Virtual Card for TV Server?

Any chance at getting this to work for TV Server?
maxrogers is offline   Reply With Quote
Old 2007-12-09, 08:07   #6 (permalink)
Portal Member
 
Join Date: Apr 2007
Location: Moscow
Posts: 44
Thanks: 0
Thanked 7 Times in 5 Posts

Country:


Default

Quote:
Originally Posted by Spragleknas View Post
Do you know if it will be used for UDP streams only? I remember last time I tried it, it was used no matter what I played (only trial, so it got very annoying after 21 days).
My IPTV provider casts only multicast udp MPEG-2 channels. But I tried to cast TCP/RTSP traffic locally (from a local MPEG-2 file to the localhost) by means of VLC. WMP (with Elecard Plugin) and MediaPortal with the patch recieves such traffic too.

Quote:
Originally Posted by Spragleknas View Post
Oh, and is this for both TVEv2 and TVEv3?
This patch is for stable MP-0.2.3.0 installation without new MediaPortal Client Plugin and TV-Server. As I know, MediaPortal Client Plugin (part of TVEv3 setup) have naturally builtin RTSP support and will get UDP/multicast support in the near future. Nevertheless I have a plan to add IPTV Builtin card to TV-Server. But this approach seems unnecessary overheaded in single-seat setup, because MPEG-2 traffic will be received by IPTV builtin card in TV-Server and send undecoded to another process at the same host. It is not what I expect an elegant solution to be :-).
24RUS is offline   Reply With Quote
Old 2007-12-09, 13:06   #7 (permalink)
Portal Member
 
Join Date: Apr 2007
Location: Gouda
Age: 30
Posts: 745
Thanks: 130
Thanked 9 Times in 9 Posts

Country:

My System

Default

YEAH!! this is great!
24RUS for president! _o_

thanks for bringing it to my attention Spragleknas!

EDIT:...can't wait to try it! unfortunately i'm at my mother in law... :s
Can it also be used for Nasa TV:
http://playlist.yahoo.com/makeplayli...segment=149773
__________________
My Requests :[Recording timeshiftbuffer][PIP][Search EPG and schedule recording only in selected group][Go back to previous day in epg][Adding recordings to playlists][Internet streams in tv guide(eg live NASAtv)][skip steps in music section]
My Bugs:[Stuttering TV][not all tvchannels found][not all tvchannels working][DVB-EPG grabbing sometimes crashes MP] (bugs not present in other tv software)
My Plugins:[StreamedMP][SAF][OnlineVideos][MovingPictures][MyTrailers][HTPCInfo]

Last edited by kkendall; 2007-12-09 at 14:15..
kkendall is offline   Reply With Quote
Old 2007-12-09, 17:05   #8 (permalink)
Portal Member
 
Join Date: Apr 2007
Location: Moscow
Posts: 44
Thanks: 0
Thanked 7 Times in 5 Posts

Country:


Default

Quote:
Originally Posted by kkendall View Post
This channel uses WMV3 encoding. I'm not sure if MediaPortal can handle this encoding from a tv capture card.
24RUS is offline   Reply With Quote
Old 2007-12-10, 10:26   #9 (permalink)
MP Donator
 
Join Date: Aug 2007
Posts: 45
Thanks: 49
Thanked 10 Times in 8 Posts

Country:

My System

Default

First. Sorry for my bad, bad english.
Second. thanks, thanks, thanks,.........thanks,............thanks.......thanks for all
Third. It doesn´t work for me......

I still working with this but only one thing: First I had a "unvalible creating graph" then, I supose, I change in capturecarddefinitions the "Mainconcept MPEG Push..." for "Elecard MPEG Push..." then now i have graph. It´s correct?.

PD: Que mal escribo ingles cño.

Last edited by Manuelito; 2007-12-10 at 10:30..
Manuelito is offline   Reply With Quote
Old 2007-12-10, 11:12   #10 (permalink)
Portal Member
 
moiristo's Avatar
 
Join Date: Nov 2006
Location: Enschede
Posts: 341
Thanks: 6
Thanked 27 Times in 15 Posts

Country:

My System

Send a message via ICQ to moiristo Send a message via MSN to moiristo
Default

Great work. I already found out that something like this would be possible, but couldn't find a decent way to do it. Gonna try it as soon as I'm back!
__________________
Greetz, moiristo

Click the image to open in full size.
moiristo is offline   Reply With Quote
Reply

Bookmarks

Tags
iptv, patch

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EPG for IPTV overture Electronic Program Guide 0 2007-01-19 15:17
T-Home / VDSL / IPTV Angebot einbinden in MediaPortal? fd2000 Plugins & Erweiterungen 1 2006-10-31 18:20
Mediaportal and IPTV mtanana MediaPortal 1 Talk 2 2006-10-29 17:33
IPTV zaidhammoudi General Support 0 2006-06-12 09:15
IPTV discussion Stinky General Development (no feature request here!) 8 2006-06-07 05:47


All times are GMT +1. The time now is 10:15.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden