MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server 1 » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
LinkBack Thread Tools Display Modes
Old 2007-01-22, 17:13   #1 (permalink)
Portal Member
 
Join Date: May 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts


Default Can TV Client receive a stream from VLC?

Does any transcoding have to be done to a RTSP stream from VLC to make it readable by the MP TV Client?

I have written a replacement TV server for my own use which uses VLC to redirect a UDP broadcast to the mediaportal client. Everything works fine, right up until the stream is received by the client.

I start VLC like this:
C:\Program Files\VideoLAN\VLC\vlc.exe --ttl 12 -vvv --color -I telnet --rtsp-host MPServer:554

I then use the telnet interface (programmatically) to send the following:

new Stream1 vod enabled
setup Stream1 input "C:\MyVideos\liveTVrecording.mpg"
-OR- (I've tried both)
setup Stream1 input "udp://@239.255.0.1:9400"

Then I have my "fake" server reply to the MP client with the following stream name: rtsp://MPServer/Stream1

I just can't seem to get it to build a graph. I get something like this in the client's mediaportal.log

2007-01-22 21:03:42.149625 [Info.][MPMain]: RTSPPlayer: load:rtsp://Mediaportal/Stream1
2007-01-22 21:03:42.962125 [Info.][MPMain]: RTSPPlayer:connect rtspsource->mpeg2 demux
2007-01-22 21:04:56.790250 [Info.][MPMain]: RTSPPlayer:render audio/video demux outputs
2007-01-22 21:04:56.805875 [Warn.][MPMain]: vmr9: pin:0 not connected:80040209
2007-01-22 21:04:56.805875 [Warn.][MPMain]: vmr9: no input pin 1 found
2007-01-22 21:04:56.805875 [Warn.][MPMain]: vmr9: no input pin 2 found
2007-01-22 21:04:56.805875 [Info.][MPMain]: RTSPPlayer: vmr9 not connected
2007-01-22 21:04:56.805875 [Info.][MPMain]: RTSPPlayer:cleanup DShow graph

I've tried using different codecs in the client's MyVideos setup (MPV/MPA, PureVideo, etc)

It works just fine if I use a VLC client to connect to rtsp://192.168.1.134:554/Stream1 and it works if I use the MP server to stream video from my Hauppage WinTV-USB2. The messages in the VLC window say it's using MPV/MPA as well.

I know this is outside the MP client/server umbrella, but any suggestions would be appreciated. I think I'm really close to getting this to work.

Last edited by Stinky; 2007-01-23 at 03:09.
Stinky is offline   Reply With Quote
Old 2007-01-23, 05:35   #2 (permalink)
Portal Member
 
Join Date: May 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Still have the problem but I discovered you have to force VLC to use TS as a mux:

new Stream1 vod enabled
setup Stream1 input "udp://@239.255.0.1:9400"
setup Stream1 mux mp2t

I still get the same erros in the MP log and nothing ever shows up in MyTV on the client. Now my server CPU goes to max, too. Should the load be that high? It's not a monster machine, 2.4 GHz, 1GB RAM..
Stinky is offline   Reply With Quote
Old 2007-01-24, 21:47   #3 (permalink)
Portal Member
 
Join Date: May 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts


Thumbs up

In case anyone else tries this in the future, the solution was

new Stream1 vod mux mp2t enabled
setup Stream1 input "udp://@239.255.0.1:9400"

2.4GHz Celeron processor was fine as long as you wait for VLC to ctreate the stream before giving Mediaportal the streaming URL.

I can now watch IPTV within the Mediaportal interface working with the associated EPG. I've tested with three different streams running at the same time to three different clients and it's holding up nicely. Downside is that zap time has doubled since VLC has to "tune" in the stream, and then Mediaportal has the tune it in again.

Last edited by Stinky; 2007-01-26 at 22:14.
Stinky is offline   Reply With Quote
Old 2007-03-01, 14:30   #4 (permalink)
Portal Member
 
Join Date: Jan 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

This may actually be exactly what im looking for...
Let me get this straight, you are rederecting a udp stream to "MY TV" in MP using VLC?
Didnt understand all that mutch how you got MP to show the stream in "MY TV", but if i understood right, you wrote a replacement TV server which generally speaking is VLC?

I would love to test this out, been looking all over the net for a solution like this!

This might be where I end my search
Framerate is offline   Reply With Quote
Old 2007-03-01, 14:39   #5 (permalink)
MP Donator
 
joystick's Avatar
 
Join Date: Jan 2006
Posts: 330
Thanks: 7
Thanked 14 Times in 11 Posts

Country:

My System

Send a message via ICQ to joystick Send a message via Skype™ to joystick
Default

hey guys,
could you give me a hint on the why? I just don't get the point.... I thought the TVE3 was doing exactly what you needed (besides VLC) but why do you need vlc, then?
cheers

joystick
__________________
C2D 6550, 3gb, ASUS P5K-E WiFi AP, 2*500 GB Samsung Sata, 3TB Nas over Powerline,2x FloppyDTV DVB-C+, Alphacrypt, HIS ATI HD2600XT 256MB, Zalman HD160+Irmon, Harmony One + DiNovo Mini, MP 0.2.3 + Tv Server latest SVN, WinXP SP2
joystick is offline   Reply With Quote
Old 2007-03-01, 14:43   #6 (permalink)
Portal Member
 
Join Date: Jan 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

TV Engine 0.3 cant handel the udp:// streams.
I get my IPTV through streams like this, and i can watch these channels using VLC, but untill now, i havnt been able to watch them in any of the Media Center solotions thats out there..
Framerate is offline   Reply With Quote
Old 2007-03-06, 14:29   #7 (permalink)
Portal Member
 
Join Date: Feb 2007
Age: 34
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Quote:
Originally Posted by joystick View Post
hey guys,
could you give me a hint on the why? I just don't get the point.... I thought the TVE3 was doing exactly what you needed (besides VLC) but why do you need vlc, then?
TVE3 is running on any Windows system. If you have a "full server" (not a disguised Pc), dedicated to streaming/recording TV, it may be intalled with a Linux distrib.
I personnally use a Debian server with one DVB-T and one DVB-S cards and use VLC on it as a TV server/DVR.
The main client is off course MP

Anybody interrested in developping a plugin for remote control of VLC server (stream, VCR, ...) ? If any, count on me (I'm a java developper but can adapt any language ) !

Last edited by Solkan; 2007-03-06 at 14:44.
Solkan is offline   Reply With Quote
Old 2007-03-06, 22:22   #8 (permalink)
Portal Member
 
Join Date: Jan 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Quote:
Originally Posted by Solkan View Post
Quote:
Originally Posted by joystick View Post
hey guys,
could you give me a hint on the why? I just don't get the point.... I thought the TVE3 was doing exactly what you needed (besides VLC) but why do you need vlc, then?
TVE3 is running on any Windows system. If you have a "full server" (not a disguised Pc), dedicated to streaming/recording TV, it may be intalled with a Linux distrib.
I personnally use a Debian server with one DVB-T and one DVB-S cards and use VLC on it as a TV server/DVR.
The main client is off course MP

Anybody interrested in developping a plugin for remote control of VLC server (stream, VCR, ...) ? If any, count on me (I'm a java developper but can adapt any language ) !
I was actually thinking of trying to learn C++ to make a TVE3 VLC plugin with the options of recordings, timeshifting, program guide and so on, controlled by the MP client..
I would be more than thankfull to get some help with this, when my programming skills is rather non existing, but then again, im willing to learn

Dont know is that was what you where thinking, but this would atleast complete my wishes.
Framerate is offline   Reply With Quote
Old 2007-03-07, 09:23   #9 (permalink)
Portal Member
 
Join Date: Feb 2007
Age: 34
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

not sure about this !!

Let's summarize a little what I was thinking about.
The main purpose of this MP plugin will be to control a VLC server within MP.
It includes planned (with or without EPG) and life recording on the server (recording and timeshifting an IP tv on the MP client is not the job here), adding/removing multicast streamings from files, IP tv streams and DVB cards (and maybe DVD), adding/removing files from playlist and asking for VOD (unicast stream).
All these "commands" can be send to VLC by the telnet interface and the VideoLAN Manager (VLM) functionalities.
Holy Bible for VLC streaming is there : http://www.videolan.org/doc/streamin.../en/index.html.

I don't know the new TVE3 and I'm not interrested in the server aspect (since my server is in Debian) but the client aspect can maybe (not sure) be combined with the VLC plugin to "use" the ip-streams cast by the VLC server. Anyway, ipTV plugin already exists (http://forum.team-mediaportal.com/my...8.html?t=13558) and is enough here to play our VLC streams.

Last question : what is this Videolan plugin about http://mp-plugins.svn.sourceforge.ne...gins/VideoLAN/ ? I could not find anything about it in these forums.

But like Stinky wrote this "is outside the MP client/server umbrella".

Last edited by Solkan; 2007-03-07 at 09:38.
Solkan is offline   Reply With Quote
Old 2007-03-13, 17:55   #10 (permalink)
Portal Member
 
Join Date: May 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Hi guys, sorry for the late replay - I haven't checked the forum in a while.

I just replied to framerate via PM, but here's the jist of it:

My server listens for MP clients to request a channel (among other things). Once a channel is requested, I use the telnet interface to VLC to create a redirected stream (udp->rtsp) and then pass the new stream name to the client. I have two NICs in the server with routing tables set up - one to my LAN, one to the IPTV network. I also created my own DB table to hold the mapping between a channel ID (as used in the rest of MP) to a MRL used by my cable provider.

Setup is cumberome. I run the MP server setup only to use the DB structures (parts of the client talk directly to the remote DB and not to the server) and then disable the MP server in favor of my homebrew one. The routing tables were easy to set up, the DB table data was a pain to capture, clean and format. A new DB table needs to be created as well but this would be easy to script.

I like this solution since I still get to use the EPG and it looks just like the "stock" version of MP. WAF is high on this one.

At this point, there's two glitches:

1) my server does not import EPG data. I just re-enable the MP version every now and then.

2) VLC takes a second to connect to the stream and start pumping it out. If the client tries to connect to it too quickly, VLC goes to 100% CPU. I bumped to a 3GHz CPU but the real solution lies in properly implementing threading in the server I wrote.

I haven't even looked at recording functionality but I don't see it as being real difficult. Scheduling conflicts would be non-existant and the only limitation on how many channels could be streaming at the same time is your CPU and NIC bandwidth. This is written in Delphi, BTW.
Stinky is offline   Reply With Quote
Reply

Bookmarks

Tags
client, receive, stream, vlc

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AverTV Purity-3D Dual MCE 500 Drivers Technifide General Support 10 2006-10-17 14:54
Recording Conflicts gwiley General Support 15 2006-09-15 06:28
Radio autotune crash MP configuration pisdu General Support 2 2006-04-10 12:57
Playing video stream problem sur_uix General Development (no feature request here!) 0 2006-01-03 23:13
Second of dual ADS DVB-T cards will not tune onetoomany General Support 2 2005-12-08 22:41


All times are GMT +1. The time now is 20:49.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress