xM Media Server Project Update

I thought it would be nice to provide an update of on my Christmas project to give my wife a media server that will display her photos on the living room TV.

This is proving to be a pretty interesting project because there are two challenges: making it easy for my wife to add pictures to the server, and dealing with the large numbers of photos she wants to display, approximately 16,000.

I will use eog as suggested by others on this forum to display the pictures.

Next is the challenge of where to get the pictures from. I don't want to fetch photos directly from my wife's computer, because I'm afraid of the load that might put on my home network, and any performance issues my wife sees while working will likely come back to me for resolution. I imagined I would get the pictures from her external NAS drive, a Buffalo brand but not a "LinkStation" model. However, if you want to connect to this drive over the network, you must use Buffalo's proprietary software, and I don't want to do that. There is another option with this drive: connect it to the xM over USB. I tried this, and eog displays the photos on that drive just fine. But there is no way for my wife to update the drive with new pictures easily. So that idea is out. Because there are so many pictures involved, I don't think it makes sense to write them to the SD card.

The next approach would be to put the rootfs on a 2.5" notebook hard drive connected to the xM over USB, and mount that at boot time. Then create an unprivileged user /home/linguine and set things up so that one can scp the photos over the network, from my wife's computer to the directory /home/linguine/Pictures.

I went ahead and installed ssh and ssh-askpass on the xM, and also gedit because I like it as a text editor. I've scp'ed some sample pictures things look good so far.

I am starting to learn quite a lot about the performance side of the Beagleboard xM. Mine is running Ubuntu 10.10 (from a distro provided by Robert Nelson, I think.) I am using only a 4 Gb, Class 4 microSDHC card. XFCE in that distro runs pretty slowly, but it does run. There is a noticeable delay between clicking a checkbox, for example, and seeing the checkbox cleared or checked. This might be due to the slow SD card.

I have connected an HDMI cable to my TV, and run it to where the xM will go. Likewise, I ran an extra network cable from my router to the shelf where the xM will go. When I connect the Beagle to the TV over HDMI and then power both up, the TV gives me an error "unsupported display mode". I know I need to change the display mode to hd720 in my bootargs, and I will do that soon as the project continues. I do not plan to use the svideo connection.

The next step is to find a cheap 500 Gb laptop hard drive, put my rootfs on it, and mount it at boot time. I hope this will allow effectively sending large numbers of photos to the xM. Maybe I can clone my current rootfs from the sdcard to the hard drive and resize the partition with gparted.

Other interesting bits: the Dog House for the Beagleboard xM provides a safe, sturdy enclosure that can be screwed to the underside of a wooden shelf. Transporting the xM in this thing is easy. It is like the protection of Fort Knox to the xM. The enclosure also prevents access to interesting components like JTAG and LCD connectors. I guess I can live with this for the moment.

I suppose I should buy a Ubuntu manual to learn how to change settings and update the OS the Ubuntu way.

Bob

Next is the challenge of where to get the pictures from. I don't want to
fetch photos directly from my wife's computer, because I'm afraid of the
load that might put on my home network,

What kind of load? I run two wireless APs at home, one for the media
server streaming videos and the other for laptops for me, the wife and
the daughter (for her iTunes enjoyment). And I remotely connect to a
dev server to do builds in this way. Very little network bottleneck
like this. Viewing photos should have less of a load than streaming
video.

Also, if it's wired, you won't bottleneck while browsing photographs.
Assuming a proper network configuration (eg. NFS rsize=16384).

But there is no way for my wife to
update the drive with new pictures easily. So that idea is out. Because
there are so many pictures involved, I don't think it makes sense to
write them to the SD card.

Updates typically come in bunches from a camera or phone, which uses an
SD card. You aren't likely to have more than that in one update, no?

The next approach would be to put the rootfs on a 2.5" notebook hard
drive connected to the xM over USB, and mount that at boot time. Then
create an unprivileged user /home/linguine and set things up so that one
can scp the photos over the network, from my wife's computer to the
directory /home/linguine/Pictures.

It seems to me you're over engineering the problem. An NFS mount should
work fine for displaying photos. Verify that the network is
bottlenecked before trying some complex alternative.

I am using only a 4 Gb, Class 4 microSDHC card.
XFCE in that distro runs pretty slowly, but it does run. There is a
noticeable delay between clicking a checkbox, for example, and seeing
the checkbox cleared or checked. This might be due to the slow SD card.

If swap is enabled, its probably because of that. SD cards are
significantly slower on writes than a hard disk.

The next step is to find a cheap 500 Gb laptop hard drive, put my rootfs
on it, and mount it at boot time.

Put swap on that disk. That should help with performance.

I hope this will allow effectively
sending large numbers of photos to the xM.

Reading from a drive will be faster than reading from a network. I
still don't see how "large numbers to the xM" impacts this. You only
view one (or a few) images at a time, right? When do you actually "send
large number of photos to the xM"? Send where - to the disk? To the
display?

Maybe I can clone my current
rootfs from the sdcard to the hard drive and resize the partition with
gparted.

Just make a big partition on the hard drive manually and then copy the
contents of the image to it. No reason to muck with gparted if you
don't have to.

Other interesting bits: the Dog House for the Beagleboard xM provides a
safe, sturdy enclosure that can be screwed to the underside of a wooden
shelf. Transporting the xM in this thing is easy. It is like the
protection of Fort Knox to the xM. The enclosure also prevents access to
interesting components like JTAG and LCD connectors. I guess I can live
with this for the moment.

I was browsing photos on BeagleBoard.org (BeagleMediaCenter - BeagleBoard,
in the Flicker photos section ) and noticed some very custom fitting
enclosures, red/black with embossing and apparently plastic. I was
wondering what happened to those. Probably a home brew milling project,
but cool none the less.

