I used ffmpeg to set soundtrack from dvd, but the quality is really poor:

/usr/src/ffmpeg/ffmpeg/ffmpeg -i /misc/ddd/VIDEO_TS/VTS_01_0.VOB -ab 192
-vn /tmp/file.mp3

ffmpeg version 0.4.9-pre1, build 4754, Copyright (c) 2000-2004 Fabrice
configuration: --enable-a52 --enable-mp3lame --enable-gpl --sufix=/usr
built on May 7 2005 17:28:21, gcc: 2.96 20000731 (Red Hat Linux 7.3
Input #0, mpeg, from '/misc/ddd/VIDEO_TS/VTS_01_0.VOB':
Duration: 00:02:17.3, start: 0.336711, bitrate: 2474 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x576, 25.00 fps, 8000 kb/s
Stream #0.1: Audio: ac3, 48000 Hz, stereo, 224 kb/s
File '/tmp/file.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to '/tmp/file.mp3':
Stream #0.0: Audio: mp3, 48000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 23319kB time=994.9 bitrate= 192.0kbits/s q
size= 23327kB time=995.3 bitrate= 192.0kbits/s
video:0kB audio:23327kB global headers:0kB muxing overhead 0.000000%

The quality depends on output format, ie. after grabbing to *.wav
quality was good.

Looks like the problem is with pm3 codec. I'm using liblame:
[root]# rpm -qa | grep lame

[root]# ldd /usr/src/ffmpeg/ffmpeg/ffmpeg
libm.so.6 => /lib/i686/libm.so.6 (0x40028000)
libz.so.1 => /usr/lib/libz.so.1 (0x4004b000)
libdl.so.2 => /lib/libdl.so.2 (0x40059000)
libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x4005c000)
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Have You gat any idea, how to correct it.