MPCast - ChromeCast emulation for MediaPortal

Discussion in 'MediaPortal 1 Plugins' started by Maschine, March 8, 2014.

  1. Maschine
    • Premium Supporter

    Maschine Retired Team Member

    Joined:
    June 15, 2004
    Messages:
    768
    Likes Received:
    78
    Location:
    Germany
    Ratings:
    +84 / 0
    Home Country:
    Germany Germany
    Disclaimer: Consider this plugin as proof of concept. It offers just very basic functions and is far from being completed and ready for production use. Any help with the development is appreciated!

    Hey guys,

    since Google released their ChromeCast stick last year, I liked the idea to easily send content from a phone or tablet to the "big screen". I bought a ChromeCast stick and had the idea to reproduce its functionality into MediaPortal. With this new plugin for MediaPortal 1 you can turn your HTPC into a ChromeCast device which can play content from mobile devices like smartphones or tablets. See the following video on how you can send a YouTube video to a ChromeCast stick / your MPCast installation:



    Current features and limitations:
    • MPCast runs as a MediaPortal process plugin and emulates a ChromeCast device by announcing its service to the local wifi network. Supported apps on Android or iOS devices can send their content to be played within MediaPortal.
    • There is basic support for the YouTube app: You can start a video and play it within MediaPortal.
    • Controlling the video from mobile devices is not implemented yet and communication after starting the video is not working which will result in network errors on the mobile device.
    • No other apps then YouTube are currently supported.
    • The official ChromeCast app on mobile devices will be able to see the MPCast instance, but not connect to it.
    • MediaPortal integration is very basic yet.
    Installation instructions:
    • Install MediaPortal (1.6 and 1.7 should work) and OnlineVideos plugin (version 1.7 or 1.8 should work).
    • Download the "xxx-bin.zip" file and extract its content to the "MediaPortal/plugins/process" folder.
    • Execute "MPCastAccessConfigurator.exe". This will allow your Computer to listen for incoming requests on port 8008.
    • Open your Windows Firewall on TCP port 8008.
    • Start MediaPortal configuration, enable MPCast plugin and check the settings if the correct IP address is set for MPCast. You can also change the name under which your MPCast device will be announced.
    • Start MediaPortal
    Usage instructions:
    • While MediaPortal is running, open the YouTube app on your mobile device.
    • Start playing a video of your choice.
    • The ChromeCast icon should appear in the YouTube app. Select the icon and choose your MPCast instance.
    • The video now prepares to play which could take some time. After some seconds, the video should start to play in MediaPortal.
    • Hit the ChromeCast icon again, choose "Disconnect" and stop playback on the mobile device.
    Call for developement help:
    Please see the following post for a call on development help. Any help is appreciated!

    Maschine


     

    Attached Files:

    • Like Like x 11
    • Great Idea! Great Idea! x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Maschine
    • Premium Supporter

    Maschine Retired Team Member

    Joined:
    June 15, 2004
    Messages:
    768
    Likes Received:
    78
    Location:
    Germany
    Ratings:
    +84 / 0
    Home Country:
    Germany Germany
    Call for development help
    Since I'm not a .NET developer and my experience with network programming is not the best, too, the progress I made during programming MPCast was quite slow. My code is heavily based on CheapCast, LeapCast and NodeCasts (other projects to emulate the ChromeCast stick in JAVA, Python and JavaScript). Reading their code helped me a lot.

    Some technical details what I have so far: The announcement of a ChromeCast device and the respective mobile device is done using SSDP, which is also used within the upnp protocol. When a mobile device found a ChromeCast device, it gets its basic configuration using HTTP request with XML-formatted answers. E.g., the ChromeCast device announces the availability of the YouTube ChromeCast app. Then, for YouTube, the mobile device sends a HTTP POST request with the desired video URL to play.

    The next step would be to open up communication channels for passing commands like pause, play, volume control, etc. to the ChromeCast device. This is done using Websockets. Here my knowledge ends and having tried this for many hours now I give up and count on your help, guys!

    If anybody has some knowledge about Websocket programming in C# and is interested to help me with this project, please let me know! Any assistance is appreciated and I'm all open for suggestions. I can give a more detailed description on what needs to be done, if there is any feedback.

    Thanks in advance
    Maschine
     
  4. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Very nice! Ever since i saw this feature on the Smart TV of my mother, i wanted this for Mediaportal. I will give it a try later today.
    As Youtube doesnt work with OnlineVideos 1.7 anymore, and there is no OnlineVideos 1.8 for Mediaportal 1.7 pre yet, i guess it will only work on MP 1.6 with OV 1.8. So i will set this up on my Laptop later to test :).

    Thanks you!

    Edit:
    Tried it out, and works very well for a first version.
    Starting videos works like expected. Only problem i had, when a video is playing in mediaportal and i then want to start a new one using the cast, mediaportal crashes. But thats expected aswell i guess :).

    I hope you continue your work on this plugin. Love it already.

    If you need anything tested, now or later, just let me know.

    Was using MP 1.6 + OV 1.8 and Nexus 4 with Android 4.4.2
     
    Last edited: March 8, 2014
    • Like Like x 1
  5. Maschine
    • Premium Supporter

    Maschine Retired Team Member

    Joined:
    June 15, 2004
    Messages:
    768
    Likes Received:
    78
    Location:
    Germany
    Ratings:
    +84 / 0
    Home Country:
    Germany Germany
    Thanks for testing :)

    Indeed I'm aware of this error. I can reproduce this behavior, though, could not fix it... Before starting a new video, please let the first one finish or stop it manually using your remote or the keyboard (key "b").
     
  6. FreakyJ
    • Team MediaPortal

    FreakyJ Development Group

    Joined:
    July 25, 2010
    Messages:
    4,021
    Likes Received:
    839
    Gender:
    Male
    Ratings:
    +1,424 / 1
    Home Country:
    Germany Germany
    I tried it now several times also with firewall disabled but I can't get it to work :/

    log file says it started:
    Somehow my mobile just don't want to find my HTPC...
     
  7. Maschine
    • Premium Supporter

    Maschine Retired Team Member

    Joined:
    June 15, 2004
    Messages:
    768
    Likes Received:
    78
    Location:
    Germany
    Ratings:
    +84 / 0
    Home Country:
    Germany Germany
    Just to be sure: did you start the YouTube app on your mobile?

    Other connection issues might arise if both devices (mobile and HTPC) are connected with wireless adapters. For my FritzBox router I had to allow communication between wireless devices explicitly.

    You could also download a little util, HTTPconfig (http://www.stevestechspot.com/downloads/httpconfig.zip), which checks and lists the opened port. Please see, if port 8008 is listed as accessible there.

    Thanks for your feedback and good luck!
     
  8. el-Dia
    • Premium Supporter

    el-Dia MP Donator

    Joined:
    July 27, 2009
    Messages:
    25
    Likes Received:
    3
    Ratings:
    +3 / 0
    Home Country:
    Norway Norway
    Show System Specs
    Hi. Tested the MPCast with success. Thanks for taking your time to create the plugin for MP!
    I too have been wishing for this plugin since the chromecast came out. : )

    Had some trouble getting it to work reliably in the beginning (same symptoms as FreakyJ), but after some troubleshooting I found my router (OpenWrt) was missing UPNP. Even though DLNA Renderer was working OK with MP. In addition Chrome on the same PC with CR cast worked too.

    After adding the UPNP service, MPcast/Chromecast has been working reliably every time. : )

    Here are some troubleshooting pages with good info and tips:
    https://support.google.com/chromecast/table/3477832?hl=en&ref_topic=3205565
    https://productforums.google.com/forum/#!topic/chromecast/HyxnH4poMzU

    "netstat -aon" can also confirm that you have port 8008 listening.
     
    • Like Like x 3
  9. scott_mckenzie

    scott_mckenzie Portal Pro

    Joined:
    April 3, 2012
    Messages:
    69
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Australia Australia
    Show System Specs
    Hey, this is the plugin I have been desperate for without even thinking someone could create it!

    My big question is, how stable is it? I would happily chip in a bit of spare cash to accelerate delivery.... Before I set it up I just want to ensure it is stable for WAF as My HTPC has been incredibly stable this year and don't want to break it.
     
  10. el-Dia
    • Premium Supporter

    el-Dia MP Donator

    Joined:
    July 27, 2009
    Messages:
    25
    Likes Received:
    3
    Ratings:
    +3 / 0
    Home Country:
    Norway Norway
    Show System Specs
    My experience with the plugin is positive regarding it's impact on stability.

    MediaPortal seem to start a bit too fast for this plugin to work after a reboot. But if I close MP and start it again, it works OK.
    But, I don't use the plugin all too much. Perhaps once every/every other week.

    But i would love support for a few more apps, like Netflix, HBO Go, even Chrome : )
     
  11. Spragleknas
    • Team MediaPortal
    • Administrator

    Spragleknas Administrator

    Joined:
    December 21, 2005
    Messages:
    9,472
    Likes Received:
    1,385
    Gender:
    Male
    Occupation:
    Occupied
    Location:
    Located
    Ratings:
    +1,892 / 12
    Home Country:
    Norway Norway
    Show System Specs
    @Maschine : Any thought on doing this for MP2? What do you thinkk, @morpheus_xx ? Would semi-solve missing Netflix/HBO and (soon) Spotify features...?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 1)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!