How to stream media to an Android device over LAN or the Internet

A couple of weeks ago I purchased an Android tablet (The Google Nexus 7 which is excellent btw). One of the first things I wanted to do with it was to be able to stream my music and films to it over my home network. I naively thought something like this would have been supported as standard in the latest version of Android (v4.2.2 at the time of writing) but it isn’t. To get this working there are a number of steps that you will have to follow which I will outline below.

The first step is to set up a media server. Now what do I mean by this. Well ideally you want some software that can interface with all of your devices (not just Android). There are a set of networking protocols that allow this which come under the Universal Plug and Play (UPnP) system. So our server will have to support these. Also, many modern devices also support DLNA (Digital Living Network Alliance). Most modern TVs, games consoles, mobile phones and many more devices are DLNA certified so it would be ideal if our server software can interface with devices as well. After doing a bit of searching I found the Universal Media Server. It is a DLNA compliant UPnP server that is written in Java so it will work on Windows, Linux and OSX. After installing UMS you will be presented with the form below:

Universal Media Server

There are many things you can configure but the main thing we want to look at are under the “Navigation/Share Settings” tab. Here you can choose the folders you want to share and I also checked the “Hide #–Transcode–# Folder” option as you don’t want these cluttering up your view of the files.

transcode

Once you have made your changes to the sever settings, click “Save” at the top of the form and then restart the server. You now have a media server that is ready to serve all of your selected media over your home network (Don’t forget to add in firewall exceptions so Java can communicate through it). If you have an Xbox you will be able to see this server under “TV & Movies” -> “My Video Apps” -> “System Video Player”. You will then prompted to select a media source and the UMS should now be showing. You will then be able to play music and video through your Xbox so long it supports the format of media you are trying to play. However, this doesn’t help with my Android tablet I hear your cry. Well, to connect into the UMS that you just set up with an Android device you will have to download an app from the Google Play Store. There are quite a few apps that will do this however the one I would recommend is BubbleUPnP. BubbleUPnP is a fully featured UPnP/DLNA Control Point and UPnP Media Renderer as well as an actual UPnP Media Server as well. The free version of this app will allow you to connect to a media server over your LAN only. If you want to connect to your media over the Internet via it you will have to pay for the fill version which is around £3 at the time I am writing this blog. To connect BubbleUPnP to your UMS that you just set up go to the “Devices” tab. Here you will see all of the UPnP/DLNA servers on your network.

Screenshot_2013-03-23-15-06-30

You may have noticed a couple of things from the screen shot above. Firstly that my Xbox is listed in the renderers. A renderer is where the media will be played, so if I select “Local Renderer” it will be played on my tablet, if I select “Xbox 360” it will be played on my Xbox. Also if you have a TV with DLNA capabilities and have set it up on your home network it will also show on this list. This is how BubbleUPnP acts as a UPnP/DLNA control point allowing you to wirelessly choose where your media is played. You may have also noticed that my UMS that I set up is listed twice. The first UMS in this list is my tablet accessing the server over the LAN, the second is it accessing it over the internet. In this next section I’ll explain how to make your UMS accessible over the Internet.

The developer of BubbleUPnP has also made a bit of software called BubbleUPnP Server that sits over the top of our UMS that we set up earlier. BubbleUPnP Server allows one or more UPnP/DLNA media servers to be broadcast over your internet connection so you can have access to your media anywhere in the world. Installing BubbleUPnP server is straight forward however setting it up can be a bit tricky if you are unfamiliar with your router settings. However before setting up your router it is best to set up the BubbleUPnP server. Once it has been installed if the server management hasn’t opened up in your browser double click on the short cut it will have made on your desktop. You will then be presented with a page like this:

bubbleupnpserver1

This screen shows your external IP address (You will use this to connect to the server) and the ports that it will be running over. There isn’t anything you can change here but this page will be useful so we will come back to it later. The first thing you want to do is password protect your server otherwise anyone will be able to connect to it. Not doing this would be bad as not only would it be breaking the law in some countries but also it will eat up your internet connections upload bandwidth as people you don’t know can access all of your media. To do this click on the “Network and Security” tab.

bubbleupnpserver2

Here you can set up a Login and Password. These will be required when connecting to this server. Secondly you will have to say which media server you want to broadcast. This is done under the “Media Servers” tab.

