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

Status
Not open for further replies.

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
Hi thank you for this plug-in. I'm not completely sure if I understand what I can do with it.

Is it corect that it is for controling MP through a web-browser? If so would it then be possible to control it via a windows mobile phone (or a PDA)?
Is it possible to change the lay-out of the web-page so that it would fit on the small screen on a phone?
 

gemx

Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Basically it does/provides:

    - WebServices to control TvServer and get infos from the MP db and TvServer databases
    - provides a "simple" web interface which uses these web services and provides streaming of all supported media (Live-Tv, Live-Radio, Recordings, MP Videos, MP Music, MP Pictues)

    You can either

    - modify the web application to better utilize the small screen resolution of PDA's
    - create your own webpages which just use the webservices
    - create a Windows Mobile app which uses the web services

    So you see, you have all choices. All using the web services which are the basis of this plugin.

    Probably the easiest way is to modify the web app (the .aspx pages)

    If you have any further questions, feel free to ask :D

    The plugin is more a framework to expose MP and TvServer functions and databases through web services so it would be great to see something which uses these web services just like the very poorely "design" web interface
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,754
    652
    Farum
    Home Country
    Denmark Denmark
    I just installed V2 of this promising plugin.
    To make it run I had to modify gentle.config in the htdocs folder to use SQLServer since I am still using MSSQL.

    It works great with live TV to VLC in multiseat. I can't wait to try streaming from away from home with reencoding/zapping on the fly. That will be extremely cool :D For that to work I will have to forward some ports in my router, I guess.

    Issues:
    1. Radio shows exactly the same as TV (in webserver)
    2. I couldn't get mencoder method to work. I placed mencoder.exe in C:\. Is there more things necessary to make reencoding work on the fly?
     

    mironicus

    Portal Pro
    March 9, 2008
    688
    44
    I get the same error message like fremel. (DirectshowLib was not found).

    Running Windows 7 x64 with Mediaportal and MySQL.

    Serverfehler in der Anwendung /.
    Die Datei oder Assembly "DirectShowLib" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
    Beschreibung: Unbehandelte Ausnahme beim Ausführen der aktuellen Webanforderung. Überprüfen Sie die Stapelüberwachung, um weitere Informationen über diesen Fehler anzuzeigen und festzustellen, wo der Fehler im Code verursacht wurde.

    Ausnahmedetails: System.BadImageFormatException: Die Datei oder Assembly "DirectShowLib" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.

    Quellfehler:

    Beim Ausführen der aktuellen Webanforderung wurde einen unbehandelte Ausnahme generiert. Informationen über den Ursprung und die Position der Ausnahme können mit der Ausnahmestapelüberwachung angezeigt werden.

    Überwachung beim Laden der Assembly: Mit folgenden Informationen kann bestimmt werden, warum die Assembly DirectShowLib nicht geladen werden konnte.

    WRN: Protokollierung der Assemblybindung ist AUS.
    Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
    Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
    Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.


    Stapelüberwachung:

    [BadImageFormatException: Die Datei oder Assembly "DirectShowLib" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.]
    System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
    System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
    System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
    System.Reflection.Assembly.Load(String assemblyString) +35
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

    [ConfigurationErrorsException: Die Datei oder Assembly "DirectShowLib" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.]
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1149
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +323
    System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +116
    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +212
    System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
    System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +795
    System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +191
    System.Web.Compilation.BuildManager.CompileCodeDirectories() +617
    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +597

    [HttpException (0x80004005): Die Datei oder Assembly "DirectShowLib" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.]
    System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +79
    System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +903
    System.Web.Compilation.BuildManager.CallAppInitializeMethod() +25
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1016

    [HttpException (0x80004005): Die Datei oder Assembly "DirectShowLib" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +557
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +769


    Versionsinformationen: Microsoft .NET Framework-Version:2.0.50727.4927; ASP.NET-Version:2.0.50727.4927
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Uploaded Alpha 3.

    Fixed Radio showing Tv Channels (Thanks Seidelin)

    According the encoding: I haven't played much with the encoding/transcoding methods and parameters. I found FFMpeg to work better than mencoder.
    Also every file type seems to need some other params, that why i added the configurable streaming profiles.
    You probably have to play around with that and i would be happy to get some ideas which params work best.

    To those who get these exceptions with directshow lib under X64 like mironicus:

    Please try to copy the directshowlib.dll from your tvserver or mp installation to htdocs/bin

    That should work.
     

    mironicus

    Portal Pro
    March 9, 2008
    688
    44
    To those who get these exceptions with directshow lib under X64 like mironicus:

    Please try to copy the directshowlib.dll from your tvserver or mp installation to htdocs/bin

    I still get the same error after doing that.
     

    Nephilim

    Extension Developer
    February 8, 2007
    805
    499
    Home Country
    Italy Italy
    To those who get these exceptions with directshow lib under X64 like mironicus:

    Please try to copy the directshowlib.dll from your tvserver or mp installation to htdocs/bin

    I still get the same error after doing that.

    Same here.
    Should be a problem releted to the x64 platform...
    Maybe compiling your project in x86 (like MP) can solve the problem.

    Bye,
    Nephilim
     

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,159
    750
    Uploaded Alpha 3.

    To those who get these exceptions with directshow lib under X64 like mironicus:

    Please try to copy the directshowlib.dll from your tvserver or mp installation to htdocs/bin

    That should work.

    Tried, but didn't solve it - can you make a complete list of required files?
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,559
    312
    57
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    :eek:

    I wish I'd known about your secret before I completely re-wrote iPiMP! Much of what you have done here I have also had to do.

    Here's a few questions & comments.

    1. How do you do live TV transcoding & streaming? Is it VLC?
    2. Do you use the same transcoding/streaming solution for TV/Radio/Recs/Movies & Music?
    3. Some of your operations could return very large responses (e.g. GetMusicTracks), you could add a filter to such operations (e.g. filter=genre, value=pop), this would allow users to narrow their search and reduce the size of the response.

    These are my initial questions, I'll look into this in more detail and see if more pop up.

    I agree with the post above, such a web standards based interface to MP will be a HUGE bonus and will help drive plugin / addon development, so thanks for this!!

    Cheezey
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    :eek:

    I wish I'd known about your secret before I completely re-wrote iPiMP! Much of what you have done here I have also had to do.

    Here's a few questions & comments.

    1. How do you do live TV transcoding & streaming? Is it VLC?
    2. Do you use the same transcoding/streaming solution for TV/Radio/Recs/Movies & Music?
    3. Some of your operations could return very large responses (e.g. GetMusicTracks), you could add a filter to such operations (e.g. filter=genre, value=pop), this would allow users to narrow their search and reduce the size of the response.

    These are my initial questions, I'll look into this in more detail and see if more pop up.

    I agree with the post above, such a web standards based interface to MP will be a HUGE bonus and will help drive plugin / addon development, so thanks for this!!

    Cheezey

    Regarding the streaming:

    You can define different streaming profiles in the config (you can use VLC, ffmpeg, mencoder - whatever you like).
    These profiles consist of 4 things

    - the program used for transcoding
    - the command line options for transcoding
    - the input method (how you "feed" a file to the transcoder. e.g. named pipe, standard in...)
    - the output method (how you read the transcoded file)

    These profiles can be used in all pages. Just select the profile you want to use and click on "play".

    How It works:

    In Streamer.aspx we do:

    - determine type of media to stream depending on the querystring (idChannel=Tv/Radio, idRecording, idMovie...)
    if query string contains "idChannel" we have to start timeshifting before
    - Open the media file as a stream
    - Create a transcoder object which itself is a stream
    - read the stream and copy it to the output stream of the http response

    Most of the ideas for on the fly transcoding are from Valk's stream-tv plugin.

    Regarding the web services:

    Having the possibility to narrow down the results via query is probably a good idea.
    But i wanted to keep it simple for the Alpha.
    Will add that later :)
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom