[New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and MP (1 Viewer)

Status
Not open for further replies.

ben001

Portal Member
May 23, 2007
38
0
40
Home Country
Canada Canada
I receive the same error as jonm on 64bit svr 2k8 R2 with the latest svn
 

andri

Portal Member
July 16, 2009
13
0
Home Country
Iceland Iceland
splendid job.

i'm extending your streamer.aspx a bit so I can add a &start parameter so I can tell the server to "seek" into the file which I do by adding "-ss" to the mencoder params. I'm trying to speed the whole process up so my client gui will respond quicker. have you tried your solution on IIS, are there any tricks/access rights to make mencoder work through IIS?
 

gemx

Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    splendid job.

    i'm extending your streamer.aspx a bit so I can add a &start parameter so I can tell the server to "seek" into the file which I do by adding "-ss" to the mencoder params. I'm trying to speed the whole process up so my client gui will respond quicker. have you tried your solution on IIS, are there any tricks/access rights to make mencoder work through IIS?

    Nice idea. Please post your modifications :)

    Regarding IIS - that should not be a problem
    Just one thing though:

    You need to create an Application Pool for this site which has at least "LocalSystem" as identity, so you can access the media files from MP.
    In IIS default, the Default App Pool is configured that a web app can only access files in the top level of the web app and below, so you have to change the identity of the App Pool which MPWebServices is assigned to, to LocalSystem or a local user

    That's the only restriction that applies to IIS
     

    andri

    Portal Member
    July 16, 2009
    13
    0
    Home Country
    Iceland Iceland
    well here is the current status on it but the 'problem' is that the solution is a bit dirty :). my inital problem was I needed the player to play currently recording (and old) recordings through limited connections. I do it by adding "-ss" in the parameters to mencoder if &start param is defined in the querystring. Sadly FileStream.Seek hasn't worked successfully yet for direct file access.
    I implemented my own player on a VLC wrapped player with my own Timetracker. The player has to check before asking for a position X in a recording if that recording is not shorter than X. This is done with a web request to StreamerInfo.aspx which only outputs the recording length. This is done because mencoder crashes very badly if X is longer than the recording length and sometimes takes the TvServer down while it's at it.

    Added to Streamer.aspx.cs at around line 111
    right before if (cfg.inputMethod != TransportMethod.Filename)
    Code:
            if (Request.QueryString["start"] != null)
            {
                int offset = 0;
                int qStart = Convert.ToInt32(Request.QueryString["start"]);
    
                offset = Convert.ToInt32( qStart / 3.1415); 
                // have no idea why this division has to be done, but seems to work on MediaPortal recordings
                cfg.Args = "-ss " + offset + " " + cfg.Args;
            }


    StreamerInfo.aspx.cs (new) is the same as Streamer.aspx.cs when finding filename
    Code:
            Response.Clear();
            Response.Buffer = false;
            Response.BufferOutput = false;
            Response.AppendHeader("Connection", "Keep-Alive");
            Response.ContentType = "text/plain";
            Response.StatusCode = 200;
    
            BasicVideoInformation information = MediaInfoHelper.GetBasicVideoInfo(filename);
    	Response.Write( information.DurationMilliseconds * 1000.0);
    BasicVideoInformation and MediaInfoHelper classes came from libvlcnet open source library.

    the problem I have with this solution at the moment even though it's working is that when I seek (i.e. start a new stream with different start param) it takes 3-4 seconds to start playing.
     

    andri

    Portal Member
    July 16, 2009
    13
    0
    Home Country
    Iceland Iceland
    beregg
    as I have noticed during my pre testing it seems like the webserver only binds to the specific ip given in the config
     

    beregg

    Portal Member
    May 29, 2008
    39
    1
    Home Country
    Germany Germany
    I Got it

    I had to activate tvservice in the windows firewall to work with internet and also i forgot to add the 8080 in the firewall ... works well...
     

    tudorg

    Portal Member
    December 19, 2008
    5
    0
    Home Country
    United Kingdom United Kingdom
    anyone help me , i have the tv service playing through the web interface on direct and mpeg2 but avi wont open,
    also any idea on how to make music files play as well
    else from that works like a dream
     

    tudorg

    Portal Member
    December 19, 2008
    5
    0
    Home Country
    United Kingdom United Kingdom
    vlc transcoding

    my mencoder wont transcode the divx
    what would be handy is some vlc transcoding parameters to get me started
    eg
    i would like to produce either a wmv or divx output via vlc
    any help appreciated
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom