[mythtv] Re: Software AC3 decoding when watching TV

Marcus Metzler mocm at mocm.de
Wed Dec 15 11:52:40 UTC 2004


>>>>> "Tj" == Tj  <htpc at treblid.dyndns.org> writes:

    Tj> Sorry for the late reply.. was trying to figure out how to
    Tj> actually record a short clip.

    >> I think this http://liba52.sourceforge.net/ should be installed
    >> so ffmpeg can decode ac3.
    >> 
    >> 
    >> 
    Tj> I did have that installed - via an RPM for mplayer to play
    Tj> ac3... Myth also has libavcodec, does it uses that or uses the
    Tj> liba52.so? It seems to use the internal libavcodec...

    Tj> If I start and stop mythbackend mythfrontend enough times, I
    Tj> actually got AC3 sound working!!!

    Tj> a52_decode_frame in libs/libavcodec/a52dec.c only works when
    Tj> buf_size is 1024. Anything else there's no sounds..

    >> Depends. AC3 should be in privete_stream_1 PES packets in TS
    >> stream. At least in DVB and American ATSC.  This is where
    >> ffmpeg searches for it, see mpegps_read_packet and
    >> mpegps_read_pes_header. What do you mean with "startcode"?
    >> 
    >> 
    >> 
    Tj> startcode is some variable used by the mpegps_read_pes_header
    Tj> function (line 1359: libs/libavformat/mpeg.c). It's called by
    Tj> mpegps_read_packet (line 1500: libs/libavformat/mpeg.c). For
    Tj> Australia Channel TEN, the AC3 APID has a startcode of 0x1c0,
    Tj> which is then assigned the codec_id of CODEC_ID_MP2... (AC3
    Tj> has a startcode of 0x80)..

    Tj> Also, since it's a ts stream, shouldn't
    Tj> libs/libavformat/mpegts.c be used instead?

    >> Do you have a bit of stream somewhere? I could take a look.
    >> 
    >> 
    >> 
    Tj> you can get it here at http://treblid.dyndns.org/2guys.nuv
    Tj> (approx 20MB). Pls tell me if it doesn't work.....

This doesn't look like a TS and I could not find any audio, but I only
downloaded 1MB.

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