Older blog entries for connolly (starting at number 67)

more on music collection and office organization

I'm still not sure how to manage my music files. Now that I have most of it on one big disk on a linux always-on machine (I hesitate to say server as I don't have a clear back-up strategy), I put our mac mini under the TV in the hearth, replacing the XO-1 laptop, in order to do video as well as just sound.

It doesn't make much sense, after all, to try to stay open-source-pure when it comes to listening to RIAA music and watching hollywood movies; I might as well have Steve Jobs negotiating my sharecropping deal.

mpd uses .m3u files. They're pretty simple, but for archival purposes, I try to stick to XHTML. I wrote another little python ditty to do the conversion: see m3uin.py in r423:4a5a8b2d237c of palmagent hg repo.

I run it like this:

$ python ~/projects/palmagent/m3uin.py
/var/lib/mpd/playlists/Three\ Chords\ and\ the\ Truth.m3u

and out comes:

  1. from A Song's Best Friend_ The Very Best Of John Denver [Disc 1]
    by John Denver
    Poems, Prayers And Promises

  2. from WOW Worship (orange)
    by Compilations
    Did you Feel the Mountains Tremble

  3. from Family Music Party
    by Trout Fishing In America
    Back When I Could Fly

Not only can us humans make sense of that, but it's got RDFa attributes sprinkled here and there that make it yummy Semantic Web Data so that we can delegate processing to machines:

Jukebox$ xsltproc --novalid
http://www.w3.org/2008/07/rdfa-xslt three_chords.html 
Jukebox$ rapper three_chords.rdf -o turtle | less
rapper: Parsing file three_chords.rdf with parser rdfxml
rapper: Serializing with serializer turtle
rapper: Parsing returned 77 triples

and out comes:

@prefix h: <http://www.w3.org/1999/xhtml> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix mo: <http://purl.org/ontology/mo/> .

<three_chords.rdf#album1> dc:title "A Song's Best Friend_ The Very Best Of John Denver [Disc 1]" ; mo:track <artists-popular/John%20Denver/A%20Song%27s%20Best%20Friend_%20The%20Very%20Best%20Of%20John%20Denver%20%5BDisc%201%5D/1-04%20Poems%2C%20Prayers%20And%20Promises.mp3> ; a mo:Record ; foaf:maker <three_chords.rdf#agent1> .

<three_chords.rdf#agent1> a foaf:Agent ; foaf:name "John Denver" .

In my March 2008 item, hAudio for microformats mixtapes, in progress, I tried using microformats but struggled since hAudio was still sparsely documented and changing. In contrast, RDFa and the music ontology were pretty easy to work with.

As I said in my Aug 2008 item, The details of data in documents; GRDDL, profiles, and HTML5, one of the options is that "People who want to put data in their HTML documents use RDFa".

I'm looking into getting metadata from the audio file, not just the path name. In particular, using the mutagen library I can see that iTunes stores CDDB IDs when it rips music and I'd like to use those to ground my data globally:

MPEG 1 layer 3, 160000 bps, 44100 Hz, 246.81 seconds (audio/mp3)
COMM=iTunNORM='eng'= 00000550 000001F3 00002A22 00002F25
00021A29 000219F5 0000707F 00006A4C 0003536D 0002B40A
TPE1=John Denver
TIT2=Poems, Prayers And Promises
TENC=iTunes v4.7
TALB=A Song's Best Friend: The Very Best Of John Denver [Disc 1]
TCOM=John Denver

Yet ToDo: connect this with ImmPort/PDB in neurocommons/science commons/creative commons work (pdb-immport code in SVN), Linked Open Data for the U.S.A. recovery IT infrastructure, and maybe XBRL stuff.

See Also:

still outfitting this netbook... well, I brought the acer back and got the msi Wind U120 that I asked for in the 1st place.

The . key is tiny and shifte over a little. I regularly hit / when I mean . and I don't know whether I'll be able to retrain myself.

