- August 29, 2009
- 1,730
- 1,124
- Home Country
- Netherlands
Please note that MPWebStream is now obsolete and you should consider upgrading to MPExtended or WebMediaPortal.
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:
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:
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 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
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.
Attachments
Last edited: