My Media - Your Music and Video on the Roku DVP

Moderators: RokuShawnS, RokuDouglas, RokuKen, RokuRyan, RokuJamesL

My command for converting videos files for Roku

Postby dnessl » Sun May 09, 2010 7:59 pm

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.
Code: Select all
HandBrakeCLI -i "$file" -o "$file".m4v -X 1280 -Y 720 -O -Z Universal -2 -T -q 0.62 -r 29.97 -E faac,ac3
dnessl
 
Posts: 2
Joined: Sun May 09, 2010 5:14 pm

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

Postby Timmy Likes to Click » Mon May 10, 2010 10:50 am

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
Timmy Likes to Click
 
Posts: 26
Joined: Fri Feb 26, 2010 8:41 am

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

Postby Timmy Likes to Click » Mon May 10, 2010 3:26 pm

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.
Timmy Likes to Click
 
Posts: 26
Joined: Fri Feb 26, 2010 8:41 am

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

Postby dellsweig » Tue May 11, 2010 7:47 am

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
dellsweig
 
Posts: 419
Joined: Mon Mar 31, 2008 10:03 am
Location: Campbell Hall NY

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

Postby aamster » Sun May 16, 2010 11:48 am

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?
aamster
 
Posts: 8
Joined: Sun May 16, 2010 11:45 am

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

Postby wpbear » Sun May 16, 2010 2:34 pm

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
Code: Select all
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
Code: Select all
#!/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
Code: Select all
#!/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.
Last edited by wpbear on Thu May 20, 2010 9:56 am, edited 1 time in total.
wpbear
 
Posts: 241
Joined: Wed Apr 21, 2010 12:44 pm

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

Postby renojim » Mon May 17, 2010 12:09 am

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
renojim
** Valued Community Member **
 
Posts: 2438
Joined: Mon Feb 15, 2010 1:35 pm

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

Postby aamster » Mon May 17, 2010 11:10 am

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.


Does it happen for all videos, or just one particular file?

What happens is, I'll try to play one file, it will display "retrieving" for about 30 seconds, then when I try to play it again or any other file, nothing will happen.

I tried all the above. I don't know how to read the my media log.text file or the telnet results, so I'll leave that up to you guys. Thanks.

my media log.text:

DEBUG:root:rejecting .DS_Store
DEBUG:root:rejecting .localized
DEBUG:root:http://192.168.0.5:8001/media?name=The+Private+Life+of+Plants+-+03+-+Flowering.mp4&key=video
DEBUG:root:http://192.168.0.5:8001/media?name=The.Milk.Of.Sorrow.mp4&key=video
DEBUG:root:http://192.168.0.5:8001/media?name=titicutfollies.mp4&key=video
DEBUG:root:server issued range query: bytes=1017661807-
DEBUG:root:player issued range request starting at 1017661807
DEBUG:root:server issued range query: bytes=1018628937-
DEBUG:root:player issued range request starting at 1018628937
DEBUG:root:server issued range query: bytes=1018749809-
DEBUG:root:player issued range request starting at 1018749809
DEBUG:root:server issued range query: bytes=1018873280-
DEBUG:root:player issued range request starting at 1018873280
DEBUG:root:server issued range query: bytes=1019818480-
DEBUG:root:player issued range request starting at 1019818480


Telnet:

oldScr = pscr.screen
395: if pl.theme <> currentTheme then
396: currentTheme = pl.theme
397: initTheme(app, currentTheme)
398: endif
399: pscr = makePosterScreen(port)
400: pscr.SetPlayList(pl)
401: pscr.screen.Show()
402: oldScr.Close()
403: currentBaseSong = 0
404:
405: else if pl = invalid then
406: ShowServerProblemMsg(server)
407: else
408: ShowListProblemDialog()
409: endif
410: endif
411: endif
412: else if type(msg) = "roAudioPlayerEvent" then
413: if msg.isStatusMessage() then
414: print "audio status: ";msg.GetMessage()
415: endif
416: if msg.isRequestSucceeded() then
417: print "audio isRequestSucceeded"
418:
419: 'queue the next song'
420: posters = pscr.GetPosters()
421: song = currentBaseSong + 1
422: maxsong = posters.Count() - 1
423:
424: if song > maxsong
425: song = 0
426: endif
427:
428: print "song: ";Stri(song)
429: print "max song: ";Stri(maxsong)
430:
431: audio.Stop()
432: audio.ClearContent()
433: item = posters[song].item
434:
435: 'stop if the next item is a video'
436: if not item.GetType() = "mp4" then
437: audio.AddContent(item.GetPlayable())
438: audio.Play()
439: endif
440:
441: pscr.screen.SetFocusedListItem(song)
442: currentBaseSong = song
443: endif
444: if msg.isPartialResult() then
445: print "audio partial result"
446: endif
447: if msg.isRequestFailed() then
448: print "audio request failed: ";msg.GetMessage()
449: print "error code: ";Stri(msg.GetIndex())
450: endif
451: if msg.isFullResult() then
452: print "isFullResult"
453: endif
454: print "end roAudioPlayerEvent"
455: endif
456: end while
457:
458: 'showSpringboardScreen(item)'
459:
460: 'exit the app gently so that the screen doesnt flash to black'
461: screenFacade.showMessage("")
462: sleep(25)
463: End Sub
/tmp/plugin/HRBqSr/pkg:/source/appMain.brs(376): runtime error ec: 'Dot' Operator attempted with invalid BrightScript Component or interface reference.