I'd like to try the Ubuntu netbook remix; Ubuntu recommends putting a jaunty jackalope daily build on flash drive; I tried that, but (a) it took forever to write 1GB+ to a flash drive and (b) the machine won't boot from flash drive.

Wubi worked, but having my Ubuntu world live inside NTFS doesn't feel right.

I have an external USB CD drive; I'll eventually use that to re-install, I think.

Meanwhile, Ubuntu doesn't seem to grok the wireless card. (There's a bug in launchpad and I subscribed to it. IOU one link...)

So I'm trying out Windows for the 1st time in years. I want to update one of my hg-backed web sites. TortoiseHg seems like a good approach... the 1st N attempts to download it yielded "file is corrupt" when I tried to run it; I didn't think switching from chrome to Opera would help, but it did. Hmm... could chrome really screw up downloading that badly?

Now I'm trying cygwin and ssh and such. Wish me luck...

18 Apr 2009 (updated 18 Apr 2009 at 20:55 UTC) »

I'm trying out a new netbook

The keyboard is quite small; at first, touch-typing didn't work at all, but I seem to be getting the hang of it. It's a good thing clicking on the trackpad works; the button is hopeless.

I hope/plan to have it run Ubuntu as well as the WinXP that came on it, but I'm really struggling to get Ubuntu on it:

* The ubuntu "jaunty jackalope" image (@@link) is 1GB, which takes quite a while to download and even longer to write to the SD card (I seem to get 1.1 Mb/sec sustained). * This machine won't boot from its media card slot (@@cite source)

I managed to boot debian-from-scratch with an external CD, but it couldn't recognize the ethernet card. What's the equivalent of lsusb under WinXP?

I'm using Opera rather than firefox just now; I figure if I'm gonna use a closed-source operating system (Win XP) I might as well try Opera while I'm at it. Boy, is Internet Explorer bloated with ads and such.

The google toolbar seems to bind a bunch of keys that I accidentally hit on occasion. Annoying.

This machine is an Acer; I could swear I asked the guy at Micro Center for an MSI Wind.

The USB disk enclosure is wrong again too: it's IDE when I need SATA. And the $20 wifi router won't play nice with my Brother HL-5250DN printer.

Let's try copying the image to a Lexar SDHC 4BG card and see if it's any faster...

connolly@pav:~/Desktop$ dmesg | grep Attach

[82241.020775] sd 9:0:0:0: [sdk] Attached SCSI disk

connolly@pav:~/Desktop$ sudo dd if=jaunty-netbook-remix-i386.iso of=/dev/sdk bs=1M

wow! MUCH faster!

692+1 records in
692+1 records out
725796864 bytes (726 MB) copied, 14.9489 s, 48.6 MB/s
23 Feb 2009 (updated 24 Feb 2009 at 23:07 UTC) »
Family business blog: drupal or wordpress? self-managed or hosted?

The Kansas City Web Professionals meet this Wednesday. I started to post to their linkedin group about my recent trip to Web Directions North, but I figured hey: why drive ad revenue on linkedin rather than my own consulting business site, Midwest Web Sense?

But that site needs some maintenance. I set up drupal on nearlyfreespeech.net and tried to get OpenID working with it... when I ran into glitches, I learned I'm already a major version behind. And the other drupal site in my life, breadcrumbs is falling apart because the drupal guy in our research group moved on.

Yesterday, Kyle, my 9 year old son, agreed to help. So I explained about hosted blogs vs running your own, and where the ad revenue goes, and such.

We had a fun hack session in my office; you can see his work on choderbug and as wsouski on twitter. I think he's starting to grok the community values:

@wsouski don't be a spammer, wsouski. don't be a spammer.

Update: the WP domains clue from mhausenblas in #swig was just the ticket to set up notes.midwestwebsense.com: Web Directions North ski trip was a blast!

I found something I was looking for via ohloh tonight... the only thing it knows about me is that I made a handful of commits to the W3C validation service in 2001. I started a profile and registered cwm as a project, but there wasn't enough instant gratification to keep me at it...

