Streaming videos to a MK802 Android system-on-a-stick

I got my MK802 Friday and immediately tried to stream videos… first via SMB shares (works, but the little decoder chip usually isn’t able to keep up with my movies) and then via TravelDevel’s VLC Stream and Convert, which I’m using on my LG P920. Unfortunately VLC S&C is not quiet up to the job of working on a landscape device and the developer has apparently dropped off the face of the earth. So I’ve decided to re-implement it via a tiny web-interface. It’s still very bare-bones, doesn’t work with newer VLC versions, doesn’t manage playlists and is missing any kind of configuration panel (you have to edit the source to change the settings), but it works (at 1024×600@24, 2048kbps). If there’s any interest I’ll release it under GPL and set up a project, but for now you are not allowed to redistribute it; you can only install it on your own machines and only if you accept that I’m not responsible for anything that happens.

Here’s how to get it working:

  • This was only tested on VLC 1.1.0. You can get it here. Install it.
  • Open it and go to Tools/Preferences and choose Show Settings/All at the bottom left.
  • Open Interface/Main intefaces and enable “HTTP remote control interface”. Press Save.
  • Close VLC.
  • Open the directory where you installed VLC and open the http directory.
  • Use your favorite text editor to open .hosts .
  • If you’re using static IPs in your home network, which is highly recommended since it allows you to bookmark VLC’s location on your MK802 and will make your network a LOT more secure, add a new line and write down the IP of your MK802.
  • Otherwise, uncomment 192.168.0.0/16 (remove the “#”). Note that this is very insecure since it will mean that anybody on your network will be able to control VLC which can do a lot of damage to your system. NEVER do it on a public or unencrypted network (in fact, if you’re using an unencrypted network, now may be a good moment to finally enable it).
  • Save .hosts
  • Extract this file to your http directory.
  • Open VLC.
  • On your MK802, open the browser and point it to your PC’s IP (if you don’t know, press Win+R, enter cmd /C “ipconfig & pause” and look for IP-v4 address, which should be something like 192.168.2.64), prefixed with http:// and followed by :8080/vlc.html# .
  • In my case that’s http://192.168.2.222:8080/vlc.html# (Yes, the # is important due to a bug in Android’s URL handler… for some reasons it will never display the hash code, which is what my script uses to keep track of the current directory, unless you enter the “#” manually first; otherwise you won’t be able to bookmark it). Open it and navigate to your desired root folder. Now you can bookmark it. Opening this bookmark will always return you to that folder.
  • Click on the file you want to play or click Play All next to a folder to add it’s whole content to the playlist.
  • Now, you might expect the video to play inside the webpage… sadly that’s not possible due to Android’s broken HTML5/video implementation. In order to see (or return to) the video, you have to press the Video button at the top left.
  • Note that the video will keep on playing on the server even if you leave the page, so don’t forget to press STOP if you value your CPU cycles.

Hope this helps. Thanks to TravelDevel for posting his VLC commandlines, particularly the parts that speed up h264 encoding.