Tuesday, June 22, 2010

Video Streaming to Android Nexus One using VLC

After reading a discussion on the MythTV Cast forum I explored VLC video steaming to my Android Nexus One. After some searching I found this helpful page. From that page I got VLC video streaming to my Nexus One working by doing the following:

I created a html page on my MythTV server called stream.html with the following contents:

VLC Streaming to Nexus One
<h1>VLC Streaming to Nexus One</h1>
<a href="rtsp://">Stream</a>

I started an http server on my MythTV server using python -m SimpleHTTPServer. I started this command in the same directory I saved the stream.html file in.

I started the VLC streaming with the following single line command:

vlc Hot_in_Cleveland_2010-06-16_10-00_PM_Pilot.mpg -I http --sout "#transcode{soverlay,ab=128,samplerate=44100,channels=2,acodec=mp4a,vcodec=h264,width=480,height=270,vfilter="canvas{width=480,height=270,aspect=16:9}",fps=25,vb=800,venc=x264{level=12,no-cabac,subme=20,threads=4,bframes=0,min-keyint=1,keyint=50}}:gather:rtp{mp4a-latm,sdp=rtsp://}"

Then with my WiFi connected Nexus One I open the browser to

I clicked on the stream link and watched the video file Hot_in_Cleveland_2010-06-16_10-00_PM_Pilot.mpg specified in the VLC command.

I've only got an standard definition recording to play so far. My HD recordings playback with a blank screen. I hear the audio. I'm sure there are some settings I need to tweak on the VLC command.

Below are the specs from the video as provided by the ffmpeg command.

Input #0, mpeg, from 'Hot_in_Cleveland_2010-06-16_10-00_PM_Pilot.mpg':
Duration: 00:29:57.80, start: 0.189267, bitrate: 5188 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 480x480 [PAR 4:3 DAR 4:3], 6000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, 2 channels, s16, 384 kb/s
Post a Comment