2 Jan 2009 (updated 11 Jan 2009 at 20:20 UTC) »
XO-1 as music front-end?

Latest mt-daapd transcodes. Sweet. No more ripping flac to mp3 just for stupid iTunes -- ndw 21 Dec 2008

Perfect; now that I have a new big disk, I can take our iTunes libraries, which have gotten sorta mixed up, and merge them into one big honkin networked library. mt-daapd Ubuntu quickstart worked fine.

But... how to access the songs from the living room? The roku soundbridge and stuff look nice, but I can't justify the cost. Likewise airport express.

It just hit me: my xo-1 has wifi and a headphone jack.

update: it works! I used mpd with output to icecast2. The documentation could use some diagrams, but once I got the picture, it was reasonably straightforward:

  • mpd indexes the music, takes commands over a network protocol from various clients such as pympd (linux) and theramin (mac), queues songs, and decodes and streams them

  • icecast takes streams and buffers and multiplexes them to multiple clients
  • mplayer on the XO-1 listens to the stream and plays it thru the headphone jack
  • powered speakers in the living room play the results

For bonus points: I'd like to control it from my sidekick (or g1). That should be just a matter of setting up a web-based mpd client and exposing it thru the firewall.

My related work:

Related work by others:

1 Jan 2009 (updated 1 Jan 2009 at 21:49 UTC) »
Still struggling to catalog CDs

I'd like to catalog a bunch of CDs. My cuecat isn't working today; I'm not sure why not. And even if it were, alexandria fails to make heads or tails of the list of ISBNs that I captured last time it worked.

I'm not quite ready to pay $40 for Delicous Library 2, but I'm getting there.

zebra looks interesting; I like the idea of scanning barcodes with a webcam.

I couldn't get the firewire DV camera that works great with kino to work with cheese or ekiga any other v4l app; dunno why.

I broke out the old USB webcams; they still don't work. lsusb shows them as:

046d:08b2 Logitech, Inc. QuickCam Pro 4000
0545:8333 Xirlink, Inc. Veo Stingray/Connect Web Camera
046d:0870 Logitech, Inc. QuickCam Express
0733:0401 ViewQuest Technologies, Inc. CS330 WebCam

lots of this:

$ cheese
libv4l2: error dequeuing buf: Input/output err

The Ubuntu community seems to track this as Bug #260918; I just subscribed.

p.s. quicken records show:

  • 2001/12/09 Best Buy Xirlink VEO PC Camera $26.74
  • 2001/12/29 Best Buy veo pc camera 26.74
  • 2002/12/21 COMPUSA #141 quickcam 59.99
  • 2003/11/29 MICRO CENTER #191 quickcam express rev2 49.99
1 Jan 2009 (updated 8 Jan 2009 at 15:29 UTC) »
Reviving Home Movies with kino and ffmpeg

I've tried digitizing movies before, but the codec puzzles were overwhelming. This year, Kino pretty much Just Works. After one permissions issue with /dev/raw1394 , it ate hours of video and produced nice collections of DV files with SMIL wrappers (hmm... I wish SMIL were an XHTML microformat... more on that another time). And it exports not only ogg but also consumer technology: youtube-style .flv and XVid that works with the $20 DVD player I got via craigslist. (Thanks for the clues, longtail video.)

One reason I swapped this task back in was that we ran across home movies on decaying analog media when cleaning up the basement. Another reason is all the storage space I have since I couldn't pass up a Micro Center hot deal: $70 for 640GB of disk. That's 11 cents/GB.

update: kivo is flaking out, as is dvgrab.

It's sorta silly to use DV format to capture video off VHS. It's also silly to capture all the uninteresting bits at high bit-rate. Better to make a cheapo FLV of the whole thing and then go back over the interesting parts.

ffmpeg to vcd works; to do svcd, need unstripped libs per medbuntu bug info

$ ffmpeg -t 2:00:00 -f dv -i /dev/dv1394/0 -target ntsc-svcd

p.s. note Video Pain by Tim Bray, May 2008.

