Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: AW: Re: AW: Problem with DVD-AC3-Playback and VDR0.98




On Wed, Nov 21, 2001 at 06:13:45PM +0100, Stephan Schreiber wrote:
> 
> Yes, I'm starting to realize that this might be exactly my problem.
> I don't seem to be able to tell aplay how to do that.
> 
> I tried
> 
> cat [dvd]test.ac3 | ac3iec958 [-x] | aplay [-f dat] [-f S16_BE] [-M] [-D
> hw:0,2]

Hmmm ... accordingly to the man page of aplay I'm read here this could be

    cat test.ac3 | ac3iec958 | aplay -f s16b -r [-M]

or

    cat test.ac3 | ac3iec958 | aplay -f iec958b -r [-M]

... but I'm currently not able to test this (the appropiate system is
at home and not ready because I'm working on an LCD and some other
hardware modifications).

> 
> in all permutations....
> 'hw:0,2' seems to do the same as 'iec958' or 'spdif', both options dont work
> together with S16_BE.
> The spdif in stays looped, and when I force it to be silent I hear strobing
> white noise.
> BTW: test.ac3 is a stream I got by replaying a VDR recording using the
> option -a 'cat > test.ac3'.
> ac3dec -C plays this one without any problems on spdif and my amplifier
> shows "AC3 3/2.1" on its display.
> dvdtest.ac3 is a stream I got the same way by replaying a DVD. It does not
> work with ac3dec (stuttering and too fast, complaining about CRC all the
> time).

Maybe a simple bash script for buffering input would help for using ac3dec
within pipes, e.g. something like:

#!/bin/bash
CHUNK_SIZE=2048
type -p buffer || { echo "Sorry buffer program required" 2>&1; exit 1; }
exec 0< <(exec -a buffer buffer -b 8 -s $CHUNK_SIZE -B -p 75)
exec -a ac3dec ac3dec -Z 6 -C

... try several CHUNK_SIZE's (ac3dec handles accordingly to the source
code of 0.9.0beta9 2047 bytes at one read, you may try this).  Also it
has the option -Z to add some zero AC3 frames before reading stdin.

> 
> > a modern A/V amplifier or receiver should be able to determine
> > the data bit
> > within the preamble of every PCM frame and this should cause to handle
> > the embedded AC3 frames therein.
> 
> In my case, it doesn't. It works well with ac3dec however (only not with
> DVDs as I mentioned before).
> 
> > The sample frequence is 48kHz (not 44.1 kHz), 16 bit, and the data is
> > given in big endian.  You may switch this with `-x' option of
> > ac3iec958 or try the format s16b with the option -f of aplay.  Some
> > aplay's are patched (or from beta alsa tree) and have the options
> > -P and -C (which means AES IEC95 professional and AES IEC95 consumer
> > or in other words AES/EBU and S/PDIF)
> 
> I think, that might be the key to it?
> I tried the latest (Beta 9) ALSA driver/lib/utils/tools as well as today's
> CVS.
> None of those aplay versions there has a -C or a -P option however....
> 
> How can I get that patched aplay? Is it a special SuSe version?

Hmmm ... seems to be an experimental patch I've found elsewhere for
alsa 0.5.10.  It's not found on any SuSE Linux release AFAIK.


          Werner



Home | Main Index | Thread Index