Sunday, July 26, 2009

A QuickGuide To Streaming Video From PC to DBox

A QuickGuide To Streaming Video From PC to DBox
By the way, video can be DivX, Xvid, OGG, MPEG, ....etc.
The instructions in this guide assumes the following:
01. The DBox is configured and fully operational.
02. The DBox is accessible from the PC that will be streaming the video. Try doing a "ping". For example, if your DBox
has the address 192.168.0.5, enter:
ping 192.168.0.5
in a windows command prompt. You should observe 0% packet loss.
03. All the information described in this guide was tried on a PC running Windows XP Professional. Note, all firewalls are turned off.
04. Search and download vlc-0.7.2 from the internet. Do not get the latest version (currently vlc-0.8.2)!
On the PC, create a new local user. Right click my computer, Manage, User & Groups, Expand User & Groups, right click Users, New User, Username = dbox2, Password = dbox2. Untick "User must change password at next logon".
Now, share a folder containing videos. I chose to share the following folder:
c:\Movies shared as Movies
To share a folder, right mouse click on it, Properties, Sharing, Share this folder, Permissions, Add, Locations, Select the name of your PC, OK, enter dbox2 in the object names field, click ok, click ok again. One more ok.

Is it just me or am I correct in saying that people who refers to directories as folders are mostly Mac users?
Anyway, install vlc-0.7.2 onto the PC.

Grab the remote, press the dbox button, Settings, Network, Mount/CIFS
volume. Edit the first line:
type: CIFS
IP: xxx.xxx.xxx.xxx (IP address of the PC) directory share: Movies (note the capital M) localdir: /var/mnt/movies
mount on startup: yes mount options:rw,soft,udp
mount options: nolock,rsize=8192,wsize=8192
CIFS Username: dbox2
CIFS Password: dbox2
Select "Mount Now" Exit the menu screen.
Now press the dbox button, Settings, Movieplayer: Set Streaming Server to on
Confgiure the IP address to that of the PC
Configure the port number to 8081 (normally 8080 but I had to change this) Configure DVD drive letter to D (change this accordingly)
Change directory to C:\Movies (note the capital M) Leave 1000 for data rate
Leave 192 for audio rate
Leave all other settings as per default
//Winodws//
Open up a command prompt. Change directories to where vlc was installed. Here is what I typed in on my PC:
c:
cd "Program Files\VideoLAN\VLC\"

The default port number that vlc uses is "8080". Unfortunately, I already had some other application using this port and had to change it to use
port "8081" instead. This is what I typed in the command prompt to change the port (permanently):
vlc --save-config --http-host=:8081
Close the vlc window and type in the following to start vlc properly:
vlc --extraintf=http
This is all we need to do on the PC. Don't touch the PC and go look for the dbox remote.
Press the dbox button, Movieplayer, File via VLC.
At this point, if everything is working correctly, you should see a listing of the videos in your movies directory. Using the dbox remote, select the file you like to play and press the "ok" button on the remote. If you don't see the list of files, just navigate to them. Remember, they will be in "/var/mnt/movies".
You should see a dialogue box on your TV with a message about "connecting to the streaming server". This box disappears shortly and is replaced
with another dialogue box with a message about "Buffering". This buffering takes a few seconds (max). At this point, I got moving
pictures on my TV as well as sound. Neat or what?
I'm not sure what is the best way to stop the streaming but it seems pressing the "home" button on the remote stops the playback and takes me to the Movieplayer menu.

Notes to myself and others
===================
To be able to stream video from the PC to the DBox, you will need a powerful PC. This is a must! Not sure exactly what the minimum requirements are but I ended up using a Pentium 4 2.8 GHz PC.
Can people provide some feedback as to your PC setup for video streaming from PC to DBox?
Initially, I tried vlc-0.8.2 but this did not work. The symptoms:
blank screen but audio stream plays okay. Tried various video
formats but the result was always the same.
The ethernet interface in the DBox is 10Mbit/s. DVD video with a DTS
audio stream can easily saturate this ethernet speed. I have not tried this personally but my guess is DVD streaming will either not work or be really choppy.
Certain files when streamed can still be a problem. For example, video/audio synch issues. I am not 100% sure but this seems to be related to the size of the file. File sizes around 300MB plays okay for me but anything bigger, say 1GB, are played poorly.
The Sportster 1.73 JFFS2 image I used does not have the "movies" directory in "/mnt". But this directory exist in "/var/mnt/movies" instead.
You can telnet into the dbox from the PC. Just type "telnet xxx.xxx.xxx.xxx" and replace the xxx with the IP address of your DBox. Login as user root - no password required. Once you have logged in, you can do anything you like. For example, create the "movies" directory in "/mnt". Mentioned here for those who are unfamiliar with UNIX.