Just for fun: A three-part home media system

It’s a new year, so here’s something fun. I’m going to show you one screenshot, and then another, and then tell you what’s going on. First, this really boring console shot.

Nothing special there. mplayer is running. So is alsaequal; that’s probably unusual enough to note. I keep it on every system I have, just as a way to compensate for the sound qualities of the room.

Next, the Toshiba Satellite J12 bequeathed to me for a song, as I mentioned yesterday. You might recognize it; it’s famous on the Internet. :roll:

What’s worth mentioning is the fact that these are not the same computer — the console image you see there wasn’t taken on the Satellite.

It was taken from a machine that predates it by about 10 years, and is networked into the larger one. mplayer is running on the big one, but it’s being controlled from the small one.

Which means all of the interaction — audio control, position, subtitles, color control … everything — is piped back and forth across the network from the big machine to the little, and vice-versa.

But the video output goes to the Satellite’s screen. :twisted:

And there’s one more thing here that I can’t show you, because there’s nothing really to see. The DVD rip itself — the actual video file — isn’t on the Satellite.

No, it’s being served across the network by still another machine — and this one is almost as old as the control system.

But with an oversize drive and a fast network card, it can serve video data over a wireless connection, which is played on the larger machine, which is controlled by the oldest computer in the house.

(This is the part where I apologize for the post the other day, suggesting that screen and mplayer have a difficult time working together. They did, but the problem appears to have vanished with a fresh installation. My mistake. Sorry about that. :oops: )

More importantly, that means this is another possible use for an out-of-date or ancient computer: as a front-end for a larger one.

And most importantly — to me, anyway — is that the entire circuit, from controller to server to display, runs without the need for Xorg.

You only need framebuffer support on one machine — the display computer, and that one can be as powerful or as not-powerful as you like.

Considering I used to play the same DVD rips on a machine that was running at 550Mhz with only 4Mb of video memory, that’s not saying much. ;)

Here’s a little detail, machine by machine.

Controller: This only needs ssh access to the main machine. I run this with Crux i586 on the second tty of a 120Mhz Pentium, and ssh into the display machine. I also have the Terminus font installed, but that’s neither here nor there.

Networking hardware is an ancient pcnet-driven PCMCIA card, and that’s more than enough since the traffic in and out of this machine is negligible.

Server: A server system can be and do a lot of things, but for my purposes Debian is perfect, and easy to set up too. I put everything in the home directory of a privileged user, and serve that directory as an nfs share.

The network connection is a ralink PCMCIA wireless card, which was rather quirky to arrange, but gets good upload and download speeds, and so is best suited for this situation. Best of all, the power draw is less than a light bulb, it takes up almost no space, and has a battery backup in times of need. ;)

Display: This machine is the winner this time, chosen for its large (to me, anyway) screen, clear display and speedy network access. I using the wired Intel PRO/100 connection because I have a five-meter network cable, and I like the fast access speeds.

This machine needs the most in the way of software, because this is where most of the action happens. To wit:

  • Framebuffer access. If you’re using a modern distro you probably already have this. If you’re using a very old computer, it might be a little tricky to get working.
  • mplayer and codecs, if your conscience allows. I should mention that archlinux.fr keeps a codecs package in its repository.
  • ssh daemon. Remember dropbear is considerably lighter than some other ssh suites. And remember Remy’s ssh dialog, if your connections are stacking up.
  • nfs client access. If you prefer samba or another service, you’re on your own. :|
  • alsa or another audio subsystem, of course. Unless you can read lips, I guess. … ;)

I also include screen and a few ancillary programs, like alsaequal, mc, htop and moc. They’re all useful on the odd chance, or for playing music if video isn’t required.

I mentioned networking equipment for all of these, because that’s where your bottleneck is. I am confident my 133Mhz Pentium can actually serve up those files in plenty of time for the Celeron M.

But if I have a slow wireless card in it, or if there is network pressure from other machines, things start to stutter. So be aware: Skipping playback, in my experience, is probably because of network speed.

