My small contribution I call - StreamTV (2 Viewers)

Phunky

Portal Member
July 19, 2007
43
1
41
Please shout if you need any help testing, it looks like it starts the timeshift fine i just cant access the stream.
 

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
Thinking about your problem I can't see why you should have a issue.

The only time there could be a problem is if two clients connected at the same time through StreamTv or there is no tuner cards left to use (cases I need to test). I expect that two clients connecting at the same time might work as long as there are tuner cards avaliable and if not i'd expect you get a HTTP 500 Internal Error reply.

To get a url back means the timeshifting has started fine and vlc should of started up and reported its running properly.

Can you check if when you start timeshifting through StreamTv that there is a client connected to the TvServer. If you goto the streaming server option there should be a client connected. Beyond that the only other thoughts I have are is VLC 0.9.x (I expect it is considering it seems to of started ok) and if you could try on the computer running the tvserver, see if it will work locally.
 

Phunky

Portal Member
July 19, 2007
43
1
41
It does trigger the channel change, but no client ever connects to the TvServer

main debug: net: connecting to 10.0.0.9 port 10000
main debug: connection: Operation now in progress
main error: connection failed: Connection refused
access_http error: cannot connect to 10.0.0.9:10000
main debug: net: connecting to 10.0.0.9 port 10000
main debug: connection: Operation now in progress
main error: connection failed: Connection refused
access_mms error: cannot connect to 10.0.0.9:10000
main warning: no access module matching "http" could be loaded
main debug: TIMER module_Need() : 152.756 ms - Total 152.756 ms / 1 intvls (Avg 152.756 ms)
main debug: waitpipe: object killed
main error: open of `http://10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=195;' failed: could not create access
main debug: finished input
main debug: dying input
main debug: thread ended
macosx debug: addition to non-blocking error panel received
macosx debug: input has stopped, refreshing interface
main debug: dead input
main debug: thread 2961985536 joined (playlist/engine.c:244)
main debug: TIMER input launching for 'TimeShift.ts?ChannelId=195;' : 207.356 ms - Total 207.356 ms / 1 intvls (Avg 207.356 ms)

I think it might be something to do with streaming via HTTP instead of RSTP
 

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
I'm about to put up a new build where i've added a little more error checking, I think the point where you should be getting a error is been skipped. Now you should get a error instead of the redirect URL if i'm right about the problem.

One more question, what have you got the recording format set to? I've never got mpeg to work on my setup and since VLC isn't set to transcode and is expecting a .ts (Transport Stream) for the output that might be causing the problem, I'll try and test mpeg on my setup again and see if that causes a problem.

Also this update for those who don't like all the "disabled!" messages on each channel this update will now show the title of the show currently playing. I was going to do more changes before I released it but if the modifications i've done show what the problem is for Phunky then it was worth it.

* Well mpeg works fine as far as I can tell, try the update and make sure vlc is up to date.
 

Phunky

Portal Member
July 19, 2007
43
1
41
Thanks for the quick update :) but it does not seem to have fixed anything, it does trigger the TV server to change channel but never shows a client connected

main debug: adding item `TimeShift.ts?ChannelId=197;' ( http://10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=197; )
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 1 items, index -1
main debug: starting new item
main debug: processing request item TimeShift.ts?ChannelId=197; node Playlist skip 0
main debug: resyncing on TimeShift.ts?ChannelId=197;
main debug: TimeShift.ts?ChannelId=197; is at 0
main debug: creating new input thread
main debug: Creating an input for 'TimeShift.ts?ChannelId=197;'
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 2959855616 (input) created at priority 22 (input/input.c:370)
main debug: `http://10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=197;' gives access `http' demux `' path `10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=197;'
main debug: creating demux: access='http' demux='' path='10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=197;'
main debug: looking for access_demux module: 0 candidates
main warning: no access_demux module matched "http"
main debug: TIMER module_Need() : 0.128 ms - Total 0.128 ms / 1 intvls (Avg 0.128 ms)
main debug: creating access 'http' path='10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=197;'
main debug: looking for access module: 2 candidates
access_http debug: http: server='10.0.0.9' port=8080 file='/TvServer/TimeShift.ts?ChannelId=197;
main debug: net: connecting to 10.0.0.9 port 8080
main debug: connection: Operation now in progress
main debug: connection succeeded (socket = 9)
main debug: no fetch required for Playlist (art currently (null))
macosx debug: input has changed, refreshing interface
access_http debug: protocol 'HTTP' answer code 302
access_http debug: this frame size=0
access_http debug: Content-Type: text/html
access_http debug: Server: Microsoft-HTTPAPI/1.0
access_http debug: Connection: close
access_http debug: redirection to http://10.0.0.9:10000/Card1.ts
access_http debug: http: server='10.0.0.9' port=10000 file='/Card1.ts
main debug: net: connecting to 10.0.0.9 port 10000
main debug: connection: Operation now in progress
main error: connection failed: Connection refused
access_http error: cannot connect to 10.0.0.9:10000
main debug: net: connecting to 10.0.0.9 port 10000
main debug: connection: Operation now in progress
main error: connection failed: Connection refused
access_mms error: cannot connect to 10.0.0.9:10000
main warning: no access module matching "http" could be loaded
main debug: TIMER module_Need() : 192.125 ms - Total 192.125 ms / 1 intvls (Avg 192.125 ms)
main debug: waitpipe: object killed
main error: open of `http://10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=197;' failed: could not create access
main debug: finished input
main debug: dying input
main debug: thread ended
macosx debug: addition to non-blocking error panel received
macosx debug: input has stopped, refreshing interface
main debug: dead input
main debug: thread 2959855616 joined (playlist/engine.c:244)
main debug: TIMER input launching for 'TimeShift.ts?ChannelId=197;' : 246.697 ms - Total 246.697 ms / 1 intvls (Avg 246.697 ms)
main debug: starting new item
main debug: changing item without a request (current 0/1)
main debug: nothing to play
main debug: no fetch required for Playlist (art currently (null))