376: SaveOffset(item.GetTitle(),offset.toStr())

Backtrace:
Function main() As Void
entry evsp: 0

Local Variables:
global &h07 rotINTERFACE:ifGlobal
m &h06 bsc:roAssociativeArray, refcnt=2
app &h16 bsc:roAppManager, refcnt=1
screenfacade &h16 bsc:roPosterScreen, refcnt=1
rss &h16 bsc:roAssociativeArray, refcnt=11
port &h16 bsc:roMessagePort, refcnt=5
server &h14 String val:http://192.168.0.5:8001/feed
pl &h16 bsc:roAssociativeArray, refcnt=2
pscr &h16 bsc:roAssociativeArray, refcnt=1
audio &h16 bsc:roAudioPlayer, refcnt=1
currentbasesong &h12 Integer val:0
currenttheme &h16 bsc:roString, refcnt=2
layers &h16 bsc:roList, refcnt=1
dontkillposterscreen &h15 Boolean val:false
msg &h16 bsc:roPosterScreenEvent, refcnt=1
last_selected &h30 Untyped val:Uninitialized
rec &h30 Untyped val:Uninitialized
song &h12 Integer val:7
posters &h16 bsc:roList, refcnt=3
item &h16 bsc:roAssociativeArray, refcnt=3
offset &h1a Invalid val:invalid
oldscr &h16 bsc:roPosterScreen, refcnt=1
maxsong &h30 Untyped val:Uninitialized
BrightScript Debugger>
aamster
 
Posts: 8
Joined: Sun May 16, 2010 11:45 am

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

Postby renojim » Tue May 18, 2010 4:01 am

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
renojim
** Valued Community Member **
 
Posts: 2438
Joined: Mon Feb 15, 2010 1:35 pm

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

Postby aamster » Tue May 18, 2010 10:08 am

Excellent. The updated developer version fixed all problems. Thanks! It works flawlessly!
aamster
 
Posts: 8
Joined: Sun May 16, 2010 11:45 am

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

Postby renojim » Tue May 18, 2010 10:24 am

Glad to hear it!

-JT
renojim
** Valued Community Member **
 
Posts: 2438
Joined: Mon Feb 15, 2010 1:35 pm

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

Postby skug67 » Wed May 19, 2010 10:47 am

Just wondering, now that the Roku supports HTTP live streaming, if there was anyway to do on-the-fly transcoding for watching via the Roku. I've got a headless Ubuntu box that is currently running mythtv (for recording OTA content) and Mediatomb (better than mythtv's built-in UPnP server, because among other things it does do on-the-fly transcoding). Since mythtv captures video as MPEG2, I have to transcode before watching on the Roku. I've got this set-up to run after each show is recorded. Once the transcoding is over, MyMedia works perfectly if I tell it to look for videos in the mythtv storage location. But sometimes, you want to start watching before a show is over. Right now, I've got no way to do that on the Roku. I'd like to think that between the various programs I've already got installed (or maybe something new that I'm not thinking of -- hopefully open source) this should be do-able.

Anybody have any thoughts/suggestions?
skug67
 
Posts: 10
Joined: Sat Mar 27, 2010 5:56 am

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

Postby renojim » Wed May 19, 2010 9:15 pm

Do you have a way to do the on-the-fly HLS transcoding? I've been experimenting with using a special build of vlc to do it with mixed results (under windose).

-JT
renojim
** Valued Community Member **
 
Posts: 2438
Joined: Mon Feb 15, 2010 1:35 pm

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

Postby skug67 » Thu May 20, 2010 8:43 am

Don't really know anything about HLS. I've seen that there's a plugin for VLC (which I gather would first require me to recompile VLC), but I haven't started playing w/it, because I don't have a sense of what the next step would be.
skug67
 
Posts: 10
Joined: Sat Mar 27, 2010 5:56 am

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

Postby renojim » Thu May 20, 2010 11:15 am

In a nutshell, the HLS transcoder/server creates a "playlist" of video clips and the .ts (MPEG2) clips themselves. The playlist (a .m3u8 file) gets sent to the Roku and then it parses it and requests the .ts video files from the server. Roku recommends the Wowza server (wowzamedia.com), but I gave it a try and quickly trashed it when it started complaining about my Java installation on the second attempt to run the server (one of many reasons I hate Java! :x ). I rebuilt vlc to support HLS and create the playlist and video clips and then modified the mymedia server and client to send them to the Roku. It's something I plan on getting back to as soon as I finish the next release of the client. I don't know if having a general purpose transcoder built into the mymedia server is realistic, though.

-JT
renojim
** Valued Community Member **
 
Posts: 2438
Joined: Mon Feb 15, 2010 1:35 pm

PreviousNext

Return to Roku Streaming Player General Discussion

Who is online

Users browsing this forum: No registered users and 13 guests