These: http://www.flickr.com/photos/koenkooi/4804604567/in/photostream/ ? If so, the STL files can be found in the description of the photo.

regards,

Koen

Very nice Koen!
Pity those 3d printers are so expensive.
Guess you do not take orders for coasters :slight_smile:

Frans

Michael,

Thanks for your comments, let me study what you are saying and experiment a bit. My wife has approximately 180,000 photos already on hard disk and she wants to display the best ones on a TV screen all day in a big slideshow. She has a system of grading her photos according to their quality. She uses her own computer for some rather compute-intensive academic stuff and even more goofing off which also turns out to be compute-intensive.

I am not skilled at doing capacity planning or network load measurements. So I want to read what you are saying a few times over and think about it.

I really appreciate your comments. I looked at Koen's enclosure, too. Very nice and I like the bright, cheery colors.

Bob

Another update on this, and some answers to Michael's questions.

My wife has about 180,000 pictures already archived to external hard drives. They use up a couple terabytes of storage. I want to let her copy some of these to her own user account on the Beagleboard's Ubuntu OS, and then display those pictures on our TV using eog. She would be copying several thousand pictures at a time. I don't know how much load this will present to the network, but I still don't want to fetch the photos from her user account on the Beagle, establishing a connection to her desktop computer, and then copying photos from some area of her computer such as over Samba. I would prefer that she be able to switch on one of her several external hard drives and copy from those to a user account on the Beagle, using PuTTY. Then switch off the external hard drive. That way she feels more in charge (she is still using Windows XP) and doesn't feel she has to learn linux. I would like her to do all this without needing me to do it for her.

What I've done to date is:

* Put the Beagleboard xM into a DogHouse enclosure.

*All the networking is based on wired ethernet connection to the home network. I just plug the Beagle directly into a network switch.

* Installed Ubuntu 10.10 on the Beagle. At first I used an SD card for both the boot and rootfs partitions. I have since moved rootfs to a 160 Gb laptop hard drive, which is in a cheap external enclosure. That gives me the challenge of figuring out how to safely hide and secure the hard drive.

* Installed the ssh package (I've forgotten the actual name of the package that apt-get installed) and set up rsa keys for /user/linguine. In linguine's ~/.ssh I also created a file named config which has one line:

IdentityFile ~/.ssh/id_linguine

and chmodded the file with 600 permissions (`chmod 600 config`).

I tested ssh and scp connectivity using my own user account on my computer.

* In order to mount the rootfs from it's new home on the hard drive, I've connected it to a powered hub which is in turn connected to the Beagle's USB OTG connector. I'm using an OTG USB cable for the hub-Beagleboard connection. The powered hub adds another hardware item that I wish was not needed, but I can figure out a way to hide it.

Michael brought up two points about using the hard drive. He thought I could just create a big partition on the hard drive and copy over the rootfs from the sd card without mucking around with the gparted utility. He is correct about that, the partition does not need resizing so there was no need to use gparted. But the ext4 filesystem did need resizing, and to do that, I used resize2fs. The second point he brought up is that I could put swap on the hard drive and experience performance gains from that. I only now have given that thought. How do I know if I moved swap to the hard drive? I just copied the entire partition containing the rootfs from sd card to the hard drive, and that is not a swap partition, right? (I don't know if I even enabled swap.)

* Changed bootargs to use 'root=/dev/sda1' and 'hd720' as the dvi mode.

* Arranged all the connections needed so that the Beagle is able to speak to our TV over HDMI. The Beagle does indeed display a wonderful GUI image on the TV. However, using the 'hd720' parameter causes the display to be too far past the left border of the TV's image area. So when you log in, it looks like the display is shifted left too far and you can't access buttons or menu options that you want to.

I wonder how to change this so that the window image moves further right, enough to show the correct?

* Started eog in a shell

eog &

and opened one of the images in ~/Pictures and pressed F5 to start an eog slide show.

This does work well enough that my wife is impressed and seems to approve of it. She did complain about the picture quality and thinks we need a new TV. Isn't this is more an indication of the video graphics rendering ability on the Beagle and the test pictures I've used (which aren't up to her standards) and isn't really related to the TV.

So now what I'm left with doing is mounting all the hardware somewhere close to our TV. I notice that the DogHouse enclosure for the Beagleboard becomes noticeably warm when the slideshow is running and I wonder if the enclosure needs a heatsink or some way to cool the Beagle. I won't start a fire will I?

I also need to install PuTTY on her computer and both demonstrate and write instructions for her to transfer photos to the ~/linguine account on the Beagleboard.

* I wonder if there is a way to get the Beagle to recognize a button press from the TV remote that can command it to shut down and power off, and start up, log in to ~/linguine, start eog, and get the slideshow going? I wonder what extra hardware I need for that and how to adapt the DogHouse enclosure to it if need be.

Thanks

Bob Cochran

* I wonder if there is a way to get the Beagle to recognize a button
press from the TV remote that can command it to shut down and power off,

Power off is possible using an infrared remote controller and the lirc
software. Takes some setup, though. You might need to add a serial IR
receiver. Never tried a USB receiver.

and start up, log in to ~/linguine, start eog,

Startup implies something is powered on waiting for an event. This
usually means that the BeagleBoard is actually running the OS in a
standby mode. There is some possibility of going into some kind of
power-save mode for this but I've never mucked with it in the OS and am
not sure if the BeagleBoard provides the hardware support for it.

The simpler way would just be to add an external power switch to the
board for power up.

As to "log in and start eog", the former requires removing gdm and/or
any other graphical login. Very doable if you understand the X11
environment. If you can get rid of gdm then you simply auto start X11
as a specific user in the init scripts at boot time. That will get you
right into eog.