This is the error log from VLC running on the TV server itself

main error:
main error: Connection to 10.0.0.9 port 8080 failed: Connection timed out
access_http error: cannot connect to 10.0.0.9:8080
main debug: select timed out
main error: Connection to 10.0.0.9 port 8080 failed: Connection timed out
access_http error: cannot connect to 10.0.0.9:8080
main debug: net: connecting to 10.0.0.9 port 8080
main debug: connection in progress
main debug: select timed out
main error: Connection to 10.0.0.9 port 8080 failed: Connection timed out
access_mms error: cannot connect to 10.0.0.9:8080
vcd debug: trying .cue file: 10.0.0.9:8080/TvServer/TimeShift.cue
vcd debug: could not find .cue file
access_file warning: 10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=193;: No such file or directory
cdda debug: trying .cue file: 10.0.0.9:8080/TvServer/TimeShift.cue
cdda debug: could not find .cue file
cdda warning: could not open 10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=193;
main warning: no access2 module matching "http" could be loaded
main error: no suitable access module for `http://10.0.0.9:8080/TvServer/TimeShift.ts?ChannelId=193;'
main debug: thread times: real 0m15.203125s, kernel 0m0.015625s, user 0m0.000000s
main debug: thread 3892 joined (input/input.c:412)
main: nothing to play

This is the TV Server log, its now crashing when i attempt to stream.

2009-02-18 08:25:06.718750 [6]: **************************************************
2009-02-18 08:25:06.718750 [6]: ***** SIGNAL LEVEL: 73, SIGNAL QUALITY: 100 *****
2009-02-18 08:25:06.718750 [6]: **************************************************
2009-02-18 08:25:06.718750 [6]: card: tuned user: 10.0.0.8 subchannel: 0
2009-02-18 08:25:06.718750 [6]: user:10.0.0.8 add
2009-02-18 08:25:06.718750 [6]: card2:10.0.0.8 1 0
2009-02-18 08:25:06.718750 [6]: Controller: 10.0.0.8 1 0
2009-02-18 08:25:06.718750 [6]: control2:10.0.0.8 1 0
2009-02-18 08:25:06.718750 [6]: Controller: delete timeshift files C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live1-0.ts
2009-02-18 08:25:06.734375 [6]: card: StartTimeShifting 1 C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live1-0.ts
2009-02-18 08:25:06.734375 [6]: card: CAM enabled : False
2009-02-18 08:25:06.734375 [6]: subch:0 SetTimeShiftFileName:C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live1-0.ts
2009-02-18 08:25:06.734375 [6]: Set video / audio observer
2009-02-18 08:25:06.734375 [6]: subch:0 SetTimeShiftFileName fill in pids
2009-02-18 08:25:06.734375 [6]: subch:0-0 tswriter StartTimeshifting...
2009-02-18 08:25:06.734375 [6]: card: WaitForTimeShiftFile - waiting _eventAudio & _eventVideo
2009-02-18 08:25:06.750000 [13]: PID seen - type = Video
2009-02-18 08:25:06.750000 [13]: audioVideoEventHandler Video
2009-02-18 08:25:06.750000 [13]: PID seen - type = Audio
2009-02-18 08:25:06.750000 [13]: audioVideoEventHandler Audio
2009-02-18 08:25:06.750000 [6]: card: WaitForTimeShiftFile - video and audio are seen after 0.015625 seconds
2009-02-18 08:25:07.156250 [6]: Timeshifting epg grabber started.
2009-02-18 08:25:07.156250 [6]: dvb:grab epg...
2009-02-18 08:25:07.156250 [6]: user:10.0.0.8 card:1 sub:0 add stream:C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live1-0.ts.tsbuffer
2009-02-18 08:25:07.156250 [6]: RTSP: start streamer
2009-02-18 08:25:07.156250 [RTSP Streaming thread]: RTSP: Streamer started
2009-02-18 08:25:07.156250 [6]: RTSP: add stream stream1.0 file:C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live1-0.ts.tsbuffer
2009-02-18 08:25:07.156250 [6]: Controller: StartTimeShifting started on card:1 to C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\timeshiftbuffer\live1-0.ts.tsbuffer
2009-02-18 08:25:07.234375 [6]: StreamTV: Timeshifting response: Succeeded
2009-02-18 08:25:07.234375 [Channel state thread]: Controller: DoSetChannelStates for 171 channels
2009-02-18 08:25:07.250000 [6]: StreamTV: Starting VLC
2009-02-18 08:25:07.468750 [2]: Tvservice stopped due to a app domain exception System.EntryPointNotFoundException: Unable to find an entry point named 'libvlc_release' in DLL 'libvlc'.
at VideoLan.InteropMethods.libvlc_release(IntPtr p_instance)
at VideoLan.VideoLanClient.Dispose(Boolean disposing)
at VideoLan.VideoLanClient.Finalize()

I've found one good thing with all this though! The active channel stream is shown in the Streaming_server.log and i was able to get that to stream via rtsp://10.0.0.9/stream1.0 of course this is no good for a multi seat setup but it did stream fine and change channel with the manual control in TVServer.

Would you like me to try it with one of the cards disabled? I've been trying it this morning with no other clients connected - just TVServer running and my mac trying to connect to it - i could disable on of the DVB-C cards and see if that helps.

Just disabled one of the cards and attempted to stream again :( no luck sadly it still crashes TVServer below is the error.log

2009-02-18 08:38:04.640625 [6]: Exception :confused:ystem.EntryPointNotFoundException: Unable to find an entry point named 'libvlc_media_player_new' in DLL 'libvlc'.
at StreamTv.VlcStreamer.Manager.Create(IntPtr target, ConfigBuilder configuration, DateTime startTime, String session)
at StreamTv.TvServerControl.TimeShift3.Process(HttpListenerRequest request)
at StreamTv.WebServer.Http.Server.Resources.GetBuffer(HttpListenerRequest httpClientRequest)
Exception :Unable to find an entry point named 'libvlc_media_player_new' in DLL 'libvlc'.
site :confused:treamTv.VlcStreamer.VlcResult Create(IntPtr, StreamTv.VlcStreamer.ConfigBuilder, System.DateTime, System.String)
source :confused:treamTv.VlcStreamer
stacktrace: at StreamTv.VlcStreamer.Manager.Create(IntPtr target, ConfigBuilder configuration, DateTime startTime, String session)
at StreamTv.TvServerControl.TimeShift3.Process(HttpListenerRequest request)
at StreamTv.WebServer.Http.Server.Resources.GetBuffer(HttpListenerRequest httpClientRequest)

2009-02-18 08:38:04.656250 [6]: Exception :confused:ystem.NullReferenceException: Object reference not set to an instance of an object.
at StreamTv.WebServer.HttpServer.ProcessConnection(HttpListenerContext& clientContext)
Exception :Object reference not set to an instance of an object.
site :Void ProcessConnection(System.Net.HttpListenerContext ByRef)
source :confused:treamTv.WebServer
stacktrace: at StreamTv.WebServer.HttpServer.ProcessConnection(HttpListenerContext& clientContext)
 

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
Looking at those logs it would seem there is a problem with your copy of VLC. It looks to find the DLL fine but some of the commands it calls aren't working.

Try downloading VLC again then re-install. Beyond that those logs seem alright.

if you look in the tvserver log at the end you will see

2009-02-18 08:25:07.250000 [6]: StreamTV: Starting VLC
2009-02-18 08:25:07.468750 [2]: Tvservice stopped due to a app domain exception System.EntryPointNotFoundException: Unable to find an entry point named 'libvlc_release' in DLL 'libvlc'.
at VideoLan.InteropMethods.libvlc_release(IntPtr p_instance)
at VideoLan.VideoLanClient.Dispose(Boolean disposing)
at VideoLan.VideoLanClient.Finalize()

See how it says there is a System.EntryPointNotFoundException it shouldn't do that.
 

Phunky

Portal Member
July 19, 2007
43
1
41
I will give it ago when i get home from the office - When i first attempted to use this i didnt have VLC installed on the TVServer, is that required? I thought it was only the client streaming that required VLC to be installed?
 

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
VLC is required on the server, for the moment I use it to go from RTSP to HTTP but my main reason for using VLC is transcoding support which I haven't worked out yet.

The client doesn't need VLC but that is a easy way to test if it is working. Any client that can play a http video stream will work.
 

Phunky

Portal Member
July 19, 2007
43
1
41
If i change the Stream to use RTSP instead of HTTP would that avoid the need of VLC?

Just popped home on my lunch break to have a quick dabble and seems it still not playing :(

2009-02-19 13:33:21.343750 [6]: Exception :confused:ystem.EntryPointNotFoundException: Unable to find an entry point named 'libvlc_media_player_new' in DLL 'libvlc'.
at StreamTv.VlcStreamer.Manager.Create(IntPtr target, ConfigBuilder configuration, DateTime startTime, String session)
at StreamTv.TvServerControl.TimeShift3.Process(HttpListenerRequest request)
at StreamTv.WebServer.Http.Server.Resources.GetBuffer(HttpListenerRequest httpClientRequest)
Exception :Unable to find an entry point named 'libvlc_media_player_new' in DLL 'libvlc'.
site :confused:treamTv.VlcStreamer.VlcResult Create(IntPtr, StreamTv.VlcStreamer.ConfigBuilder, System.DateTime, System.String)
source :confused:treamTv.VlcStreamer
stacktrace: at StreamTv.VlcStreamer.Manager.Create(IntPtr target, ConfigBuilder configuration, DateTime startTime, String session)
at StreamTv.TvServerControl.TimeShift3.Process(HttpListenerRequest request)
at StreamTv.WebServer.Http.Server.Resources.GetBuffer(HttpListenerRequest httpClientRequest)

2009-02-19 13:33:21.343750 [6]: Exception :confused:ystem.NullReferenceException: Object reference not set to an instance of an object.
at StreamTv.WebServer.HttpServer.ProcessConnection(HttpListenerContext& clientContext)
Exception :Object reference not set to an instance of an object.
site :Void ProcessConnection(System.Net.HttpListenerContext ByRef)
source :confused:treamTv.WebServer
stacktrace: at StreamTv.WebServer.HttpServer.ProcessConnection(HttpListenerContext& clientContext)

Thats my error.log from TVServer, it kills my TVService as soon as i attempt to stream
 

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
Finally was able to re-produce the error you got (had to download the older version of vlc). You have an old version of VLC installed. Update to a 0.9.x build.

Goto: VideoLAN - Download from mirror that is the latest stable version at the moment. Install it and try again.

Also I might add a option to allow for the rtsp url instead of http if people want that (might make radio quicker to implement, haven't looked into how radio works yet).
 

Users who are viewing this thread

Top Bottom