Conspicuous Youtube Consumption

Stina Nordenstam rockin’ in the USB

I’ve been sleeping in even odder patterns than usual lately (I suspect that I’m coming down with microencephaly, SAD and “the hypo”), so I found myself staring at the stereo computer thinking that there should be movement.

I normally hate computer screens that have pulsing lights and stuff, but I wondered how much work it would be to automatically download music videos from Youtube for whatever was playing, and then just show the video.  The sound wouldn’t be synced up, of course, but it’d be a kinda… like…  spastic screen saver.

A screen saver that doesn’t save the screen or the CPU or the network or on electricity, and would probably get me banned from Youtube.

So I started typing, and here it is.

I had a spare USB-powered little screen, so I put the stuff on a small screen instead of using a big one.  I mean, that would be too fluttery.

It’s been in production for all of fifteen minutes now, so I have no idea whether I’m going to pull the plug on the “project” (and the USB monitor) or not.  I’m guessing I probably will.

There. I Fixed It.

I really like the fanless machines from Aleutia.  They have a nice form factor, they’re really silent, and they have kinda amusing web pages.

I’ve got three of the Sandy Bridge machines now, and they just like work and stuff.  Nine thumbs up.

However!

These are Sandy Brigde machines.  That means built-in Intel graphics.  Built-in Intel graphics have always sucked.  It still sucks.  They will probably always suck.

This doesn’t matter for two of the machines, but the third one is the one I use to watch tv with.  And that’s a problem.

If I use “-vo xv”, then I get tearing, but I can watch really “H” D.  If I use “-vo gl2”, then I get no tearing, but the CPU overheats and gets throttled, which means that I get stuttering video.

This is only a problem when watching 1080p and higher, so I haven’t really bothered doing anything about it.

Until today.

I got a fancy (i.e. the cheapest) fan-less low-profile nVidia card.

Epic unboxing sequence:

The Box!

 

Opened Slightly!

 

Opened Fully!

 

The Manual Removed!

 

And Something Else!

 

The Bag With The Card Is Revealed!

 

The Bag!

 

The Bag Has Sticky Tape On The Back!

 

The Sticky Tape Has Been Vanquished!

 

Peeking Out!

 

Almost Fully Revealed!

 

The Back Of The Card Revealed!

 

The Front Of The Card!

 

Where’s My Pulitzer!

 

Popping The Covers!

 

Pop!  Pop! Pop!

 

Naked!

 

Unscrewed!

 

Lo  Profiled!

Anyway, I got the Aleutia machine down from the shelf.

That’s A Bad Picture!

 

Quite Roomy Inside, Despite Size!

 

See?  There Should Be Room!

 

Er.  It pokes Out At The Top.

 

And The HDMI Port Is Concealed!

 

Bwa Ha HA!  I’ve Got Pliers!

 

Vanquished!

 

There!  I Fixed It!

http://vignette1.wikia.nocookie.net/godzilla/images/8/81/Genius-meme.png/revision/latest?cb=20130511201401

And it seems to actually work.  I can now watch the highest “D” that I’ve got on disk without any problems.

Stupid xorg.conf Tricks

Mimo Monitor

I’m getting addicted to small USB monitors.  They’re so practical for displaying “extra” information that I don’t want to clutter up my main screen.

These monitors just require one single cable to the computer, and they typically have a touch screen interface, too.  So you can pretty much use them for any small control/display project you have.

For the office, I wanted to display the currently playing music, because otherwise I frequenly have to query the music server what’s playing, and that disrupts my work flow.  So I hooked up the screen, and I started a separate X server to display the cover and the artist/album/track name.

Then I wondered: what would I want to control with this device?  The only thing I could think of was pausing.  And writing a program just to do that seemed like overkill. 

So I just pointed evrouter at it, with the following evrouterrc-file:

“eGalax Inc. USB TouchController” “/dev/input/event7” none key/330 “Shell/pause”

So when I tap the screen, then the music pauses.  Couldn’t be easier.

My problem was then that the main X screen also got the “tap”.  I’ve long wondered how to filter out certain input devices.  X, these days, is very helpful.  If you plug in an input device, it’ll use it.  I’ve previously tried to find out how to remove certain devices from certain servers, but never been able to find out how.

It turns out to be really easy. You just remove the stuff from /usr/share/X11/xorg.conf.d/10-evdev.conf, and then put the stuff you want into the xorg.conf file for the server.


Not the least bit hacky!

RAID Fun Redux

Addonics Mini Storage Tower

