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: 
renojim
Community Streaming Expert

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

Any Mac users out there that can help chaschl?

-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
el_wubo
Visitor

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

"chaschl" wrote:
I have an iMac Intel version.

I get the following in terminal when I copy and paste or type in the text:

Searching for Imaging
Reading http://www.pythonware.com/products/pil/
Best match: Imaging 1.1.7
Downloading http://effbot.org/downloads/Imaging-1.1.7.tar.gz
Processing Imaging-1.1.7.tar.gz
Running Imaging-1.1.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tKVkzW/Imaging-1.1.7/egg-dist-tmp-cAXiYV
--- using frameworks at /System/Library/Frameworks
unable to execute gcc-4.2: No such file or directory
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

How do I get past the error to install the channel?


I think installing the developer tools will fix that. You should have a cd that came with your computer that includes XCode and the developer tools.

GCC is a C compiler that's needed to build part of the image library that we use. The imaging library is optional--if you're willing to have lousy performance in the photo browsing piece of the channel you can just skip this step and go on.
0 Kudos
Pookla
Visitor

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

Hi Yes, I was gone for awhile. Using the method below I figured out that PIL wasn't working. So I used macports to install ALL of the relevant pythons and PILS. Then, when I want to run mymedia, I just select python26 before I run python mymedia.py.

Here's how I do that: sudo port select python python26
Then I just run: python roku_media_server/server/mymedia.py (obviously I renamed the netguy folder as roku_media_server)

I did come across a few more issues.
1.) I can't get the experimental stuff to run because the folders are pointing at the wrong folder level within my roku media server folder. Is there an update? Am I running the wrong mymedia? There appear to be 2 one at server one at remote server.

Thanks,
Pookla





"renojim" wrote:
Pookla! I thought we lost you.


I can tell you that MyMedia isn't slow in general, although the "Retrieving" part could use a little work. We just have to figure out what's causing the problem you're seeing. I run the server on a Dockstar (Pogoplug) and the channel is as snappy as any other. For example, I have a folder with nothing but album art (almost 400 jpegs) that are all generally 200x200 or 300x300, with some larger images, and I can browse through that folder as quickly as I can press the buttons on the remote. I am wondering if a firmware update is causing slow navigation with "posters" that aren't the right dimensions. Like I said earlier, I removed PIL a couple of days ago and I couldn't believe how slow navigation became. I never noticed that before when I experimented with and without PIL, so I'm wondering if it's something new or whether I just never noticed it before.

Two questions:
Are you connected to an SD or HD TV? The dimensions for SD are actually 223x200.
When you downloaded the zip, did the file name contain ExtremeAvocado-31 or -36?

There is a way to test whether PIL is working. If you have the photos directory setup, using your browser go to http://localhost:8001/feed and find a photo to display that's larger than 300x300. At the end of the URL for the photo, which will look something like
http://192.168.1.103:8001/media?name=Kendall.jpg&key=photo
add "&res=300,300"
http://192.168.1.103:8001/media?name=Kendall.jpg&key=photo&res=300,300
If you refresh the display the photo should be resized.

I'm not sure what the 404 errors are. You may get more information by looking in my_media_log.txt.

You really would be better off if you could install Python 2.6. While it looks like videos and photos work, music does not. Also, it's really hard to say if the problems you're seeing have anything to do with 2.7. And, sometimes the box just behaves strangely. It's always good to power cycle it to make sure it's not some kind of fluke.

And finally, (Long post I know), would it be possible to figure out a way to tag my videos and then have a search function? I'd love to tag them by genre and year and then be able to search that.

I've thought about some kind of search function, but it wouldn't be all that easy to implement. One thing we've always tried to avoid is to require a database of any sort, so the server would pretty much have to search through the whole folder hierarchy to find something. Your best bet is a well thought out organization to your movies. If you're really clever (and have a lot of time on your hands), you could use links (symbolic or otherwise) to have a movie appear in two different folders. Then you could have one set of folders broken up by year and another by genre. A lot of work, I know, but possible.

-JT
0 Kudos
renojim
Community Streaming Expert

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

