[Mplayer-dvb] LPCM PES
mocm at convergence.de
mocm at convergence.de
Mon Dec 17 21:30:01 CET 2001
Hi,
here are some tips for the LPCM PES that you send to the DVB card.
1) Since it is an audio PES it can't have a DTS, so if you have a
timestamp, you only need the PTS. So pes_header[8]=5;
and leave out the pes_header bytes 14 - 18.
That leaves you with either payload_size+=10; without PTS or
payload_size+=15;. Thats the 3 bytes from the header after the
length plus the 7 bytes of the lpcm header and with or without the
5 bytes of the PTS.
2) Don't write a PTS, if you don't have one. If yu have a timestamp
for the MPEG or AC3 frame, then use that for the first resulting
LPCM PES and leave all others empty.
3) The LPCM header is as follows:
id 8 bit
number of frames 8 bit
first acces unit pointer, i.e. start of audio frame 16 bit
audio emphasis on-off 1 bit
audio mute on-off 1 bit
reserved 1 bit
audio frame number 5 bit
quantization word length 2 bit
audio sampling frequency (48khz = 0, 96khz = 1) 2 bit
reserved 1 bit
number of audio channels - 1 (e.g. stereo = 1) 3 bit
dynamic range control (0x80 if off) 8 bit
The driver for the DVB card ignores all but the sample frequency
bits. The Margi driver probably needs everything set correctly, but
I can't test it right now.
4) The DVB driver only takes LPCM PES with length < 2048 including the
first 6 header bytes.
Hope that helps.
Marcus
More information about the MPlayer-dvb
mailing list