Blog Moved

Friday, November 30, 2012

Extracting WAVs from VOB Files

The Station to Station box set contains a DVD with hi-resolution digital rips of the album, including one in 96/24. Since I play all of my digital stuff through a Logitech Transporter, I needed to rip those files to the media server. Here's how I did it.

First, I used mplayer to rip the VOB files from the DVD. These files have trivial video in them, so that has to be removed. The command to do that is:

ffmpeg -i <infile.vob> -acodec pcm_s24le <outfile.wav>

The audio codec here is the usual one for 24-bit audio, as you can see if look at a wav generated from a flac file. E.g.:

# ffmpeg -i 01-statesboro_blues.wav
Input #0, wav, from '01-statesboro_blues.wav':
Duration: 00:04:19.94, bitrate: 4608 kb/s
Stream #0.0: Audio: pcm_s24le, 96000 Hz, 2 channels, s32, 4608 kb/s
At least one output file must be specified

Note that this is independent of the sampling rate, so it works for 48/24 files, as well.

So now I had a bunch of 96/24 wavs, which I could convert to flac in the usual way.

Monday, November 19, 2012

Perl Filters

A nice trick for easily writing Perl filters:

perl -pe 's/a/b/g'

will do the substitution on each line of input and spit it back out. And:

perl -i bak -pe 's/a/b/g' file1 file2....

will do the same, except it will change the given files and back them up to file1.bak, etc, as it does so.

Thursday, July 19, 2012

How To Add to an LVM Drive

One of the great things about LVM is that you never run out of space. If it seems as if you are about to do so, you just add a new "physical volume" to your "volume group", add that to your "logical volume", and resize the file system. In effect, it's as if you have a partition that spans multiple drives.

It would of course be a good idea to back things up before you do this. But sometimes we don't have that option, do we?

I'll suppose our existing volume group is "vgroup", and our existing logical volume is "vvolume".

All of this of course needs to be done as root.

A little hint first: You can (and probably should) give the "-t" (test) option to each LVM command first, to make sure it's going to do what you want. Then I hit up arow (history) and delete the "-t" option, so I make sure I'm running that same command.
  1. Add the new disk to the machine, and format whatever space we want on it (all of it, if we wish) as type 8e (Linux LVM). I'll assume this is now /dev/sde1.
  2. Create a physical volume:
    # pvcreate /dev/sde1
  3. Add the physical volume to the volume group:
    # vgextend vgroup /dev/sde1
  4. Check your work:
    # vgdisplay vgroup
    You should now see something like:
    VG Name               vgroup
    System ID             
    Format                lvm2
    Metadata Areas        2
    Metadata Sequence No  5
    VG Access             read/write
    VG Status             resizable
    MAX LV                0
    Cur LV                1
    Open LV               0
    Max PV                0
    Cur PV                2
    Act PV                2
    VG Size               3.68 TiB
    PE Size               4.00 MiB
    Total PE              1192327
    Alloc PE / Size       476931 / 1.82 TiB
    Free  PE / Size       476931 / 1.82 TiB
    VG UUID               JitzBk-zFH0-vhzm-XhYk-V5Xi-Nt7d-87K9En
    Note the free space we now have.
  5. Extend the logical volume:
    # lvresize -l 100%VG /dev/vgroup/vvolume
    The "-l 100%VG" says to resize to use all of the space in the volume group assigned to this logical volume. The argument can be given many ways. See "man lvcreate".
  6. Check our work:
    # lvdisplay
  7. Now we are ready to resize the filesystem:
    # e2fsck -f /dev/vgroup/vvolume
    It made me do that first.
    # resize2fs /dev/vgroup/vvolume
The LVM HowTo covers all of this.

    Saturday, May 19, 2012

    Using Remember the Milk with Thunderbird

    I've been looking for a few days now for a good task list to use under KDE. The main requirement is that I want something that will be easily usable on many computers, and mobile devices, and without my having to worry a lot about sync'ing.

    Google Tasks look great, but I don't want to have to use Google all the time, just to see and manage my tasks, and there doesn't appear to be a decent API for Tasks. So you can't sync them to Thunderbird or anything else.

    KOrganizer looks nice, but I don't see any good sync options there, either.

    So I stumbled across Remember the Milk, which is also a web-based task manager, but with lots of other support. There's an Android app, and there's also an iCal URL you can use to view tasks in other places. The only downside is that the iCal support is read-only.

    But I found a way around that in Thunderbird. First, you just add the iCal service as a calendar. (Get that URL from Settings> Info, in Remember the Milk.) That'll at least let you see your tasks in Thunderbird.

    Now, how to add tasks? Answer: Use RTM's google gadget in a tab in Thunderbird. First, you'll need to download the WAT extension for Thunderbird. Among other things, this will give you a box in the upper right corner where you can enter a URL, which will then be opened in a new tab. The URL to enter is:
    You'll need to sign in the first time, of course. You can now bookmark the page and have easy access to it whenever you need to add or modify a task. And, of course, you can do the same with the main RTM URL.