"Pookla" wrote:
I did come across a few more issues.
1.) I can't get the experimental stuff to run because the folders are pointing at the wrong folder level within my roku media server folder. Is there an update? Am I running the wrong mymedia? There appear to be 2 one at server one at remote server.

You want the mymedia.py in the server directory. If you're not sure you have the latest, you can get it here.

By the "experimental stuff", are you referring to the "Play Music in Your Browser" and "Configure My Streams"? The "static" directory is (should be) under the server directory so the links should be fine if you just renamed the long netguy folder and kept all the subfolders where they were. If config.ini isn't setup correctly to point to the folders with your media, you can just edit config.ini in the server directory with a text editor or use the web interface at http://localhost:8001/configure. If the "music_dir" parameter in config.ini isn't set correctly then clicking on "Play Music in Your Browser" won't display anything, but then again the channel on the Roku won't display any music either.

I hope I've understood what you mean.
-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
Pookla
Visitor

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

"chaschl" wrote:
I have an iMac Intel version.

I get the following in terminal when I copy and paste or type in the text:

Searching for Imaging
Reading http://www.pythonware.com/products/pil/
Best match: Imaging 1.1.7
Downloading http://effbot.org/downloads/Imaging-1.1.7.tar.gz
Processing Imaging-1.1.7.tar.gz
Running Imaging-1.1.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tKVkzW/Imaging-1.1.7/egg-dist-tmp-cAXiYV
--- using frameworks at /System/Library/Frameworks
unable to execute gcc-4.2: No such file or directory
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

How do I get past the error to install the channel?


Have you tried using macports? You can install the updated version of gcc and python26 and the corresponding PIL imaging required to run the mymedia channel. I also got the gcc4.2 error. I found it really easy and I dislike anything without a GUI.
http://www.macports.org/

Once you've installed the PIL, you can select python26 because python27 is the default. --> sudo port select python python26
I have found I need to do this every time I run terminal but it works.
0 Kudos
Pookla
Visitor

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

"renojim" wrote:
"Pookla" wrote:
I did come across a few more issues.
1.) I can't get the experimental stuff to run because the folders are pointing at the wrong folder level within my roku media server folder. Is there an update? Am I running the wrong mymedia? There appear to be 2 one at server one at remote server.

You want the mymedia.py in the server directory. If you're not sure you have the latest, you can get it here.

By the "experimental stuff", are you referring to the "Play Music in Your Browser" and "Configure My Streams"? The "static" directory is (should be) under the server directory so the links should be fine if you just renamed the long netguy folder and kept all the subfolders where they were. If config.ini isn't setup correctly to point to the folders with your media, you can just edit config.ini in the server directory with a text editor or use the web interface at http://localhost:8001/configure. If the "music_dir" parameter in config.ini isn't set correctly then clicking on "Play Music in Your Browser" won't display anything, but then again the channel on the Roku won't display any music either.

I hope I've understood what you mean.
-JT


Maybe more information will tell you what I'm supposed to fix (at this point i'm not sure).

Clicking play music in browser at http://localhost:8001, gives me http://localhost:8001/static/player.html
with this page:
Error response

Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.

Also, I'm currently having the issue where the my music, my video and my photo icons aren't showing up in the roku channel. I've looked at file and it appears to be pointing at the right folder. Not a huge deal, just doesn't look pretty.
0 Kudos
renojim
Community Streaming Expert

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

It looks like there's something wrong with your directory structure. If I unzip the the package from here, I get a "netguy" directory with a few files and a few subdirectories including 'client' and 'server'. Under the 'server' subdirectory there should be a 'static' subdirectory with two subdirectories and a few files including 'player.html'. Are you not getting that? You should be able to rename the top "netguy" directory to anything you like without changing the subdirectory structure. I don't know what's generally used to unzip on a Mac, but make sure whatever you use is preserving the directory structure.

A problem with your directory structure would also explain the lack of icons since they're located in the 'images' subdirectory under 'client'.

-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
Pookla
Visitor

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

Hey JT,
I downloaded the new file. Deleted the old folder and put the new one in its place.
I ran:
sudo port select python python26
python roku_media_server/server/mymedia.py

