ID3 Tagging Audio Book Files

For whatever reason, the audio books we get at the library sale generally don’t have CDDB database entries, so I fill in the appropriate values by hand. Weirdly, some individual CDs within a single book do have entries, which confuses the process (well, me) no end unless I notice it first; I’ve turned off auto-lookup to make that problem Go Away. Perhaps a different database would help, but I don’t do this nearly often enough to care that much.

Given that:

  • Mary plays the tracks sequentially from start to finish
  • The tracks don’t correspond to book divisions
  • She doesn’t care about the details

I concluded a simple track naming convention that sorts in ascending alphabetic order would suffice.

Asunder auto-fills the fields after the first CD. After a bit of manual wrestling to extract an error-filled track, I had a directory full of MP3 files with informative, albeit slightly redundant, names:

1901-01 - Track 01.mp3

Alas, the ID3 fields apply to a single music CD, with track numbers and names within a single album and no notion of a multi-CD set. I use the “year” field as a CD sequence number; it must be a four-digit year and, seeing as how Asunder defaults to 1900, the first CD becomes 1901.

So the following fields apply:

  • Genre: “Audio Book” (for v2 tags) or Speech (v1 tag = 101)
  • Artist: author
  • Album: book title
  • Year: 19 + CD number within set as 1901
  • Track Name = CD number + track number as “D:01 T:01″

But the real gotcha is that the Most Favorite MP3 Player (remember MP3 players?) recognizes only ID3 v1 tags and Asunder writes only ID3 v2 tags.

Fortunately, the id3v2 utility can do this thing. Rather than screw around selecting each file, extracting the v2 tags, doing something horrible involving bash or sed or awk or whatever, and ramming the results into v1 tags, I just fed in the appropriate number of CDs and more than enough tracks, then ignored any errors concerning missing files.

Firing a Bash cannon broadside:

for d in {01..15} ; do id3v2 -1 -a "Who Wrote It" -A "The Book Title" -y 19$d -g Speech 19${d}* ; done
for d in {01..15} ; do for t in {01..15} ; do id3v2 -1 -t "D:${d} T:$t" -T $t 19${d}-${t}* ; done ; done
for d in {01..15} ; do for t in {01..15} ; do id3v2 -2 -t "D:${d} T:$t" -T $t 19${d}-${t}* ; done ; done

The last line tightens up the title name tag in v2 format to fit the MP3 player’s teeny display. The next time around, I should remove the “Track” text from the file name for consistency.

And then it just worked…

2 Comments

CD Ripping: Fractional Tracks

Mary gets books-on-CD at the annual library book sale, but she’s found they’re easier to use in MP3 format. We regard format transformation for our own use as covered by the First Sale Doctrine and Fair Use, but, obviously, various legal opinions differ.

I use Asunder to rip audio CDs, although it doesn’t handle non-recoverable errors very well at all. Wiping the offending disc with nose oil or ripping from a different drive will resolve most of the issues, but a recent acquisition had a nasty circumferential scratch in the middle of Track 7 that just didn’t respond to Black Magic.

CDparanoia can rip portions of a track, so a little binary search action extracts the usable data from Track 7:

cdparanoia "7-7[4:35]" Track7a.wav
cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector  177155 (track  7 [0:00.00])
	  to sector  197780 (track  7 [4:35.00])

outputting to Track7a.wav

 (== PROGRESS == [                              | 197780 00 ] == :^D * ==)   

Done.

cdparanoia "7[5:30]-7" Track7b.wav
cdparanoia III release 10.2 (September 11, 2008)

Ripping from sector  201905 (track  7 [5:30.00])
	  to sector  208894 (track  7 [7:03.14])

outputting to Track7b.wav

 (== PROGRESS == [                              | 208894 00 ] == :^D * ==)   

Done.

With that in hand, you import the two WAV files into Audacity with a five second gap between them, drop two seconds of A-440 sine wave in the gap, and export to MP3.

The M3U playlist entry has the track time in seconds, so I hand-carved that entry to match the abbreviated length:

#EXTINF:376,Disc 14 Track 7
14-07 - Track 7.mp3

Done!

7 Comments

Hobo Datalogger vs. Hacked AA Alkaline Battery

The AA battery pack grafted onto the back of the Hobo datalogger recording groundwater temperature showed a 50% level during its most recent dump, so I swapped in a pair of new AA cells.

The pack hack dates back to 2009-09 and the Duracell Ultra cells have a “best used by” date of March 2013. Call it 5.5 years of service and, figuring an average current of 10 μA, that’s a total of 480 mA·h.

The datasheet shows many graphs at much higher currents, but a capacity of 3500 mA·h to 0.80 V at 5 mA seems pretty close. Given that they produce 2.87 V with no load, they’re still in decent shape.

However, the logger’s opinion of their voltage is what counts. To estimate that number, I checked the reports from the attic: the death planet for lithium cells.

Starting with an old Energizer failing after a few hours in December:

Attic - Insulated Box - Early battery failure

Attic – Insulated Box – Early battery failure

Two new Maxell CR2032 lithium cells also had trouble, with the first reporting a low voltage in January:

Attic - Insulated Box - Maxell battery failure

Attic – Insulated Box – Maxell battery failure

The second in February:

Attic - Insulated Box - Maxell battery low - 2015-02-25

Attic – Insulated Box – Maxell battery low – 2015-02-25

I think the Maxell cells failed from low temperature, but dead cell is dead.

That happens just above 2.85 V, so the attic datalogger now carries an AA alkaline battery pack.

 

