Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ALRUI
Streaming Star

Re: My Media - Your Music and Video on the Roku DVP

Wondering if anyone has figured out how to use this set-up to stream from their NAS device, particularly the WD MyBook Live....
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

I have a MyBook Live and I've wanted to give it a try, but I haven't yet. Basically you need to get Python on your NAS and then the rest should be easy. I'm not sure how hard that is, but I may get around to trying it soon.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
ALRUI
Streaming Star

Re: My Media - Your Music and Video on the Roku DVP

I guess installing Python on the MyBook is no biggy but having to re-format and lose stored data would suck unless you can install Pythonand keep the original data intact.
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

There shouldn't be any reason that you'd lose anything. I think installing Python v2.6 should be a piece of cake. I'll give it a try tomorrow or Monday.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
ALRUI
Streaming Star

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
There shouldn't be any reason that you'd lose anything. I think installing Python v2.6 should be a piece of cake. I'll give it a try tomorrow or Monday.

-JT


Hi JT - Please let us know how it goes if you dont mind.

Thanks!
ALR
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

No problem. I'll almost certainly tackle this on Monday and will post instructions (assuming success) here.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
ALRUI
Streaming Star

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
No problem. I'll almost certainly tackle this on Monday and will post instructions (assuming success) here.

-JT


Hi JT - Any luck yet?
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

Yeah, I actually got it working Monday, but I had a few problems with buffering during video playback. I'm pretty sure it has something to do with my network and not the MyBook LIve, but I haven't had a chance to explore it further. It was pretty easy to get everything installed. I still have a few things to resolve, like getting the server to start automatically when the NAS boots, but I should have some time today and/or tomorrow to finish it up.

If you haven't already, make sure you've enabled SSH so you can telnet into the MyBook Live. You enable it by browsing to http://<NAS ipaddr>/UI/ssh (e.g., http://192.168.0.114/UI/ssh). The URL is case sensitive (that's capital U capital I, lowercase ssh). Then you'll need a telnet client that supports SSH if you don't already have one. I recommend Putty for Windows users. They may have binaries for other OSs as well. Once you've acquired Putty or another telnet client, test that you can connect. In Putty, put in the IP address of your MyBook and click the SSH option and then "Open". You should get a new window and after a few seconds a prompt for a user name. Use root. The default root password is welc0me. That's a zero, not an O.

Make sure you can get that far and then I'll post the instructions for installing MyMedia.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
renojim
Community Streaming Expert

Installing MyMedia on a WD MyBook Live

Ok, I think I have it all working. It's really pretty easy to install once you have SSH access (see post above). These instructions assume you know virtually nothing about Linux (the OS on the MBL; Debian Linux to be specific), so they are quite a bit longer than they probably need to be. Don't let the length scare you. It really isn't that difficult. Note: all commands and file names in Linux are case sensitive (e.g., Python is not the same as python).

Once you login, the first step is to install Python v2.6. My MBL came with Python v2.5 already installed, but v2.6 is required, although I can't say I ever tried v2.5. You can get the current version of Python with the following command (that's a capital V):
python -V

If it isn't v2.6, install it with:
apt-get install python2.6

I got some messages about the package not being verified or something like that. I just ignored them and answered Y to the prompt to install anyway.

You'll also want to install the imaging library, although it's not absolutely necessary:
apt-get install python-imaging

Hopefully at this point when you enter the command to get the Python version it will print: Python 2.6.6

Now it's time to download the server code. It's easier to use the tarball instead of the zip. Grab it here. Save it to someplace on your MBL. It's been a while since I set up my MBL and I never did use any of their software, so I don't know how it gets mapped to drives/folders on a PC by default. I always just manually map the /shares/Public directory on the MBL to P:, but you'll probably have something different going on. Anyway, once you save the tarball on the MBL you have to find it from your SSH session. Hopefully it will be in /shares/Public. Change to the /shares/Public directory:
cd /shares/Public

See if it's there:
ls net*

Hopefully the output of the ls command will be: netguy204-roku_media_server-ExtremeAvocado-47-gb78f4a6.tar.gz
If not, see if you can figure out where it went. The find command is a really useful command to know:
find /shares -name netguy*

The command given will search for a file that starts with "netguy" starting from the "/shares" directory and all subdirectories. Once you figure out where it is, change to that directory with the cd command. Let's move it to the /shares/Public directory if it isn't there already:
mv netguy204-roku_media_server-ExtremeAvocado-47-gb78f4a6.tar.gz /shares/Public
cd /shares/Public