I STILL don't have images and http://localhost:8001/static/playlist_editor.html gives me an error.
Error in browser is:
Error response

Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.

Error in terminal window is:
127.0.0.1:57315 - - [16/Jun/2011 12:47:18] "HTTP/1.1 GET /static/player.html" - 404 File not found
127.0.0.1:57318 - - [16/Jun/2011 12:47:18] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57318 - - [16/Jun/2011 12:47:20] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57318 - - [16/Jun/2011 12:47:22] "HTTP/1.1 GET /static/playlist_editor.html" - 404 File not found
127.0.0.1:57321 - - [16/Jun/2011 12:47:22] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57321 - - [16/Jun/2011 12:47:26] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57328 - - [16/Jun/2011 12:48:13] "HTTP/1.1 GET /static/playlist_editor.html" - 404 File not found
127.0.0.1:57331 - - [16/Jun/2011 12:48:14] "HTTP/1.1 GET /favicon.ico" - 404 Not Found

As far as I can tell mymedia is not pointing to the correct directory level.
0 Kudos
el_wubo
Visitor

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

You may need to be in the server directory when you run mymedia.py.

cd roku_media_server/server
python mymedia.py

"Pookla" wrote:
Hey JT,
I downloaded the new file. Deleted the old folder and put the new one in its place.
I ran:
sudo port select python python26
python roku_media_server/server/mymedia.py

I STILL don't have images and http://localhost:8001/static/playlist_editor.html gives me an error.
Error in browser is:
Error response

Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.

Error in terminal window is:
127.0.0.1:57315 - - [16/Jun/2011 12:47:18] "HTTP/1.1 GET /static/player.html" - 404 File not found
127.0.0.1:57318 - - [16/Jun/2011 12:47:18] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57318 - - [16/Jun/2011 12:47:20] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57318 - - [16/Jun/2011 12:47:22] "HTTP/1.1 GET /static/playlist_editor.html" - 404 File not found
127.0.0.1:57321 - - [16/Jun/2011 12:47:22] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57321 - - [16/Jun/2011 12:47:26] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
127.0.0.1:57328 - - [16/Jun/2011 12:48:13] "HTTP/1.1 GET /static/playlist_editor.html" - 404 File not found
127.0.0.1:57331 - - [16/Jun/2011 12:48:14] "HTTP/1.1 GET /favicon.ico" - 404 Not Found

As far as I can tell mymedia is not pointing to the correct directory level.
0 Kudos
Pookla
Visitor

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

"el.wubo" wrote:
You may need to be in the server directory when you run mymedia.py.

cd roku_media_server/server
python mymedia.py

Nope. I did it your way and it still doesn't work.
I've dug around and noticed in mymedia.py the code for my music, my video, my photos, my streams are all some iteration of the following:
dir = video_dir(config)
if dir and os.path.exists(dir):
items.append({
'title': 'My Videos',
'type': 'Folder',
'image': media_url(config, {'name': get_themed_image('videos_square.jpg'),
'key': 'client',
'res': tuple2str(THB_DIM)}),
'link': feed_url(config, {'dir': '.', 'key': 'video'})})

BUT for now playing and settings, where both images are working the call in appMain.brs the ONLY place where nowplaying_square.jpg appears in the roku media server package says:
while true
busyDlg = ShowBusy("retrieving...")

pl = rss.GetSongListFromFeed(currentConfig.server+"/feed")
if pl = invalid then
svrContact = false
items = CreateObject("roList")
pl = {items: items, theme: "media"}
else
svrContact = true
CreateSimplePoster(pl.items, "Now Playing", "pkg:/images/nowplaying_square.jpg", "Return to Audio Player", "playerctl")
end if

' Add the "settings" poster before proceeding (may be only poster if no contact w/server established)
CreateSimplePoster(pl.items, "My Settings", "pkg:/images/settings_square.jpg", "Channel Settings", "settings")

if svrContact then exit while

Clearly my mac is recognizing the appMain.brs but not the mymedia.py coding. Is there some adjustment I can make to mymedia.py that I can get around this issue. Something like "~/images/videos_square.jpg"?
0 Kudos