Leave a comment

Thunderbird: Disabling an ISP Email Account

For reasons that probably make sense to them, Optimum Online (the ISP part of Cablevision) uses totally insecure password-in-the-clear user authentication to the POP3 and SMTP servers. That’s marginally OK for access through their own cable network, but, should you access those servers through a different ISP, you’ve just exposed some sensitive bits to the Internet at large.

Disabling an account in Evolution requires removing one checkmark:

Edit → Preferences → Mail Accounts tab → uncheck the account → done!

Doing the same in Thunderbird, however, requires arcane knowledge and deft surgery, documented in the usual obscure forum post containing most of the information required to pull it off:

Edit → Preferences → Advanced tab → Config Editor button

Search for server.server and find the .name entry corresponding to the ISP account. Note the digit identifying the server, which in my case was 1: server1.

Search for server1 and find the number of the mail.account.* entry with that string in the value field. In my case, that was account1.

Search for accountmanager to find the mail.accountmanager.accounts entry and remove the account you found from the Value string.

Done!

Make a note of all that information, because you must un-futz the accountmanager string to re-enable the account. Of course, if you add or remove any accounts before that, all bets are off.

There, now, wasn’t that fun?

Leave a comment

Samba Setup Woes

As with all Windows boxes, the old Lenovo Q150 (dual booted with Win 7 Home Premium) became slow and cranky, despite not being used for anything other than monthly science and annual taxes. Various fixes and tweaks being unavailing, I swapped in an Optiplex 780 (dual booted with Win 7 Pro), replaced the IBM L191p monitor with the recapped Dell 2005FPW, reinstalled all the programs, and discovered that Samba was intermittent.

For future reference…

Win 7 Pro includes the Remote Desktop Protocol server that’s missing from Win 7 Home Premium. Oddly, RDP works better than UltraVNC, using Remmina as a client.

The file server in the basement runs Xubuntu 14.04 with Samba 4.1.6 and works perfectly with smbclient, showing no glitches at all. Even when the Win 7 box doesn’t show the server shares at all, it’s rock solid to my desktop Xubuntu box.

The familiar sudo service samba restart doesn’t actually do that any more, so get used to the two-step dance:

sudo service nmbd restart
sudo service smbd restart

However, that sometimes seems to start a spurious third copy of smbd (there should be two, for unknown reasons), so it’s better to use a four-step dance:

sudo service nmbd stop
sudo service nmbd start
sudo service smbd stop
sudo service smbd start

The old SysV init system wasn’t good enough, so they invented the run-all-the-things upstart, then systemd Borged upstart, all while Samba, one of the most critical Windows interfaces, still hasn’t emerged from the original init scripts. They call this progress, but I’m not sure.

Telling the Samba server to not be the domain controller, which should resolve intermittent pissing matches over who’s on first, had no effect.

When the Win 7 box does show the shared files, everything works fine: files read & write with the proper permissions, the owners & groups are fine, all is right with the world. In between those moments, however, nothing works, because the share simply doesn’t appear.

Then, seconds or minutes or tens of minutes later, it’s back!

Setting map to guest = bad password, as found in the usual random blog comment, had no effect.

The most recent Samba update replaced the /etc/samba/smb.conf file, so we’ll restart from scratch and see what happens next.

My general approach to Samba has been to futz around until it mysteriously starts working. That seems not to be of any avail this time around; we may put the tax data on a USB stick and move on.

7 Comments

Monthly Science: Snowcover vs. Well Pit Temperature

The well pit definitely got cold during those nights when the air temperature dropped well below zero:

Well Pit - 2015-02-25

Well Pit – 2015-02-25

Match that against the attic air temperature:

Attic - Insulated Box - Maxell battery low - 2015-02-25

Attic – Insulated Box – Maxell battery low – 2015-02-25

The well pit has two vent holes made from old-school fluted steel downspout pipe embedded vertically in a half-foot concrete slab. They’re maybe five feet apart and the southwest hole seems to be the air inlet:

Well Pit - SW vent

Well Pit – SW vent

The northeast hole must be the outlet for all that ground-warmed air:

Well Pit - NE vent

Well Pit – NE vent

The logger hangs from the string entering from the center left, with a ring hung over an abandoned hose bib rising straight out of the concrete.

Surely it’s been that cold before without freezing the pipes, so I won’t worry too much…

Leave a comment

MTD Snowblower Muffler Bolts

One of the bolts from the replacement muffler on the MTD snowblower worked its way out of the engine block and vanished along the driveway, perhaps to be found when the snow vanishes in a few months. The muffler’s still in place, but the engine exhaust comes straight out of the port into that compartment and, because I’m running the engine a bit rich to make up for oxygenated gasoline, a beautiful blue flame jets about two inches from the bolt hole.

Being that sort of guy, I installed one of the original bolts that I’d tossed into the bin with its relatives and continued the mission.

For future reference:

  • MTD Snowthrower E6A4E
  • Tecumseh engine HMSK80
  • Tecumseh muffler 35056
  • Tecumseh bolt 651002

The bolt has, of course, delightfully custom specs: 5/16-18 x 4-3/16.

My bolt stash tops out at 4 inches, so that not-quite-1/4 inch extra length means you gotta buy an OEM bolt.

They’re $1.20 from Jack’s Small Engines, with five bucks of shipping, or you can find a kit with two bolts and the lock bracket for $12 on Amazon.

No pix, because it’s 14 °F outside and barely more than that in the garage.

8 Comments