bubbleupnpserver3

Once this has been done the server is good to go. To make this server visible to the outside world you may have to forward some ports through your router. The ports you will have to forward are 58050 (for HTTP traffic) and 58051 (for HTTPS traffic). Most modern routers have this capability so you will have to consult with the routers user manual if you don’t know how to do this.

If you want to connect to this BubbleUPnP Server through your Android tablet you will have to purchase the full version on BubbleUPnP on Google Play. Once you have done this go into “Settings” -> “Network & Settings” in BubbleUPnP on your Android device. Select one of the three “Unset” options and you will be able to enter in the connection settings. This is where the first “Status” page from BubbleUPnP Server will come in handy.

Screenshot_2013-03-23-15-18-39

The server address will be the in this form http://#ExternalIP#:58050 or for https https://#ExternalIP#:58051. You will also have to enter in the login name and password you set up in the BubbleUPnP Server settings. If you test the setting you have entered you will get a success or failure response. If you get at failed response then it will most likely be because you have entered in your IP address incorrectly or there is some not right in your router settings. If the connection is successful you will now be able to access all of your media from anywhere where your Android device has an Internet connection. The server will now be listed in the Libraries list and you will be able access all of your shared media files under the Library tab in BubbleUPnP.

Hopefully this guide will be useful and save someone a lot of time as this took me a good couple of hours to research all of the options and to get it all set up.

N.B. It is worth noting that streaming FLAC music files or HD movies over the Internet to your tablet will only work if your have a seriously good Internet connection as they will most likely use up all of your available upload bandwidth.

