[Alsa-user] problem with "type file" device (save audio to disk)
Brought to you by:
perex
From: <Fri...@gm...> - 2002-03-28 21:41:40
|
Hi all! I've got some problems in writing a 5.1 audio stream from DVD (or a mpeg2 ripped from a DVD) to harddisk as one (or six) WAV file(s). I tried to use a program called a52dec for this, but the audio files I get seem to consist of 2 channels only (2ch downmix) when using the -owav option. Using the -owavdolby option results in a currupt WAV file (at least, I cannot read it in several programs that can read multichannel WAV). So, my next idea was to define an alsa file device to capture the audio output of XINE. In XINE I'm using the alsa PCM device surround5, as described in my .asoundrc (see below). I've set the sampling rate to 48kHz because I think this is the correct bit rate of videoDVD audio tracks. So, I get 6 audio channels written in one binary file (interleaved 16bit intergers). The only problem is: There are bit errors in the audio stream (approx. every 0.3 seconds). The 5.1 audio output I get from my soundcard is ok! Switching on/off resampling in XINE or specifying other sampling rates in .asoundrc doen't help. Perhaps it's a problem with the 5.1 audio decoder of XINE (it's liba52, I think). I've noticed rising the CPU load up to 80%-100% (from 30%) when switching on the 5.1 output in XINE. This behaviour does not change when I use the PCM device called 'hammerfall' (no writing to disk). Playing 2 channel sound only does not cause this high CPU load. So my questions are: * Is the high CPU load a XINE problem? * Did I define the alsa PCM device(s) correctly? * Can I use a52dec to solve my problem? How do I have to use it? * Is there another possibility to extract six descrete audio channels from a mpeg2 file (from DVD) and save them to disk? Any ideas? Thanks for any answers, f.ewaldt .asoundrc: pcm.hammerfall { type plug slave { pcm{ type hw card 1} rate 48000 } route_policy copy ttable.0.1 0.1 ttable.1.2 0.1 ttable.2.3 0.1 ttable.3.4 0.1 ttable.4.5 0.1 ttable.5.6 0.1 } pcm.surround5 { type file slave.pcm hammerfall file /mnt/somedirectory/dvd/audio.raw } -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |