LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Blogs > Musings on technology, philosophy, and life in the corporate world
User Name
Password

Notices

Hi. I'm a Unix Administrator, mathematics enthusiast, and amateur philosopher. This is where I rant about that which upsets me, laugh about that which amuses me, and jabber about that which holds my interest most: Unix.
Rate this Entry

Saving money the techie way...part 2.

Posted 07-01-2011 at 10:59 AM by rocket357

Hevithan commented on my Roku blog post yesterday, so while I was responding I'd realized that in the original post I hadn't even mentioned one of the coolest features we use heavily on our Roku: Roksbox. Here's the "top level view":

Roksbox is a channel for the Roku...just like Hulu, Netflix, Pandora, Amazon Prime, etc... you access it with the same ease and speed as the other channels. (Note: there's a one-time "registration" fee of $15 USD for Roksbox...and it's worth way more than that for me and my family).

What's different about Roksbox is the source of video/photos/music/etc... While Netflix/Hulu/etc... rely on your internet connection and servers that those respective companies own, Roksbox can point to any webserver that serves movies/music/etc...**any** webserver that serves movie files in the proper format will work. I happen to work for a web-hosting company, so I know a thing or two about setting up webservers, so I figured I'd try my hand at setting up a small home webserver.

My obvious first choice would be to run a chrooted OpenBSD apache webserver. That didn't happen for two reasons:

1) Lack of hardware. The few large hard drives I have are in my wife's Win7 machine and my desktop. (Yes, hard drives are cheap. So am I.)
2) (here's the kicker) My daughter wanted to play some flash games, so I told her I'd setup a Linux machine for her. She bugged me about it for weeks, so I ended up using the only machine that was reasonably fast enough: my desktop. I figured that I could setup one of the slower machines I have as an OpenBSD cwm/tmux "desktop", because that's typically how I operate anyways, and it doesn't take something fancy to accomplish that.

So the end result is that I have apache running on my daughter's Ubuntu install, and since that machine is reasonably powerful enough, I use it for all the video encoding that this project prompted. Here's the encoding workflow:

1) Put DVD in the dvd drive on the Ubuntu box (I would advise against using this workflow as a means to pirate movies or music...I have my personal thoughts and feelings on DRM, but breaking the law isn't the way to go about "fighting" it...as such, I only do this with movies I own, and if I want a movie that I don't own yet, I go buy it).
2) ffmpeg or mencoder the VIDEO_TS/*.VOB files to /var/www/Videos/<movie_name>.mp4 (NOTE: if your Roku is setup to operate in stereo, it'll hang when loading a 5.1 surround sound mp4 (that was one seriously annoying "bug" to track down!). Either change the Roku to 5.1 surround sound, or make sure you pass -ac 2 to ffmpeg to downmix everything to stereo. Also (while talking about "gotchas"), make sure you don't have any stray nfo files whose name (minus extension) match a movie mp4 filename. If you do, and the nfo file isn't proper XML, Roksbox will crash when you try to watch that movie. This happened when I was experimenting with using nfo files to pull in movie data from imdb for the movie "Ice Age". I had IceAge.mp4, then created IceAge.nfo and didn't create the file properly...before I deleted the nfo file, every time my kids tried to watch Ice Age Roksbox would "crash", kicking the Roku back out to the main menu).
3) Fire up Roksbox, pick a movie, and enjoy! (Note: I know this sounds lazy, but there's something to be said for "point and click" to watch a movie. No more hunting through racks of DVD's, or bothering keeping physical disks in order...now I can tuck the physical disks away in some safe place and watch the Roksbox copy without having to even get up to change the DVD. I'm sure there are thousands of other ways to accomplish this (well, Netflix/Amazon/etc...), but it still rocks).

Roksbox has the ability to setup different users, so I have an admin (who can watch any movie, but requires a password), and a regular user (no password, but can only watch kids movies). The reasoning behind that should be sufficiently obvious when you consider I have two kids. I don't need them watching "13 Ghosts" or somesuch, then having nightmares for months about it.

At this point, life is good. Then I got some new hardware that my company was tossing out...nothing fancy, but more than fast enough to run a simple webserver. While setting stuff up, I noticed one very critical issue...I have two four-port Netgears daisy-chained together (7 available ports in total), and I have 9 machines. Doh! I freed up one port by popping a second NIC in the Linux box and plugging the Roku into it. Then, with a few iptables rules in place, the Roku has access to the internet again =) As a bonus feature, doing it this way cuts down on LAN traffic, since the Roku is plugged directly into the webserver machine.

Long term goal: Buy a 24+ port gigabit switch.

I haven't messed with the music or photo capabilities of Roksbox much (Pandora handles music for me and I don't care much for photos, to be honest), so I can't comment on those...but for movies Roksbox has definitely "rocked".
Posted in Uncategorized
Views 815 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration