KIOSlave audiocd now working!

Hey folks, I had to put myself into the same group as the cd device (/dev/hdc on my box) in order for the kioslave audiocd to work. If you didn't know about this, it breaks the cd down into various formats; if you try to copy them, it will digitally extract them and convert to that format directly - how convenient! Coincidentally the permissions are
-rw-rw---- root:disk
The cd does not get mounted when audiocd does its thing - there is no trace in either /etc/mtab or /proc/mounts that reveals the cd has been mounted. Very curious, but a handy tool!

On a side note, audiocd does not support mp3 format. The best way to get there, from my experience, is using audiocd to rip WAV files, and then using another encoder (I've used ffmpeg available on sourceforge, which I wrote a servicemenu for. I had to use a little perl script, too, and some regular expressions so it was a great project!)
Here's the servicemenu wav2mp3.desktop placed in /opt/kde/share/apps/konqueror/servicemenus/:

[Desktop Entry]
ServiceTypes=audio/x-wav
Actions=encode

[Desktop Action encode]
Name=Encode WAV to MP3
Exec=wav2mp3 %u

Here's the shell script that's called by the servicemenu:

#!/bin/bash
# PMN 12-24-2005
# uses ffmpeg in conjunction with wav2mp3.pl to convert wav files to mp3

ffmpeg -i "$1" -ac 2 -ab 128 -acodec mp3 "$(wav2mp3.pl "$1")";

And here's the perl script wav2mp3.pl:

#!/usr/bin/perl
# PMN 20051225 1400 PST
# preserving the original filename while changing the extension from wav to mp3

$ARGV[0] =~ m/(.+?(?=\.wav\Z))/i;

print $1.".mp3";


Happy Linuxing!
Post a Comment

Facebook

Paul Nguyen's Facebook profile

Nerd Test

v1.0:
I am nerdier than 94% of all people. Are you a nerd? Click here to take the Nerd Test, get nerdy images and jokes, and talk on the nerd forum!
v2.0:
NerdTests.com says I'm an Uber Cool High Nerd.  Click here to take the Nerd Test, get nerdy images and jokes, and write on the nerd forum!

Bloggers' Rights

Bloggers' Rights at EFF