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: 
jasonsf
Channel Surfer

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

"el.wubo" wrote:
I plan to have something ready for everyone to try out in about 2 weeks. This is finals week for me and it's been really hard to fight off the distraction of writing cool code so I can focus on my masters. I'll have more time next week.


Your work is awesome and much appreciated! Looking forward to your summer break filled with lots of Roku coding! 🙂 😄

Jason
Tags (1)
0 Kudos
dnessl
Visitor

D-Link DNS-323/DNS-321 NAS as your My Media server

These are the steps I used to turn my D-Link DNS-321 NAS (baby version of the DNS-323) into a video server for my Roku box. It should work for the DNS-323 too.

(1) Install Fonz FunPlug (ffp) into the NAS and enable telnetd, per http://wiki.dns323.info/howto:ffp

(1b) Telnet into your NAS, so you should have a root shell prompt.

(2) On the NAS, install Optware, per http://wiki.dns323.info/howto:optware

Important for DNS-321: If you have a DNS-321, in the instructions in that howto substitute the following URL as the repository (i.e. where to get the ipkg binary from and as the repo URL in ipkg.conf):
http://ipkg.nslu2-linux.org/feeds/optwa ... /unstable/
(The DNS-321 uses a different native libc than the DNS-323, so the DNS-321 needs software built against the different libc than the DNS-323.)

Note 1: That howto suggests appending to the end of the fun_plug script the commands to mount /opt. Instead, I put them in a new /ffp/etc/fun_plug.local script:

mkdir -p /opt
mount --bind /mnt/HD_a2/ipkg/opt /opt

Make sure to use chmod to make the /ffp/etc/fun_plug.local script executable.

Note 2: That howto suggests prepending /opt/bin:/opt/sbin to the PATH variable in /ffp/etc/profile. That only works if you were brave enough to change root's default shell to the shell supplied in fun_plug. I'm not that brave, so I explicitly set the PATH in the rokud script supplied in step 6, so don't worry about updating /ffp/etc/profile

(2b) On the NAS, install python 2.6 from the Optware repository by running the commands

export PATH=/opt/bin:/opt/sbin:$PATH
ipkg update
ipkg install python26


(3) Put the Roku into developer mode -- follow Installation instructions in the README for "My Media" at http://github.com/netguy204/roku_media_ ... ME.textile, which will point you to the right pages in the Roku SDK documentation

(4) Install "My Media" software on your PC. (From viewtopic.php?f=28&t=25955)

(5) Install "My Media" software also on your NAS. I installed mine at /opt/exec/roku_media_server

(6) On the NAS, create the shell script /ffp/bin/rokud containing

#!/ffp/bin/sh
set -x
export PATH=/opt/bin:/opt/sbin:$PATH
cd /opt/exec/roku_media_server/server
python2.6 ./rss_server.py </dev/null >/tmp/rokud.$$ 2>&1 &

Use chmod to make it executable. You can invoke this script in the future (not now) to manually start the "My Media" server.

(7) To make the "My Media" server run automatically every time the NAS is booted, on the NAS create the shell script /ffp/start/rokud.sh containing

#!/ffp/bin/sh

# PROVIDE: rokud
# REQUIRE: SERVERS
# BEFORE: LOGIN

. /ffp/etc/ffp.subr

name="rokud"
command="/ffp/bin/rokud"

run_rc_command "$1"

Use chmod to make it executable.

(8) Run springboard.py (or springboard.vbs) on your PC to set the configuration, and then click on the "Install Client" button. Note that the server_ip should be the IP address of your NAS (not your PC).

(9) Running springboard on your PC will have created a config.ini file in the folder where you ran springboard. Copy-paste its contents into a new file on the NAS named (if you followed my example) /opt/exec/roku_media_server/server/config.ini

(10) You can now manually start "My Media" on your NAS by invoking the rokud script, or reboot the NAS to make sure it gets started automatically. To check that it's running, on the NAS run the command `ps -ef | grep rss` -- there should be a processing running "python2.6 ./rss_server.py"

(11) Go to your TV and see if your Roku box can see the My Media channel, and the Music and Video folders within that channel that you specified in the config.ini file you created in steps 8 & 9.
Tags (1)
0 Kudos
dnessl
Visitor

My command for converting videos files for Roku

After much trial and error, here is the HandBrake command I use (on my laptop running Linux) to convert random video files into MPEG-4/AVC files that the Roku will play. My target is good quality HD on my 720p plasma, which I get by doing a 2-pass conversion, but I use "Turbo" mode on the first pass to keep it from taking forever. On my 2.2 GHz Core2 Duo (dual-processor) laptop it takes about the same amount of time to convert a video file as to view it. The resulting m4v files are typically only slightly smaller than their originals.

HandBrakeCLI -i "$file" -o "$file".m4v -X 1280 -Y 720 -O -Z Universal -2 -T -q 0.62 -r 29.97 -E faac,ac3
Tags (1)
0 Kudos

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

I have been unable to connect to the server...even trying it through localhost:8001 returns nothing.

I ran springboard_debug.bat and it returned this. Everything has been working fine until I returned home from vacation.

