Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | WP Backend | RSS2 | Atom

Archive for 2007-12

Downsample

I can't tell the difference between a 32KBps and 224KBps mp3 file. Can you?

So I'm down-sampling all my mp3s to fit on my new mp3 player. I should be able to fit around 3 days of music onto my 1GB player this way.

Here's a script to do that---a work in progress

#!/bin/sh

## Compressmp3s - Copyright 2007 Hal Canary
## Dedicated to the Public Domain.

## Arguments: a list of directories to search for mp3s
## This script will use lame to create a 32kbps version
## of those mp3 and save it in a subdirectory of $TARGETDIR

if [ "$#" -lt 1 ] ; then
    echo "Give me an argument!"
    exit 1
fi

TARGETDIR="$HOME/tmp/CompressedAudio"
mkdir -p "$TARGETDIR" || {
    echo "Use a directory you have permissions for.";
    exit 1 ; }

## for FILE in "$@" ; do
find "$@" -name '*.mp3' | while read FILE; do
    IN="$FILE"
    OUT="${TARGETDIR}/$FILE"
    ## Grab the id3 info for later use
    artist=`id3info "$IN" | grep TPE1 | \
        awk -F ': ' '{print $2}'`
    album=`id3info "$IN" | grep TALB | \
        awk -F ': ' '{print $2}'`
    track=`id3info "$IN" | grep TRCK | \
        awk -F ': ' '{print $2}'`
    song=`id3info "$IN" | grep TIT2 | \
        awk -F ': ' '{print $2}'`
    echo "$OUT"
    ## refuse to clobber a file
    if [ ! -f "$OUT" ] ; then
        echo "  artist=$artist"
        echo "  album=$album"
        echo "  track=$track"
        echo "  song=$song"
        echo ""
        DIRECTORY=`dirname "$OUT"`
        mkdir -p "$DIRECTORY" || { echo "permission error" ;
            exit 1 ; }
        lame -b 32 "$IN" "$OUT" \
            --ta "$artist" --tl "$album" \
            --tn "$track" --tt "$song" \
            --add-id3v2
    else
        echo "  already exists!"
    fi
done

Okay, on some files, I *can* tell the difference.

* * *

Compare: 032kbps mp3 versus 128kbps mp3.

Hal Canary | Computers & Code | 2007-12-12 12:40:06 UTC
Permanent Link | Comments Off

12/05

Happy December 5th, everyone!

Hal Canary | Life | 2007-12-05 14:26:58 UTC
Permanent Link | Comments Off

"King" *sounds* so much better than "President for Life"

If Pervez Musharraf had just declared himself King of Pakistan years back no one would have minded (except me; personally I hate kings ("mostly rapscallions")). Do we ever ask the king of Saudi Arabia or queen of England to step down in favor of a democratically elected head of state?

Hal Canary | Politics | 2007-12-02 23:18:32 UTC
Permanent Link | Comments Off

year in movies

Netflix keeps a record of what you've rented. That makes reviews easier:

===THE YEAR IN RENTAL DVDs 2007===

Hot Fuzz - loved it. May have to buy it at some point.

Stranger than Fiction - was okay. Don't need to see it again.

Reign Over Me - liked it. Kind of depressing, but good.

Black Snake Moan - still can't decide on this one. It may be a horrible movie, but I watched the whole thing.

300 - eh. Too full of itself.

Heroes: Season 1: Disc 1 - didn't like it. Uninteresting characters. No narrative hook.

Harry Potter and the Goblet of Fire - not so good the second time through.

Howl's Moving Castle - very good. Can't believed I waited iuntil this year to watch it.

Who Killed the Electric Car? - I want an electric car.

Shopgirl - Eh. Clair Danes needs to play a new charater once in a while.

Charlie and the Chocolate Factory - don't need to see this one twice. Was okay.

Children of Men - good movie. A little depressing.

MirrorMask - okay.

The Queen - okay.

Borat - awful. Had to send back mostly unwatched.

Running with Scissors - not that interesting.

Seven Years in Tibet - I liked it. Don't need to see it again.

When the Levees Broke: A Requiem in Four Acts - well done. I recomend it. But don't need to see it again.

Clerks 2 - unnessisary sequil.

The Adventures of Buckaroo Banzai - I can't believe I hadn't seen it before. Wonderful.

Talladega Nights: The Ballad of Ricky Bobby - Eh. Not that great.

The Island - I liked it. Good movie.

Hal Canary | Movies | 2007-12-02 23:17:39 UTC
Permanent Link | Comments Off

new music player

My second-generation ipod died this year. It was five years old. I have now replaced it with a $40 1GB flash-based thing (an Insignia Kix from Best Buy). It has %10 of the memory, but is 10 times as easy to use. Just copy files onto it, no messing around with a separate program to create playlists and update databases.

Of course, next year they'll have a 4GB product for the same price.

Hal Canary | Computers & Code | 2007-12-02 23:17:33 UTC
Permanent Link | Comments Off

Copyright 1997-2007 by Hal Canary.
mailto: h3 at halcanary dot org
xmpp:halcanary@jabber.org
aim:halwcanary
http://halcanary.org