You will remember me getting a new eSATA box with the crappiest thermal design ever.  To recap, there’s a big fan situated a few millimeters from an almost totally non-holey wall, Batman.  When fans are that close to an obstruction, the air flow makes a lot of noise.  So I unplugged the fan to see whether it would work as a fanless box.

And it didn’t.  One disk died after a week or so, presumably from heat stroke.  So I plugged the fan in again, and lived with the sound of a vacuum cleaner emenating from the hall closet.

Cthulhu Attacking

Until today, when a new enclosure (from Addonics) arrived.  As you can see, there’s nothing obstructing the air flow here.  However, it’s not really a hot-plug enclosure, which is disappointing.  With all the various loose wires inside the box, it looks like Cthulhu exploded inside it.

But it’s pretty quiet.  I can’t hear it at all on a two meter distance, if the closet doors are shut.

So I give this a two thumbs up on a five star scale.

More Input Devices

Targus Wireless Presenter and Emacs Volume Control

Finding wireless input devices (for controlling the stereo) that are

1) not too ugly and
2) works reliably and
3) has a range over a few meters

isn’t trivial.  I’ve experimented with a few thingamabobs, and one device I’m pretty satisfied with is the Targus …  er…  I can’t find any model name here.  AMP02EU?  Anyway, it’s a “wireless presenter” (with a laser pointer, so I could entertain a cat if I had a cat, but I don’t *sob*), so, of course, it isn’t really geared towards music playing.  But since, these days, all input devices show up as input devices in Linux, you can use it for whatever you want, with a bit of configuration.

The first thing to do is to put the following in /etc/udev/rules.d/90-itron.rules. It has to be “late” in the udev chain so that other rules don’t overwrite the name we want.

KERNEL==”event*”, BUS==”usb”, SYSFS{idVendor}==”195d”, SYSFS{idProduct}==”7777″, MODE=”0666″, NAME=”input/itron%n”

I chose the name “itron” since that’s what lsusb claims that this device is:

rocket-sam:/etc# lsusb
Bus 002 Device 018: ID 195d:7777 Itron Technology iONE Scorpius wireless keyboard

Now that we know where the device will show up (i.e., /dev/input/itron*), we can route events to the commands we want to execute.  I googled around for a while before deciding to use evrouter, which gives us pretty simple access to all events.

“Itron Powerful Receiver” “” any rel/1/1  “Shell/emacsclient –server-file=rocket-sam –eval ‘(jukebox-decrease-volume)'”
“Itron Powerful Receiver” “” any rel/1/-1  “Shell/emacsclient –server-file=rocket-sam –eval ‘(jukebox-increase-volume)'”
“Itron Powerful Receiver” “” any key/272  “Shell/emacsclient –server-file=rocket-sam –eval ‘(jukebox-pause)'”
“Itron Powerful Receiver” “” any key/104  “Shell/lights 0”
“Itron Powerful Receiver” “” any key/109  “Shell/lights 1”

The first string is the name of the device (yes, that’s what it calls itself.  How masterful).  “rel” is the mouse.  “key” is, er, a key.

So this decreases volume when the mouse goes down, increases when the mouse goes up, pauses the music when I press the big button down, and switches the lights in the room off/on on two of the other buttons.

Which still leaves me with more unused buttons, but I haven’t found a use for them yet.

Then start the event routing in a startup script like so:

$ rm -f /tmp/.evrouter\:0.0
$ /usr/local/src/evrouter-0.4/src/evrouter -f /dev/input/itron*

(The first “rm” is needed because evrouter doesn’t seem to clean up after itself always…)

The only minor problem I now have is that although evrouter picks up the events, they still get passed on to X.  So when I increase the volume, the mouse cursor goes upwards.  I haven’t bothered trying to investigate how to make X ignore certain input units, but if anyone has a pointer to a conf example, please leave a note in the comments.

Live TV!

Still can’t get my camera to focus on the TV

I haven’t really missed having live TV for a decade, but it would be practical if guests wanted to watch the news or something.  So it just occurred to me that doing live TV would be trivial with the current infrastructure.

I have an Emacs (on a machine in the closet) doing the PVR thing, so I just had that one listen to an emacs-server socket, and then just say emacsclient –eval ‘(pvr-choose-channel “CNN”)’ to change the channel.  In addition,  I have an inetd entry to spew out the programme itself:

8040 stream tcp nowait larsi /bin/cat cat /dev/video0

Close-ups work fine, though.

And then some new commands in the Emacs-based movie browser running on my movie browsing machine, and Bob is a close relative.

Everything is on github, as usual.