On Susanne's PC:
Installed MySQL client from repos
Edit /etc/mysql/my.cnf, adding this line to stanzas [client] and [mysqld]:
default-character-set = utf8
sudo /etc/init.d/mysql restart
installed mysql server
had to enter password
susanne@arwen:~$ mysql -p -u root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45-Debian_1ubuntu3.3-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
set password for root@localhost = password('xxxxxxx');
mysql> CREATE DATABASE amarok;
Query OK, 1 row affected (0.02 sec)
mysql> USE amarok;
Database changed
mysql> GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD'
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> Aborted
susanne@arwen:~$
Showing posts with label audio. Show all posts
Showing posts with label audio. Show all posts
Saturday, May 31, 2008
Monday, May 12, 2008
Ripping Audio from a DVD
I was recently asked to get the audio from a DVD and place it on a portable media player. Here's how I did it, using Ubuntu 7.04.
1. Installed mplayer from the repositories
2. played the various chapter until I found the one I was looking for. This can be a bit of a hit and miss process, as DVD's often have rather strange title/chapter builds. The command is:
"Output.wav" is the output file name.
chapter 1-2 means I want the audio from both chapters. "2-2" would have taken only the second.
4. Import the wav file into audacity, a superb audio editor.
5. I then used audacity to crop and normalize the audio I wanted, including adding nice fade ins and outs.
6. I Again in audacity, export the audio to mp3.
All Done.
References:
Most of this is derived from this post on the Ubuntu forums.
1. Installed mplayer from the repositories
2. played the various chapter until I found the one I was looking for. This can be a bit of a hit and miss process, as DVD's often have rather strange title/chapter builds. The command is:
mplayer dvd://4Where the "4" refers to the title number. This particular DVD has 6 titles. Apart from playing the chapter, you'll see a bunch of stuff in the console window. click "x" to stop playing. The output includes the following:
Playing dvd://4.3. The red text above shows the information I needed. There were two audio tracks for this title, I was after the english (en) version. The command to extract the audio is: (This is meant to be all on one line)
There are 6 titles on this DVD.
There are 2 chapters in this DVD title.
There are 1 angles in this DVD title.
audio stream: 0 format: ac3 (stereo) language: en aid: 128.
audio stream: 1 format: ac3 (stereo) language: zh aid: 129.
number of audio channels on disk: 2.
number of subtitles on disk: 0
MPEG-PS file format detected.
VIDEO: MPEG2 720x480 (aspect 2) 29.970 fps 7500.0 kbps (937.5 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
mplayer -vc null -vo null -aid 128 -ao pcm:fast:waveheader:file=output.wav dvd://4 -chapter 1-2The "128" refers to the audio track found in step 2.
"Output.wav" is the output file name.
chapter 1-2 means I want the audio from both chapters. "2-2" would have taken only the second.
4. Import the wav file into audacity, a superb audio editor.
5. I then used audacity to crop and normalize the audio I wanted, including adding nice fade ins and outs.
6. I Again in audacity, export the audio to mp3.
All Done.
References:
Most of this is derived from this post on the Ubuntu forums.
Thursday, February 28, 2008
Audio format conversion
I recorded some audio (my daughter singing), and wanted to send the audio to someone in a generic and friendly format, namely mp3. The Nokia handset records as an amr (Adaptive Multi Rate) file. A good player, like VLC will play this quite happily as-is, but a lot of people wouldn't know what to do with an amr file.
Ubuntu talks happily to my phone, so getting files off is easy. I have a USB data cable (CA-53) for the phone (Nokia 6234). Ubuntu mounts the micro SD card automatically, if you choose "Data mode" from the phone menu once plugged in. "Default mode" doesn't work. Depending on how your handset is setup, you may have to use the handset interface to copy stuff from the phone's built-in memory to the memory card.
I found a program called Mobile Media Converter, which does a great job. I simply downloaded the archive, extracted it somewhere and ran the executable from there. The interface is straightforward, and even supports drag'n'drop if you're into that sort of thing. No settings to tweak, it just works. It's based on ffmpeg, which you may or may not already have installed, but comes with it's own version, so should work regardless.
Ubuntu talks happily to my phone, so getting files off is easy. I have a USB data cable (CA-53) for the phone (Nokia 6234). Ubuntu mounts the micro SD card automatically, if you choose "Data mode" from the phone menu once plugged in. "Default mode" doesn't work. Depending on how your handset is setup, you may have to use the handset interface to copy stuff from the phone's built-in memory to the memory card.
I found a program called Mobile Media Converter, which does a great job. I simply downloaded the archive, extracted it somewhere and ran the executable from there. The interface is straightforward, and even supports drag'n'drop if you're into that sort of thing. No settings to tweak, it just works. It's based on ffmpeg, which you may or may not already have installed, but comes with it's own version, so should work regardless.
Subscribe to:
Posts (Atom)