Friday, October 29, 2010

VLC Stream & Convert + VPN = Stream HD Over 3G/4G with Android (Part 2)

Alright, as promised, here are some screenshots to help with the setup so you can stream HD over 3G/4G to your Android phone.

First, recall my previous post on the subject and the tools required to get the job done
  • Phone with Android (I suppose this could work on iPhone/iPad as well)
  • Computer for VPN Server (allows phone to VPN connect to your LAN)
  • Computer for VLC media player (free software, must activate web interface)
  • VLC Stream & Convert app from Android Marketplace (free)
Setting up VPN on the phone is relatively easy.  Here you see some of the VPN choices Android 2.2 offers.  PPTP is by far the easiest and most popular type of VPN.
Types of VPN available on Android for setup

Once you setup the VPN, which for PPTP is as easy as providing the server address (IP address) and credentials (user/pass), you will have a VPN network that you can connect to.  Screenshot below shows a "Home" VPN after it has been added to the phone.
"Home" VPN Network, click to connect
When you click the network to connect to the VPN you will need to supply the user/pass.  This user/pass is the one you setup on the computer with the incoming VPN connection.  Once connected it will tell you so, and place an active key icon in the phone status bar.

Once the phone is connected to the VPN, go ahead and open VLC S&C on the phone.  Make sure you supply the correct server address for your computer with VLC media player running.  Also make sure that VLC has the "web interface" active (view > add interface > web interface).

Here is the home screen in VLC S&C with the menu open.  You need to supply the computer information under the connect menu.
VLC Stream & Convert Menu
VLC Stream & Convert Connect Menu

Once finished go ahead and click connect.  If it all is going well you will get a connect prompt, and the VLC logo in the phone status bar will be active.  When VLC S&C is disconnected that icon will have a red X through it.  Plus you will get an error, "can not connect to bla bla bla."

Put your player mode on "Stream to Phone RTSP".  Open the Browse tab and select your movie/tv/video files you wish to play (.mkv play very, very well).
Browse tab displaying folder tree
Now, for some example screenshots of the quality you can expect to come through on 3G:

Streaming Alice & Wonderland over 3G in portrait mode
Streaming Alice & Wonderland over 3G in landscape, showing controls
Streaming Alice & Wonderland over 3G in landscape, showing subtitles
Streaming Avatar over 3G in landscape
 Couple of notes on the example screenshots:
  • These files being played by VLC are .mkv rips of HD sources, these are 720p rips (technically VLC S&C will play anything VLC will play, so have at it, I used these for illustrative purposes). If you'd like to show screenshots of other types of files say so in the comments and I'll post them.  I have SD, 1080p, other 720p, HDTV rips, etc etc. 
  • It is hard to take screenshots of live video - so if you see a line, as you can sort of see in the last one, that is because of the movement in the video, not the quality of the playback.  I tried to use pause, and then screenshot, but pause reduces the video to half size in the app and negates the purpose of trying to take a screenshot...
  • VLC S&C is free, but there is also a paid version.  The free version is limited in some functionality, but also has some quality limitations for the H.263 and H.264 codecs.  I am using the free version with the H.264 and the bitrate on 768.  Aspect ratio is on 16:9.  For playback, landscape video width is set at 880 (for the EVO4G).  For playback, portrait video width is set at 480.  I find these settings to work extremely well on most .mkv for the EVO4G.  I hope that comes through on the screenshots.  
  • Playback is free of stutter and audio is in-sync, clear and crisp

So there you have it...streaming HD (or SD) video over 3G/4G to an Android phone.  Using nothing but freeware and windows.  The solution is simple, first establish the VPN connection, then fire up VLC Stream & Convert on the phone.  Navigate to your files, play, and enjoy HD video on your phone while on the go.

Questions/Comments/Rants/Raves, put them in the comment section.  Hopefully this post has been useful for somebody! 


Thursday, October 28, 2010

VLC Stream & Convert + VPN = Stream HD Over 3G/4G with Android (Part 1)

Laides and Germs,

You'll have to excuse me for not updating in the recent past - been very busy.  Working two jobs.  One for NASA, and another, well for someone else.  Plus there's another job in music.  Then there's all that glorious free time, which is mainly used for laundry, bills, drinking, and sleeping.  Occasionally eating too.  I am a skinny bastard though...

OK, I'll get right to the point - I am a huge fan of VLC Stream & Convert app for Android.  It's fucking smoking.

Ex Screenshot of VLC S&C Showing Major Functions
This post is all about using that app to stream HD video to your phone over 3G/4G.

Technically, VLC S&C does this "out of the box".  However, you'll find forums, posts, and comments all over talking about problems and issues with RTSP (real time streaming protocol) and just problems in general.  You will also run into issues with your carrier - note the setup instructions in that link, for each carrier it can be different, or blocked completely...Hell, even I couldn't get the bitch to work properly over 3G/4G (Sprint).  I could connect to the computer running VLC via 3G/4G, but I couldn't play shit.  Of course, this doesn't make the app useless, you can totally connect via your local wifi and go about your business.  See my earlier post on that bad ass business.

But, if you want 3G/4G HD streaming, I believe I have found the best way to do it - with VPN.  It is working for me.  In fact, while I'm writing this, I'm streaming Star Wars IV, A New Hope, in 720p (.mkv file) to the EVO4G over 3G with NO STUTTER.  Audio is crisp, video is perfect quality.  Like I was watching it on my plasma tv.

The solution is so simple, I love it:  You first connect the phone to the VPN server on your network, then fire up VLC S&C.  Then connect VLC S&C as usual, and viola you are finished.

I'll try to clean this post up a bit in the next few days with more instructions and hopefully some screenshots.  For now, this rough bullet list will have to suffice:
  • Android (and iPhone for that matter) can connect to VPNs
  • Setup VPN on your local home network (ex, vista setup instructions)
  • Connect the phone to the VPN (not too hard, just supply the server address and credentials)
  • On a computer on your network, open VLC and run the web interface (see VLC S&C setup)
  • On the phone open VLC S&C and connect to that computer running VLC (phone should already be connected to VPN, and therefore using a local address!)
  • Browse to your HD files and start streaming to the phone via RTSP as usual, enjoy your HD (720/1080), SD, Audio, whatever on your phone wherever you go!
There you have it.  Streaming HD to your Android with all freeware and minimal effort.  Well, minimal effort for you all, it took me a bit to sort through it all and get it working...

Don't forget, if you're behind a router/firewall to get your port forwarding on.  For both VLC and the VPN, holes will need to be punched in the firewall.  Totally standard and not difficult, but it is required. 

If you have questions or problems go ahead and leave a comment.  I'll do what I can.  If any of you decide to get this going yourself, please post and tell us about your success!  I'd love to think that others can get it working too (I'm already working on showing this to my close friends and coworkers)