My small contribution I call - StreamTV (3 Viewers)

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
Well another update.

A new tsBuffer file reader :)

Should now be able to watch video without it cutting out after a while. It uses the same system that StreamingServer uses to process the tsBuffer file.
Features include: * Knowledge of where the tsWriter is up to so the reader never gets ahead of the writer.
* Shouldn't cut the stream off after a period of time now.
* A lot less corrupt packets causing what looks like stuttering (isn't perfect on file change over but its close, still have a few ideas).

Give it a shot and tell me if it works as advertised :p.

Oh and sadly radio playback seems to stutter still, hopefully the fix for the corrupt video I have in mind will fix the radio playback also.

http://mpstreamtv.googlecode.com/files/StreamTv 2-1.0.1.4.rar

Oh and if anyone here has any experience with System.Net.HttpListener and can explain why it doesn't process the first connection attempt by a client I'd appreciate it.
 

tlevis

Portal Pro
November 23, 2007
55
0
Home Country
Finland Finland
Now the TV streaming seems to work nicely! Good job!
I'm waiting for the transcoding support so I could watch this over the internet also.
Once you get that working it would be great to get recordings to show up also! :D
 

Valk

Portal Pro
February 25, 2006
302
108
Home Country
Australia Australia
First I want to reach my goal which was the whole point of this.

Getting live Tv going on my PS3 :p

Once I have that figured out i'll go back to transcoding (unless I get stuck and jump back before then).

Getting there slowly.
 

MoPhat

Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi Valk, have you noticed a second client connects the playing stream, the stream stops on the first client?

    Have you found a possibility that i can stream to the windows media player?

    thank you for that good work :D
    MoPhat
     

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Home Country
    Australia Australia
    In regards to the 2nd client is the 2nd client connecting from the same PC? Also do you have 2 tuner cards?

    At the moment I haven't decided how i'll handle multiple clients properly yet so its using a very simple implementation (need to do some planning on how it should handle multiple users).

    As for media player I haven't tested against that yet, i'll give it a shot but my first thought would be if it doesn't work then you don't have a directshow filter installed that can read as .TS file stream, maybe if you install the IP-TV plugin DirectShow filter it might left you use mediaplayer since that allows you to watch IP based media (I have no idea at the moment since I haven't really read how IP-TV works but its worth a shot).
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    I have tested with 2 clients and one dvb-t tuner on the server and same channel.

    If i connect the second client, the stream stops on the first one.

    do you read the ts file on the harddisk for the streaming (i have not checked the sources for the moment)?

    So you can stream this multiple times?

    thx
    MoPhat
     

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Home Country
    Australia Australia
    At the moment I work off the files from the HDD.

    As for multiple users I picked a basic design where you can only view one channel at a time per computer (can't remember at the moment if it will disconnect someone if there is no tuner avaliable but I'm pretty sure it won't).

    Considering alot of upnp servers connect from the same PC for all the clients this tends to be a problem but I haven't devoted any time into planning how I should change user management.

    As for the same channel at the moment it doesn't allow for sharing of a tv tuner on the same channel.

    If you (or anyone else) want to write up a plan on how it should handle users i'd be interested.
    eg.
    1 Tuner
    User A > tune Channel A > Owner
    User B > tune Channel A > Slave
    User A > Disconnects > Close channel > Disconnect Slaves
    or
    User A > disconnects
    User A > tune Channel B > Server sends error message (no tuners avaliable).

    Anyway if you do find a better way to layout the information then what I have done just now. What I have done should give you a small idea on the sort of information needed.

    I have a few changes happening in the background at the moment which should make it much easier to work with (eg. make the TsBuffer reading class implement Stream so it is easier to use with namedpipes).
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    At the moment I work off the files from the HDD.

    As for multiple users I picked a basic design where you can only view one channel at a time per computer (can't remember at the moment if it will disconnect someone if there is no tuner avaliable but I'm pretty sure it won't).

    Considering alot of upnp servers connect from the same PC for all the clients this tends to be a problem but I haven't devoted any time into planning how I should change user management.

    As for the same channel at the moment it doesn't allow for sharing of a tv tuner on the same channel.

    If you (or anyone else) want to write up a plan on how it should handle users i'd be interested.
    eg.
    1 Tuner
    User A > tune Channel A > Owner
    User B > tune Channel A > Slave
    User A > Disconnects > Close channel > Disconnect Slaves
    or
    User A > disconnects
    User A > tune Channel B > Server sends error message (no tuners avaliable).

    Anyway if you do find a better way to layout the information then what I have done just now. What I have done should give you a small idea on the sort of information needed.

    I have a few changes happening in the background at the moment which should make it much easier to work with (eg. make the TsBuffer reading class implement Stream so it is easier to use with namedpipes).

    My idea with one tuner:
    User A > tune Channel A > play stream
    User B > use same tune/stream from User A
    User C > use same tune/stream from User A
    User D > use same tune/stream from User A
    User A > Disconnects > nothing happens > other users have there streams..
    Last User > Disconnects > Stream stopps and tuner is free for next stream

    The same with more then one tuner


    If a user switches to another channel then the stream should be switched for alles users or the Server sends a error message (no tuners avaliable) to the new user > this should be an option to enable or disable the behaviour in the plugin config.



    Have you a solution to stream at the windows mediaplayer?
    because i use your plugin :D to stream a tv channel to many dashboard systems... and the vlc activex control generates a bluescreen if the stream is not stopped before a dispose is generated or the process is killed :mad: by some other users/processes...

    i don't need a transcoding just a way to display the stream with WMP instead of VLC > any idea?

    thx
    MoPhat
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    I have solved my problem with the VLC bluescreens with his activex control.

    i have just create a own activex (smartVideoPlayer) control where shows video streams :D

    if anyone need this, here is it attachet below!



    You can use it as a normal activex control (framework 3.5 is required!) and use ist like this:

    Code:
    videoPlayer1.StreamURL = "http://mediaportal/TvServer/TimeShift.ts?ChannelId=2";
    videoPlayer1.play();

    other usefull things:

    Code:
                videoPlayer1.stop();
                videoPlayer1.pause();
                videoPlayer1.StartDelay = 2; // start delay before the streams start


    As codec i use ffdshow tryout, with this i can configure it on the system tray to crop and deinterlace the picture.

    If you have no picture on while is streaming, check you pc with graphedit if the graph is correctly builded ;)

    @Valk
    any news for streaming on a few clients at the same time?

    greetz
    MoPhat
     

    Attachments

    • smartVideoPlayer - ActiveX.rar
      30.7 KB

    Valk

    Portal Pro
    February 25, 2006
    302
    108
    Home Country
    Australia Australia
    Good to hear you fixed your problem MoPhat. I had a look into it but to make it so windows mediaplayer can play the stream I would have to do a fair bit of work not related to this plugin (which i'm not to keen on).

    If your using VLC (even as the activeX plugin) you won't require codecs installed like ffdshow since VLC uses its own pre-compiled codecs and not directshow like windows media player.

    As for multiple users i'll look at that soon (I took a break for a while there). There is one change I want to finish first before I fix up multiple users.
     

    Users who are viewing this thread

    Top Bottom