30 Dec 2008 (updated 30 Dec 2008 at 18:39 UTC) »

woot! It works! Youtube videos on a $30 media player!

The AMV format was new to me; I found a HowToConvertToAMV recipe, but that lacks support for mp4a, the audio codec used by youtube (at least the videos I tested).

Then I found adding --enable-faad to ffmpeg (don't forget to make distclean) and presto:

$ clive
clive 0.4.19 20080722  [Linux]
=> 1 (2.6MB), failed: 0, skipped: 0.
BrianReganWalkieTalkie.mp4                    100%    2.6MB
 109.2KB/s 00:00:24

$ ~/src/amv-codec-tools/AMVmuxer/ffmpeg/ffmpeg -i BrianReganWalkieTalkie.mp4 -f amv -s 128x90 -r 16 -ac 1 -ar 22050 -qmin 3 -qmax 3 BrianReganWalkieTalkie.amv FFmpeg version SVN-r589, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-libfaad libavutil version: 49.5.0 libavcodec version: 51.47.1 libavformat version: 51.17.0 built on Dec 30 2008 12:07:41, gcc: 4.3.2 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'BrianReganWalkieTalkie.mp4': Duration: 00:01:13.7, start: 0.000000, bitrate: 291 kb/s Stream #0.0(und): Audio: mpeg4aac, 44100 Hz, stereo Stream #0.1(und): Video: h264, yuv420p, 320x240 [PAR 0:1 DAR 0:1], 30.00 fps(r) PIX_FMT_YUV420P will be used as an intermediate format for rescaling Output #0, amv, to 'BrianReganWalkieTalkie.amv': Stream #0.0(und): Video: amv, yuvj420p, 128x90 [PAR 0:1 DAR 0:1], q=3-3, 200 kb/s, 16.00 fps(c) Stream #0.1(und): Audio: adpcm_ima_amv, 22050 Hz, mono, 64 kb/s Stream mapping: Stream #0.1 -> #0.0 Stream #0.0 -> #0.1 Press [q] to stop encoding frame= 1172 fps=343 q=0.0 Lsize= 3878kB time=73.2 bitrate= 433.7kbits/s video:3062kB audio:802kB global headers:0kB muxing overhead 0.376436%

Merry Christmas, Kyle!

It's not as nicely packaged as the Mac app Justin uses with his ipod, but it's cheaper and more free (I'm not sure if it's quite open source; I don't know the license details of the AMV code.)

See also: #swig chat, including notes on a mythv box.

tags: media, video

struggling to get my data out of Zope

I found a recipe for iterating over the contents of a Zope store. It looks promising, but I'm not wining yet. My zope instance was built with zope 2.7 but the debian server has 2.9 now; 2.7 doesn't even show up in an apt-cache search.

This job of migrating dm93.org from Zope was pending an alternative to Zope for family calendar storage. Now that my wife's laptop runs Leopard, google calendar works as a host.

Then I somehow lost root when poeple.w3.org was upgraded or something, and I just recently got around to asking thru channels to get it back.

Time to swap this job out, I think; here's my current state:

PYTHONPATH=/usr/lib/zope2.9/lib/python python
Python 2.4.4 (#2, Oct 22 2008, 19:52:44) 
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more
>>> from Zope2 import app
>>> root=app()
DeprecationWarning: Using OFS.content_types is deprecated
(will be removed in Zope 2.11). Instead use
  from OFS.content_types import find_binary
No handlers could be found for logger "Zope"
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/zope2.9/lib/python/Zope2/__init__.py", line
51, in app
  File "/usr/lib/zope2.9/lib/python/Zope2/__init__.py", line
47, in startup
  File "/usr/lib/zope2.9/lib/python/Zope2/App/startup.py",
line 46, in startup
  File "/usr/lib/zope2.9/lib/python/OFS/Application.py",
line 685, in import_products
    import_product(product_dir, product_name,
  File "/usr/lib/zope2.9/lib/python/OFS/Application.py",
line 723, in import_product
    raise sys.exc_info()

58 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!