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: 
rcaplan
Visitor

How to set up a Slideshow from your home network

* Note: I had originally posted this Jan 2, 2010, in the Roku General forum (I probably should have posted it in this SDK forum in the first place) I never got any useful responses. So I figured out how to do it myself. Below is my original post, followed by my solution;

--------------------------------------------------------------------
Hi. I have a new Roku HD XR, working well, love it for NetFlix etc. One thing I was sure would be easy to do was to set it up to do a slide show from the pictures directory on one of the machines on my home network. Have checked out the available channels such as flickr etc. but they all seem to require you to upload your pictures to their site (only to download them again) It seems like I am missing something obvious. I have googled for an answer and searched these forums and have come close a couple of times (posts on the fine points) which makes me wonder even more what I am missing. Would also like to do the same for my music directory to play mp3s at random. Hope someone can help!
--------------------------------------------------------------------

OK. Here is how I did it. (I'm sure there are way more elegant ways to do this, and this was sort of a sledgehammer/brute force method. And you would definitely have to be a programmer to do this and to run it, so it is probably not that 'marketable'. I did this because I wanted it, and was determined to do it because i knew it could be done one way or another, even though I don't have that much spare time)

1) Turn on IIS and it's web server on one of your machines (or whatever your preferred flavor of web server is) Create a virtual directory pointed at your pictures folder, which could either be on the same or a different machine in your home network.

2) Write a .bat file that does a dir spits out the sudirectory name and file names to a .txt file. This only has to be run once, and again whenever a new batch of pictures are added, to update the txt file with the picture list.

3) Write a VB (or whatever your preferred language is) program that:
a) reads this txt file into an array, and counts the n lines in it.
b) picks a random number between 1 and n
c) uses n as an index into the array to get the picture file name
d) copies this random picture to a static name like chosen.jpg in the pictures directory
e) repeats b thru d every x seconds, for y thousand times (however long you want it to stay running)
f) start this this running
g) optionally, also set up an outlook rule to fire this program off when you receive an email with 'startslideshow' or something in the subject, so you can start it remotely if needed by sending yourself an email from your cell phone.

4) Take the Roku slideshow sample program (monitorsetup) and modify it to point to the ip address or machine name of your internal network web server and (virtual) directory name you set up to point to your pictures. Then change the code that loads the slideshow with pictures to just load chosen.jpg. I also had to modify the program to close (destroy) and recreate the slideshow every x seconds to pick up the new chosen.jpg put out there by the VB program (I could not find a way to modify its content while slideshow was running. I'm not that good with the Roku SDK yet..so this is part of the crude, inelegant, sledgehammer approach I mentioned 🙂

5) Zip up your new Roku program and upload it to the Roku

6) Turn on your big screen and select your Roku and your new channel and enjoy the show. You now have the worlds' biggest digital picture frame slide show.

7) Write up your solution (which will by now probably be better than mine) and post it here for all to learn from. I did not post the source code here for the .bat, VB, or Roku programs (I can tell from the forum that most of you are more than capable of doing all that!) but let me know if you are curious.

Randy
0 Kudos
1 REPLY 1
RokuKevin
Visitor

Re: How to set up a Slideshow from your home network

Or write a server-side script to auto-generate an xml feed for all of your pictures available in an IIS directory. You could then modify one of the slideshow examples (monitorsetup, deviantart, flickr) to parse this feed and display a slideshow of all your images.
0 Kudos