c:\roku_media_server\server>c:\python26\python.exe springboard.py
writing configuration
http://0.0.0.0:8001/
Traceback (most recent call last):
File "rss_server.py", line 587, in <module>
app.run()
File "C:\roku_media_server\server\web\application.py", line 313, in run
return wsgi.runwsgi(self.wsgifunc(*middleware))
File "C:\roku_media_server\server\web\wsgi.py", line 54, in runwsgi
return httpserver.runsimple(func, validip(listget(sys.argv, 1, '')))
File "C:\roku_media_server\server\web\httpserver.py", line 146, in runsimple
server.start()
File "C:\roku_media_server\server\web\wsgiserver\__init__.py", line 1596, in start
raise socket.error, msg
socket.error: [Errno 10013] An attempt was made to access a socket in a way fobidden by
its access permissions
Tags (1)
0 Kudos

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

I just changed my port and now it works again. Any thoughts as to why 8001 is not working?

I have always used 8001 as default...It was never blocked by firewalls.
Tags (1)
0 Kudos
dellsweig
Visitor

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

"Timmy Likes to Click" wrote:
I just changed my port and now it works again. Any thoughts as to why 8001 is not working?

I have always used 8001 as default...It was never blocked by firewalls.


It may be in use by something else on your PC
Going where the wind don't blow so strange
Tags (1)
0 Kudos
aamster
Visitor

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

I have My Media setup and followed the handbrake conversion of files to mp4 format. I'm struggling because when I open the mp4 file streamed from my computer, in my media, the player displays "retrieving" for about 30 seconds and then aborts. When I try to open it again, nothing happens. Causing additional frustration, the file played fine just last week! I have not altered settings. Does anyone know what I should try?
Tags (1)
0 Kudos
wpbear
Visitor

Re: D-Link DNS-323/DNS-321 NAS as your My Media server

I slightly modified the DLINK NAS python setup and got it work on my WD MyBook White-newer edition.

This is what I did:

1. Enable SSH
2. Telnet in with Putty
(2a) On the NAS, install python 2.6 from the Optware repository by running the commands

export PATH=/opt/bin:/opt/sbin:$PATH
ipkg update
ipkg install python26


(3) Put the Roku into developer mode -- follow Installation instructions in the README for "My Media" at http://github.com/netguy204/roku_media_ ... ME.textile, which will point you to the right pages in the Roku SDK documentation

(4) Install "My Media" software on your PC. (From viewtopic.php?f=28&t=25955)

(5) Copied "My Media" software also to the WD MyBook NAS. I installed mine at /opt/etc/roku_media_server

(6) On the NAS, create the shell script /opt/bin/rokud containing

#!/opt/bin/sh
export PATH=/opt/bin:/opt/sbin:$PATH
cd /opt/etc/roku_media_server/server
python2.6 ./rss_server.py </dev/null >/tmp/rokud.$$ 2>&1 &

Use chmod u+x rokud to make it executable. You can invoke this script in the future (not now) to manually start the "My Media" server.

(7) Create shell script /opt/etc/init.d/S90rokud containing
#!/bin/sh

prefix="/opt"
PATH=${prefix}/bin:${prefix}/sbin:/sbin:/bin:/usr/sbin:/usr/bin
cd /opt/etc/roku_media_server/server
python2.6 ./rss_server.py </dev/null >/tmp/rokud.$$ 2>&1 &

Use chmod u+x rokud to make it executable.

(8) Run springboard.py (or springboard.vbs) on your PC to set the configuration, and then click on the "Install Client" button. Note that the server_ip should be the IP address of your NAS (not your PC).

(9) Running springboard on your PC will have created a config.ini file in the folder where you ran springboard. Copy-paste its contents into a new file on the NAS named (if you followed my example) /opt/exec/roku_media_server/server/config.ini

(10) You can now manually start "My Media" on your NAS by invoking the rokud script, or reboot the NAS to make sure it gets started automatically. To check that it's running, on the NAS run the command `ps -ef | grep rss` -- there should be a processing running "python2.6 ./rss_server.py"

(11) Go to your TV and see if your Roku box can see the My Media channel, and the Music and Video folders within that channel that you specified in the config.ini file you created in steps 8 & 9.
Tags (1)
0 Kudos
renojim
Community Streaming Expert

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

"aamster" wrote:
I have My Media setup and followed the handbrake conversion of files to mp4 format. I'm struggling because when I open the mp4 file streamed from my computer, in my media, the player displays "retrieving" for about 30 seconds and then aborts. When I try to open it again, nothing happens. Causing additional frustration, the file played fine just last week! I have not altered settings. Does anyone know what I should try?

The first thing to try, if you haven't already, is to reboot everything. Reboot your server and unplug your Roku for a few seconds. Does it happen for all videos, or just one particular file? Check the 'my_media_log.txt' file that's created in the directory with 'rss_server.py' to see if there's any error or warning message (this file can get quite large and you may want to delete it periodically). Next, telnet to your Roku's ip address port 8085. There's all kinds of stuff spewed there; maybe something will show up that will explain what's happening.

-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.
Tags (1)
0 Kudos
renojim
Community Streaming Expert

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

Ok, the telnet output is a crash dump. I don't know why it's happening, but it explains why the second time you try to play the video nothing happens. It looks like you're running an old version of the client (and I would guess the server as well). Please download the latest developer's preview version here and give that a try. There may still be some issue with the video, but there's no sense in trying to debug a problem on an old version.

-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.
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!