[mythtv] Re: Software AC3 decoding when watching TV
Marcus Metzler
mocm at mocm.de
Wed Dec 15 10:53:11 UTC 2004
>>>>> "Juha" == Juha Kuikka <juha.kuikka at gmail.com> writes:
Juha> On Wed, 15 Dec 2004 17:54:24 +0800, Tj
Juha> <htpc at treblid.dyndns.org> wrote:
>> Following up my mails about software AC3 decoding. Found some
>> things so far:
>>
>> (1) It appears that AC3 of DVB and A52 of ASTC are one and the
>> same (ac3dec.c doesn't work as there is no directory called
>> libac3, even in the latest ffmpeg sources).
Juha> I think this http://liba52.sourceforge.net/ should be
Juha> installed so ffmpeg can decode ac3.
>> (3) Tuned to HDTV channel. No go. AC3 has the same startcode as
>> MPEG2, thus myth(or ffmpeg?) gives it the codec_id =
>> CODEC_ID_MPEG2. Hence all along Myth is trying to use the MPEG2
>> decoder to decode AC3 streams (that's why I am hearing rubbish
>> when I use a AC3 APID).
Juha> Depends. AC3 should be in privete_stream_1 PES packets in TS
Juha> stream. At least in DVB and American ATSC. This is where
Juha> ffmpeg searches for it, see mpegps_read_packet and
Juha> mpegps_read_pes_header. What do you mean with "startcode"?
>> sound? If yes, then australia's HDTV broadcast is really messed
>> up.
Juha> Do you have a bit of stream somewhere? I could take a look.
AC3 PES in a TS are different from the AC3 PES in a PS (or better DVD
VOB). They lack a 4 byte header in the payload of the private stream 1
PES where the streamid is set and a pointer to the first frame in the
PES is given. The streamid is not necessary for TS because AC3 can be
recognised via the PMT. The pointer to the first frame, may be nice
but is not really needed. In a TS without a PMT (not really a TS, but
you know what I mean) it is harder to recognise an AC3 stream, because
there are other streams that use the private stream 1 id, like
subtitles and videotext.
Marcus
--
/--------------------------------------------------------------------\
| Dr. Marcus O.C. Metzler | |
| mocm at metzlerbros.de | http://www.metzlerbros.de/ |
\--------------------------------------------------------------------/
|>>> Quis custodiet ipsos custodies <<<|
More information about the mythtv-dev
mailing list