Now extract the tarball (another useful tip is that you can type the first few letters of a command or file name and then press Tab to complete the name, so you don't have to type the whole netguy204-roku_media_server-ExtremeAvocado-47-gb78f4a6.tar.gz name; just type netguy and press Tab):
tar xzf netguy204-roku_media_server-ExtremeAvocado-47-gb78f4a6.tar.gz

That will extract everything into a new directory named "netguy204-roku_media_server-b78f4a6". I suggest renaming the really long directory name to mymedia.
mv netguy204-roku_media_server-b78f4a6 mymedia


I also suggest running v2.0 of the server and channel. I still haven't put everything into github, so you'll have to follow the instructions here. In summary, you'll want to download a couple of new graphics and more importantly mymedia.py and common.py and replace the ones in the server subdirectory. You'll also want to install the 2.0 beta version of the channel if you haven't already done so. The previous version should work, but I didn't try it.

Ok, it's time to start the server for the first time. Make sure you're in the server directory, which is hopefully /shares/Public/mymedia/server:
cd /shares/Public/mymedia/server

Launch the server:
python mymedia.py &

The ampersand at the end of the command runs it in the background so you can still enter new commands if needed. This is just to test everything; we'll start it automatically when the MBL boots once we know everything is working. From your computer, browse to http://<MBL IP addr>:8001/configure (e.g., http://192.168.0.114:8001/configure). You should get the Server Configuration page. The default paths for your media will almost certainly be wrong. You'll want to change them. If you use the default "Shared" directories that the MBL comes with, your directories should be
Music Folder:  /shares/Public/Shared Music
Videos Folder: /shares/Public/Shared Videos
Photo Folder: /shares/Public/Shared Pictures

Also, my Server IP address showed as 127.0.0.1. If that's the case, you must change it to the IP address of your MBL. You can leave the Server Port as 8001 unless you have a good reason to change it. Click on "Save Configuration" after making the changes.

I'm thinking the best thing to do is to remove the MyMedia channel from your Roku and then add it back. Otherwise, it will be looking for your old server. Or, you can always just manually enter the IP address of your MBL in the channel settings. Either way, start the channel on your Roku (hopefully you've updated to the v2.0 beta if you didn't have it already). If you removed the channel and re-added it you'll get the rendezvous stuff. If you didn't, you'll have to go into settings, edit the server IP, and then exit and re-enter the channel. Everything should be working and you'll be able to play all the media off of your MBL. If there's a problem, I'm generally available for help.

Once everything is verified working, you'll probably want to start the server automatically when the MBL boots. Here's a script I've been using on my Dockstar that someone else contributed a while back:
#!/bin/sh
LANG=en_US.UTF-8
export LANG

# Start the MyMedia server for the Roku Digital Video Player

# Kill the server. This is a python program so killall doesn't work.
# awk also doesn't seem to work with Unslung, so use sed.
prog=`ps ax | grep mymedia.py | grep -v grep | tail -1 | sed -e 's/ *\([0-9]*\) .*/\1/'`

if [ -n "$prog" ]; then
kill $prog
fi

sleep 2
cd /shares/Public/mymedia/server
nohup python -v mymedia.py > /tmp/python-rc.log 2>&1 &

This script actually kills the server if it's already running and then starts a new one. You'll want to put this in the /etc/init.d directory.
cd /etc/init.d

I don't know what editors are available on the MBL, but I know vi is there:
vi mymedia

Press i to go into input mode and then you can copy and paste the above script. If you're using Putty, the right mouse button does a paste. Use the SELECT ALL link next to the CODE: tag and then press Ctrl-C to copy the entire script. Once you've pasted it in vi, press ESC and then :wq (that's a colon and then w (for write) and q for (quit). Now you should have a file named mymedia in the /etc/init.d directory. You have to make it executable:
chmod 755 mymedia

Now to get it to execute upon boot:
update-rc.d mymedia defaults

I'm no Debian expert, but that works for me. 🙂

Finally, let's see if everything works. Close anything that may be using files on the MBL (except for the SSH session) and then we can reboot it:
sync
sync
reboot

That's it! After it reboots the mymedia server should be running and you no longer need a computer on to serve up your media to the MyMedia channel.

Good luck!
-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
mi1stormilst
Visitor

Re: My Media - Your Music and Video on the Roku DVP

Wow I guess I need all kinds of help.

I have followed all the instructions and the Roku does not seem to be able to connect to the server. I have verified that my wireless IP is correct and I was able to register the channel. I set my directories and now I can't seem to launch the configuration page anymore. I dumped all the MyMedia files in C:\MyMedia and launched the springboard? Help!!!
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.