27 thoughts on “How to stream media to an Android device over LAN or the Internet”

  1. certainly like your web-site however you have to check the spelling on quite a few of your posts. A number of them are rife with spelling problems and I in finding it very bothersome to inform the reality on the other hand I will definitely come back again.

    1. Hi,

      Thanks for stopping by and commenting. I agree I do need work at my proof reading of my articles. These issues normally seem to happen to me as my mind moves much faster than the speed at which I can type so I sometimes miss words out etc… Either way, hopefully all the big errors have now been corrected.

      Cheers,

      Andy

  2. Heya i am for the primary time here. I came across this board and I in finding It really useful & it helped me out a lot. I’m hoping to provide something back and help others such as you aided me.

  3. I found your article quite useful, though when I’d set up UMS and the bubbleupnp app I found I had some technical issues to work through. Nothing could see UMS and vice versa.
    I read the UMS log file, scoured forums and had success when I changed the “Force Port of the Server” (under General Configuration in UMS) from the default 5001 to 6001.
    Thanks for getting me started.
    BTW I use the bubbleupnp app to stream to a Sony NS510 Wireless Speaker. (Unfortunately it can’t handle Flac files, though it can play lossless wav.)

    1. Glad you found the article useful. For some reason I didn’t come across the port issue you encountered. As for the FLAC issue, I think it is possible for UMS to transcode the music files on the fly while it sends then. I’m not too sure how to set all this up in UMS though.

  4. Hello
    You don’t need Bubble Upnp server on a PC to stream media over wan to an Android phone.
    Upnplay, available for free on the PlayStore can connect to an Upnp server (Twonky for me on my Qnap NAS), and stream what you want !
    You just have to forward ports, and have a Dyndns domain or a fixed IP.

    1. Nice find. I have just tried it on my Nexus 7 over LAN and it works quite well. However, allowing my media to be accessed over WAN, its nice to have some extra security. BubbleUPNP Server allows that by streaming via HTTPS and also having a username and password login. This stops anyone from seeing and accessing your media. Something which Universal Media Server does not allow (I’m not sure about Twonky). The last thing I would want is random people watching my films and listening to my music (I’m sure there would be piracy issues as well) as well as eating up my upload speed.

  5. Interesting and useful. However, did you find any Android (Nexus 7) player working with the transcoded video files of UMS? I need this feature in order to use the external subtitles, but none of the players I used seem to work. I tried MXPlayer, VPlayer, BSPlayer, Archos, Mobo, Dice… VLC starts ok and seems to recognize the stream, but crashes in less than one minute (although I can use it with locally stored files).

    1. Hi,

      Glad you found the article useful. I haven’t set up the transcoding of video files in UMS yet, however I’m planning on doing so (Once I find out how to do it) as my Nexus 7 is struggling to play my 1080p BluRay MKV rips. I can get subtitles to work in these rips as I included them in the file however I haven’t tried an external subtitle file. All in all I am very disappointed at the video players that are available with Android. They all seem crap, either playing the video with no sound or playing sound with no video or lagging all the time. None of them seem to just work, which is a shame. Watch this space as I’ll put up anything I find in a new blog post.

      Cheers,

      Andy

      1. Hi again,

        I am currently evaluating Mezzmo from Conceiva. Not free, but reasonably priced and they also have a 15-day trial version. Haven’t tried transcoding yet, but external subtitles are definitely working. I will also try some 1080p material in the week-end. Everything up to and including 720p works great on the Nexus 7 with BubbleUPnP and MX Player or BSPlayer, no transcoding needed.

  6. Hi. Just wanted to say thanks for the guide.
    I ended up using servioo media server instead of universal media server, as the universal one kept giving me various playback issues. Servioo has been working great so far 🙂

    1. Hi,

      Glad you found it useful :).

      Serviio look quite cool. Is it able to transcoding of video as it streams? If it does it may help with my streaming of 1080p MKV files.

      Cheers,

      Andy

  7. To play media files or view any file on your android device from your pc try the airstream app its free and works a treat, get the app from play store, you will need to download the pc program from the web.
    I can even play DVD’s from my DVD drive.

  8. Very helpful article. I installed bubbleupnp on my windows 7 laptop to share my window media player library with my android table. However, the windows media player does not appear on the Devices tab as it does in the second screenshot of this article .
    The free version of the Bubbleupnp app was installed on the android device. I could play the media from my android device on the windows media player…Unexpected surprise.
    Any advice on how to make the windows media player appear on the devices tab will be appreciated.

  9. Nice article. I have followed the guide and have everything setup however I have a slight problem in anything I stream from the PC setup as the media server to the chromecast contantly buffers.

    I believe the problem may be that the PC the server runs on is in a different room to the chromecast ready TV, the wireless router for the internet is in the same room as the chromecast and the PC has to use a wifi booster/repeater in the hall to get full strength signal to the router.

    Do you know anyway to setup the system so the server sends the data via the wifi booster to the chromecast? Or is there a way I can attach the PC via a wired connection to the router than have use the wifi on the router to connect to the chromecast?

    1. Thanks, glad you found the article useful. Chances are that it is the WiFi speed that will be causing the buffering. You’ll only get the full advertised WiFi speed of a router when the receiver has maximum signal strength. This is not normally possible in most people houses. If you can have the PC connected to the router or WiFi booster (I assume its the wireless equivalent of a network switch) by LAN/CAT5 cable then that will reduce the WiFi signal strength issue. Hope that helps :). Let me know how you get on.

  10. I have videos in my pc with windows 7.
    I need to play this videos in my tv using my private lan.
    windows media play is very poor, I dont like it.
    I need a dlna player.
    What player is the best?
    thank you very much and excuse my english.
    I was born an live im Brazil.

  11. When using bubbleupnp as a control point on an Android device to stream from media server to chromecast, does data travel from server to control point to chromecast -or- directly from server to chromecast? Im trying to stream hi rez 5 channel audio (wav/lpcm) and there doesn’t seem to be enough WiFi bandwidth although bit rate shouldn’t be that high compared to video. Works ok if transcoded to lower bits or sample rate… Thanks!

    1. I would have thought it would travel directly to the chromecast. I suspect the chromecast may be having trouble decoding the high rez audio.

  12. If I want to add this feature to an android device that can’t download the APPs, how can I add the media server?

  13. its not working for me..may be because I’m a noob..but i really wanna stream online videos on BubbleUpNp android and i just can’t seem to find a way to do so…a little help please? 🙂

    1. This could be many things. Does it would on your local network and not over the internet? If so it will be your your router configuration and you’ll have to forward the ports to your PC, which should be on a static IP address. If not, the first thing to check would be if the firewall on you computer, is blocking the ports?

  14. Universal media server (UMS) with the appropriate libraries on slackware and porteus work well computer side. On my android phone BubbleUPnP permits access to the laptop. And my Viera TV has access to the server. Thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *