Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 21

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

"cdndave" wrote:
Hi Renojim

could you provide a sample of the command you use? I have an elaborate bat file, for 90% of the files it's great - the other 10% cause me some grief Smiley Happy

Thanks

cdndave

How complicated do you want to get? The basic command is:
HandBrakeCLI -i video.avi -o video.m4v -O -r 29.97

I usually add to that the size of the input file. It's a quick and dirty way to roughly preserve the quality.
HandBrakeCLI -i video.avi -o video.m4v -O -r 29.97 -S [size of video.avi in MB, rounded up]

Now if you really want to get complicated...

I use 4NT (or Take Command) from JP Software to replace the Windows command line interpreter - highly recommended. The free TCCLE is all you need. I created an alias to encode files:
hb=D:\Apps\Multimedia\HandBrake\HandBrakeCLI.exe -i "%@filename[%1]" -o "%2%@name[%1].m4v" -O -r 29.97 -S %@int[1+%@eval[%@filesize[%1]/1000000]] %3

You have to put that line in a file, like 'alias.lst', and then load it with: alias /r alias.lst

This way to encode a file I can just type:
hb video.avi d:\Videos\

To encode all the files in a directory, I can do this:
for %a in (*.avi *.mov) hb %a d:\Videos\

Hope this helps!
-JT
0 Kudos
Level 21

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

"dgrace" wrote:
So, not getting any answers so I'm experimenting.

Experimenting is encouraged! Smiley Very Happy

"dgrace" wrote:
This morning I launched the server via springboard (not Load but Launch). Because I'm using the mymedia from rokumm.appspot I'm assuming I wouldn't need to install anything to my Roku. Anyway, still no album art for any album folders.

There's the problem with the album art not showing up. Springboard.py launches rss_server.py, which for some reason has the lines that look for embedded album art for folders commented out. I also can't say for sure whether or not rss_server.py has the fixes that are in mymedia.py. It really shouldn't even be there anymore. I can't speak for Springboard.py; I've only ever used it to load client onto the box and I don't even use it for that anymore.

"dgrace" wrote:
One thing I did notice this morning was when I tried to launch the server with mymedia.bat the line comes up in the cmd window that rokumm.appspot blah blah blah is not reachable or some similar language, and it just sits there. I'm assuming from this that launching via the mymedia.bat depends on the google app running. Any of this making sense?

It all makes sense (now that I've done a little research). Running mymedia.bat launches mymedia.py under Python and while it appears that nothing is happening, it's running. If you were to start up the channel on the Roku you'd see a bunch of status messages printed out to the window where you started mymedia.bat. I believe, but I have to double check, once you've made the initial rendezvous, you don't really need the google app anymore.

"dgrace" wrote:
Other than the lack of displayed embedded album art everything works fine.

If you make sure you're launching mymedia.py and not rss_server.py, you should see your album art.

"dgrace" wrote:
I did notice that when selecting the first rack in a folder it loops through the album until paused. Is this the same behavior I'd see if I selected Play All in a folder? I'd like to be able to either loop or play through once.

That's by design. The only difference between selecting "Play All" and just selecting a song to play is that "Play All" will traverse the directory tree whereas just selecting a song will not. In a folder that doesn't contain any sub-folders, "Play All" isn't really necessary. All of the options for playing music will loop forever. I could add an option to only play through once, but you're the first to suggest it.

"dgrace" wrote:
Also, if the mymedia selected from the channel store is a problem then I'm game for loading it locally.
Can anyone advise on this?

It shouldn't be a problem, as long as you've completed the initial rendezvous.

"dgrace" wrote:
More experimenting. Saw in cmd window that once I very my media from browser that activity is logged. I clicked around and watched this logging. When I'd go in My Music I'd get a 404 error logged for trying to reach main.css.
When I'd use the STOP button to kill the server I'd get a "stopping server Springboard terminating" which just stays there until I use Windows Task Manager to kill the remaining python.exe.

I think the main.css thing is just some browser thing, like the favicon.ico request I see sometimes. As for Springboard not terminating the server correctly, this is another case where el.wubo and I are out of sync. I fixed that problem some time ago, but it never made it into github. Somewhere way back in this thread is the fix. Smiley Wink

"dgrace" wrote:
The experimenting continues. Hoping I don't accidentally stumble into launch codes and have missiles away.

Have fun!

-JT
0 Kudos
Level 7

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

Thanks JT for the CLI example. Does this use any particular preset for all the advanced options that the GUI shows e.g. for Decomb or Cropping etc? On the GUI for example, some of my 720x480 DVD get a value of 640x480 or 638x480 or 650x482 etc...not sure why it chooses to sometimes trim the video, but curious as to what default settings the CLI uses if these are not specified. I did notice that doing DeInterlacing/Decombing with a 2 pass (1st pass turbo) improves quality drastically but then not sure if that has any impact on Roku's affinity for those videos.
-Rajesh
0 Kudos
Level 7

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

"jklecha" wrote:
Thank you for the response. I will wait for el.wubo.


Well I don't know who to thank. I just now tried again (restarted server in command box, rebooted Roku", and connected just fine. Whoever is to be thanked, please step forward.
0 Kudos
Level 11

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

Right O! Album art is back in all its glory. Thanks for that, and I'm not sure why that little tidbit of info isn't documented in the instructions (that once up and running the app/server should be started with mymedia.py (or the bat file). Doing it in that manner only allows the server to be stopped by Windows Task Manager or I'd assume, shutting down the PC.

The play album once feature isn't needed, it was just something I didn't expect. Now I understand how it's to work and will enjoy.

Thanks again. I was about to remove and try again from scratch.
DG
"I might be moving to Montana soon..."
FZ
0 Kudos
Level 21

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

"rraheja" wrote:
Thanks JT for the CLI example. Does this use any particular preset for all the advanced options that the GUI shows e.g. for Decomb or Cropping etc?

From the CLI guide:
"That will encode with default values: 1000kbps ffmpeg video and 160kbps AAC audio in an .mp4 container."

It doesn't say anything about any of the other options, so I would assume everything like Decomb or Cropping would default to off or not used. I am by no means an expert on HandBrake. Once I found something that worked, I pretty much didn't go any further. You can specify a preset on the command line with --preset="Normal", for example.

-JT
0 Kudos
Level 21

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

"dgrace" wrote:
Right O! Album art is back in all its glory. Thanks for that, and I'm not sure why that little tidbit of info isn't documented in the instructions (that once up and running the app/server should be started with mymedia.py (or the bat file). Doing it in that manner only allows the server to be stopped by Windows Task Manager or I'd assume, shutting down the PC.

The play album once feature isn't needed, it was just something I didn't expect. Now I understand how it's to work and will enjoy.

Thanks again. I was about to remove and try again from scratch.
DG

Glad you got it sorted out!

I glanced at Springboard.py and I think it was meant to launch mymedia.py, but I couldn't figure out what was going on there. I'll only take the blame for bugs/problems in the client code. :mrgreen:

You should be able to kill the server with Ctrl-C, or you can launch mymedia.bat from the command line with start (i.e., start mymedia.bat) and then close the window that opens to stop the server.

-JT
0 Kudos
Level 11

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

I was thinking about a simple tskill bat file. I'm away from my pc now but tomorrow would test a bat file with:
tskill python /a
This, theoretically, should kill all instances of python running. If this works then I'd just have a start.bat (mymedia.bat renamed) and a stop.bat on the desktop.
DG

Update: Well, that didn't work. I tested it on another machine to just shutdown notepad and it worked fine, but won't even do that on my desktop. Hmm? Well, just need to kill in WTM, but harder to have others here know that.
"I might be moving to Montana soon..."
FZ
0 Kudos

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

Hi,

I am running what I believe to be the latest version incorporating the instructions renojim described on Nov. 10. I can navigate my folders and see media files, can play mp3s with no problems. However I cannot seem to get any videos to play. They quit after the loading progress bar gets to 5 or 10%. How would I go about troubleshooting this? Seems to be the same problem people were having before the fix.

My terminal is logging stuff like :

192.168.1.71:53723 - - [05/Jan/2011 22:12:56] "HTTP/1.1 GET /media" - 200 OK
192.168.1.71:53724 - - [05/Jan/2011 22:12:56] "HTTP/1.1 GET /media" - 206 Partial Content
0 Kudos
Level 21

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

Could you download and try this video and see what happens? The "206 Partial Content" message tells me that you have the proper server, so it could be a problem with your video encodes.

-JT
0 Kudos