(Those new Blue Ray DVDs ripped at 1080p or whatever are going to be tricky. Even my core duo has trouble with those, and that’s if they’re on the local drive. :shock: :| )

That’s all for the hardware I’m using. There are a couple of minor points that should probably be addressed, in way of configuration. First of all, it’s useful to know a few of mplayer’s flags, like …

  • -zoom, to expand or contract the output,
  • -fs, to push the size to full screen, which paints the outlying areas black, as opposed to leaving leftover text on the fringes,
  • -x and -y, to manually force the dimensions of the output,
  • -vf scale=x:y, to scale the output instead, or
  • -aspect x:y, to force an aspect, and
  • -vo, to force a video driver, although with nothing else on the machine, mplayer (in the default Arch version) jumps straight to the framebuffer.

In my case, this is what my ~/.mplayer/config file looks like.

zoom="1"
fs="1"
vf="scale=1024:-3"
vo="fbdev"

The -3 in the vf line throws the y dimension out to a proportionate depth. I think. I can’t find the documentation on it, but I’ve had it around forever and it seems to work. I know, I know: Google is my friend. …

That’s not the last though. This little trick is this coup de grace:

setterm -cursor off -blank 0

Because even with mplayer’s -fs flag, the cursor on a tty screen will blink by itself, in the middle of the screen. Sometimes. But more importantly, -blank sets the default video timeout for the terminal to zero — meaning, never.

Otherwise, after about 20 minutes, your screen will go dark and you’ll have to get up and walk over to the keyboard, and press a key to get the image back. And we can’t have that, now can we? :mrgreen:

That’s all. Let me know if you can get this working with something in the handheld department, because that might be where the fun lies.

I have heard of people connecting to home networks with Sharp Zauruses (Zaurii?) or Toshiba Libretto minicomputers. Something that small … well, it’s practically a remote control. ;)

Just don’t fight over it. :mrgreen:

P.S.: I should mention, if you are more keen on forcing the video into Xorg instead of the framebuffer, to try the xinit command with DISPLAY=0:1 and your mplayer command. And to remember xset s off, which should stop screen blanking. Beyond that though, you’re on your own. … :)

About these ads

11 Responses to “Just for fun: A three-part home media system”


  1. 1 Raymii 2011/01/01 at 8:28 PM

    Hey, thanks for mentioning my script again :). Best whishes for 2011 to you and everyone who reads your awesome and very informative blog!

  2. 2 anon 2011/01/02 at 3:34 AM

    You need a god tier PC for HD video. My Pentium D (dual core 3.0 GHZ) struggles as well, thought Flash makes it much harder to use, especially with crap GFX card.

  3. 3 Jose Catre-Vandis 2011/01/02 at 8:06 AM

    Can this go into /etc/rc.local to get it to work on boot?

    /usr/bin/setterm -cursor off -blank 0

    • 4 K.Mandla 2011/01/03 at 7:52 AM

      Yup. That’s where I put it in my system and it’s working exactly as it should. I didn’t mention that in the post though. … Hmmm. … :|

  4. 5 nothingspecial 2011/01/04 at 7:26 AM

    “First, this really boring console shot.

    Nothing special there”

    I can assure you, it was nothing to do with me ;)

  5. 6 Luca 2011/01/05 at 2:01 AM

    Is there a framebuffer frontend for XBMC? ^_^


  1. 1 Mint vs. LMDE: Sudden weight gain « Motho ke motho ka botho Trackback on 2011/01/03 at 12:20 PM
  2. 2 Links 3/1/2011: KOffice 2.3.0 Released, New View for Activity Journal | Techrights Trackback on 2011/01/04 at 7:59 AM
  3. 3 Not a new idea, not a bad idea « Motho ke motho ka botho Trackback on 2011/01/23 at 9:18 PM
  4. 4 Adjusting an mplayer flag « Motho ke motho ka botho Trackback on 2011/01/24 at 8:39 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,645 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: