[Obsolete] MPWebStream: Stream TV over the internet (2 Viewers)

RICHARDG

Portal Pro
August 21, 2006
333
3
64
Canada
Hey guys.
I tried the plugin yesterday and it worked like a charm first off. Then half way through the day it started to fail.
Integrated Cassini web server crashed with exit code -532459699,
IT stopped all scheduled recordings and well just plain didn't work anymore. I had not changed a thing. I was all excited and was about to show my wife that she could get streaming TV on her Ipad...then nada.
I have attached the files, any thoughts would be appreciated.
 

Cindy80

New Member
September 2, 2012
3
0
44
Home Country
United Kingdom United Kingdom
Hi all,

As MPWebServices isn't developed anymore and it's quite hard to setup it (especially on 64-bit) and TV4Home doesn't feature a streaming service yet, I developed one, mainly based on the code from Valk (StreamTv) and Gemx (MPWebServices).

Installation instructions:
  • Download and install the TV4Home Core Service update 3 from here. For MediaPortal 1.2 beta, use the version I posted here.
  • Download and install MPWebStream, attached to this post.
  • Enable the MPWebStream plugin in the TV Server Configuration and configure at least the username, password and site root there.
  • Restart the TV Server
  • Go to http://<your ip address>:8080/. Log in and you'll find a very basic page with links to streams for all channels, both playing in the VLC browser plugin or direct links for copying into external applications.
For advanced users:
MPWebStream is divided in three parts: a webserver (Cassini), a TVServer plugin (for configuration and starting the webserver) and the (ASP.NET) site itself. Disabling each part is possible, but you need at least a webserver (either the built-in one or IIS). Running the site under IIS is quite easy: disable the webserver and change the site root in the configuration and configure IIS. Specify <mediaportal installation dir>\Plugins\MPWebStream\Site as application root. IIS7 may want that the configSections node is commented out in the Web.config file there.
When using an external webserver the TVServer plugin only does configuration, so that can be disabled too (configuration file is in the same directory as MediaPortal's log directory).
The webserver runs entirely outside the TVService process, so if it crashes the TV server keeps running (to avoid the problems with MPWebServices). It does even restart itself if possible.
Specifying transcoders is a bit harder and it's quite hard to find problems when you've done it wrong. I'll add some default configurations in future releases. For ffmpeg you need to use NamedPipe as input and output. {0} and {1} are substitued with respectively the input and output filename (you can't use these for StandardIn and StandardOut).

For developers:
I also included a (WCF) service to retrieve URLs for streaming and transcoding. Sadly hosting a WCF only works under IIS or using WAS, so it doesn't work in the default setup with Cassini. The service is available at http://<path>/MediaStream.svc. API documentation is only available as source code here, but it's quite easy. At the moment you need to get the username and password from the user and then pass it to the API.
You can also integrate streaming and transcoding into your own application. The MPWebStream.MediaTranscoding namespace is meant for this. It features a single class, TranscodingStreamer, which can handle the transcoding and streaming. Send me a message if you need any help.

Update 1 May 2011
I've released a new version of MPWebStream. New features include:
  • Default transcoder profiles for H.264 and MPEG4 streaming for 500Kbit/s, 1Mbit/s, 2Mbit/s, 5Mbit/s and 10Mbit/s using ffmpeg.
  • Default transcoder profile for Android streaming, see other thread.
  • More stable transcoding
  • Playlist (M3U) support
  • Support for streaming of recordings
  • Splitted the transcoding and streaming part out into a seperate library that can be integrated in other plugins
Due to massive changes, you have to uninstall the previous version to install the new version. If you want the new transcoder profiles, also delete the file C:\ProgramData\Team MediaPortal\MediaPortal TV Server\MPWebStream.xml (on Windows 7. for other versions open the logs directory of MediaPortal, and then go one directory up). Note that you'll loose your configuration with this, so you might want to back it up.


There are still some small problems, mainly with transcoding, that I'm working on. Expect an 1.0.1 release somewhere in May, with some more stability fixes. Please report any issues you encounter here.

Builds for MediaPortal 1.2.0 aren't tested very throughly as I don't have a developer machine with a TV card in it, but it should work. You need an updated version of the TV4Home Core Service for these builds, which I've posted here.

Source code can, as always, be found on GitHub.


Hi Oxan,

Thanks so much for your hard work with this great applications. I am a beginner for this field and I have followed the instructions provided from this forum to set up my server and all my client devices, they all work. However, I still have a minor problem but I don't know what is wrong. I have copied all the M3U links from MPWebStream and create the strm files and use xbmc to stream video from the MPWebServer it works smooth and the connection is really quick, but it ALWAYS STARTS 2 OR 3 TIMESHIFT at the same time for only 1 channel streaming and locks all tuners, when we stop streaming only 1 timeshift stop and others are still running so we can't change to other channels. If it starts 1 timeshift every time we stream it is perfect and when we stop streaming everything clear if 1 timeshift start, and we can change to other channels. I really have no clue if I setup incorrectly, or the issue caused from XBMC, or the TRANSCODER SET DEFAULT (START 2 , 3 TIMESHIFT at the same time for only one channel). Your help is very much appreciated.
 
Last edited:

Oxan

Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    That might be due to MPWebStream starting the timeshifting on the request of the m3u file, and XBMC requesting the file multiple times. I'm not sure though.

    However, this is ancient software which I don't maintain anymore. You should consider switching to the newer MPExtended and/or WebMediaPortal.
     

    Users who are viewing this thread

    Top Bottom