Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Displays

Journal chill's Journal: Experiments in Raspberry Pi

I've noted before that I have a media library setup. All of my media -- movies, TV shows, music, audiobooks -- are stored in digital format on a small server in my basement.

By "server" I mean a VIA-based mini-ITX box with 2 Tb of storage connected to my home network. For future reference, I wouldn't use a VIA-based motherboard again simply because they don't have USB 3.0 ports. Backing up 1+ Tb of data via USB 2.0 can take an entire day. Adding a USB 3.0 PCI card helped, but only a bit as the PCI bus is too slow to fully utilize USB 3.0 speeds.

Connected to the back of my television by a VESA mount was a Zotac Z-Box HD-ID11 acting as a playing device. The Z-Box has no hard drive and boots OpenELEC off of a 4 Gb SD card. It does have a CPU fan which hums softly, but really can't be heard except at night, when all is quiet. Setting a sleep timer on the system fixes that.

I've been scrupulous about ripping all my video using h.264 as a video codec. Everything under the sun has hardware-assisted h.264 playback, so it plays flawlessly everywhere.

In looking for a second system, I wanted something cheaper and smaller than the Z-Box and the Raspberry Pi seemed to fit the bill.

The Pi model B is $35. The VESA case is another $10, Transcend 4 Gb Class 10 SD card was $8, compact 4Gb USB stick was $10, and the HP Touchpad USB power charger was $20.

Why the HP Touchpad charger? Read this article comparing quality of various USB chargers for details.

Add it all up, throw in shipping and it was almost $100 on the nose. Oh, I reused my existing HDMI cable.

Installing OpenELEC on the Pi is trivial. Download the image, move the image to the SD card, boot. It worked the first time, no issues.

The results are where things get interesting. Thanks to the hardware-acceleration, video playback of everything from animated TV show rips to the latest 1080p BluRay rip was flawless.

Audio is a different story. The Pi doesn't have the chops to properly decode Dolby DTS/AC3 in CPU. While there is hardware-accelerated decoding on the ARM chip, it isn't licensed and thus disabled. The Pi people are working on being able to sell DTS licenses like they do for MPEG-2 and VC-1, but it will take some time.

So, for the high-definition audio streams you need to set OpenELEC to "passthru". Unfortunately my TV is one of the cheaper models and doesn't do DTS either. I need to get an AV receiver that can handle it. Until then (or the codec issue is resolved) a few of my BluRay rips are silent.

The real problem came not from video playback, but from the OpenELEC interface itself. No hardware-assist for X-Window to it is slower than molasses. Unusable in my opinion. Unusable without tweaking, that is.

Tweak 1: Update firmware on Raspberry Pi. A few changes were made and it helped speed things up a tad.

Tweak 2: Overclock the system. The Pi normally runs at 700 MHz. There is a simple text config file you can change that is read on boot. I've successfully overclocked to 900 MHz (ARM) / 333 MHz (Core) without issues. This made a noticeable difference.

Tweak 3: USB cache the data partition. While OpenELEC runs in RAM, the database of shows, thumbnails, cover art and all the rest reside on the SD card. And no matter how fast they claim to be, SD cards are slow compared to everything else. By creating an EXT4 partition on a small USB thumb drive and pointing OpenELEC at that, speed was greatly improved. Now the system boots off of the SD card (a limitation of the Pi) but runs off a USB stick.

Tweak 4: Turn off the per movie, full-screen background art. This just saves the lag of loading a full-screen art image for each movie title you scroll across. I never really noticed it before, so I'm not missing anything.

Tweak 5: The Pi has unified memory, meaning the CPU and GPU share the same RAM. Memory dedicated to the GPU is specified at boot in the cmdline.txt file. I upped it from the default of 128 Mb GPU (384 Mb CPU) to 192 Mb GPU (320 Mb CPU). I do not know if this did anything or not. I need to figure out a way to test it.

Fix 1: In the same config file where you overclock, I set "force_hdmi=1". The Pi has both an HDMI and composite video out. If it detects an HDMI connection, it will output to that. If not, it defaults to composite. So, if you use HDMI and reboot the Pi with the TV off, it'll default to composite and you'll need to reboot again. This way it just assumes HDMI always and I never have to worry about it. Of course, once I stop fiddling with it there will hardly ever be a reason to reboot. If it ain't broke...

Final tweak: Patience of a Zen Master. My media collection consists of well over a thousand pieces -- movies, TV episodes, cartoons, etc. OpenELEC goes through and updates the library, downloading what information it can from TheTVDB and TheMovieDB including various cover art. It caches it in the storage partition (thus the USB tweak above), but doesn't resize the downloaded artwork until display. As a result, when scrolling through a big library there are noticeable delays and missing artwork. Once cached it works fine. Until then, it is frustratingly sluggish. However, this took me an entire weekend of off and on attention to accomplish.

The end result of my experiment is that the Pi is usable for a large media library running OpenELEC. There can be a little lag of a second or so when switching screens from Home to, say, Weather or Movies, but not so much I'm bothered.

Before the tweaks it was unusable and I was looking for something else to use the Pi on. Now I'm happy.

One final note. I've always found streaming HD video over WiFi a waste of time. It never really worked for me. Right now my server is on a GigE switch and I have CAT-6A running to everywhere in the house. Still, I want options.

I use Samba to share stuff from the server and that has excessive overhead from what I've read. I just added NFS sharing and swapped the Pi over to that. My next step is to unplug the wire and see if I can now successfully stream via wireless.

This discussion has been archived. No new comments can be posted.

Experiments in Raspberry Pi

Comments Filter:

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...