Opened 15 years ago

Closed 14 years ago

#6626 closed defect (wontfix)

mythtranscode selecting wrong audio track

Reported by: anonymous Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: MythTV - Mythtranscode Version: head
Severity: medium Keywords:
Cc: Ticket locked: yes

Description

I don't know if this is by design or a fault

mythtranscode --chanid 1502 --starttime 20090612132700 -v all --profile autodetect --fifodir
......
2009-06-12 17:48:16.498 AFD: Trying to select audio track (w/lang)
2009-06-12 17:48:16.498 AFD: Selected track 2: English AC3 2ch (A/V Stream #2)
2009-06-12 17:48:16.498 AFD: Initializing audio parms from audio track #2
2009-06-12 17:48:16.498 AFD: Audio format changed
                        from id(NONE)    -1Hz -1ch   0bps    ; id(NONE)    -1Hz -1ch   0bps
                        to   id( AC3) 48000Hz  2ch  16bps    ; id( AC3) 48000Hz  2ch  16bps
2009-06-12 17:48:16.499 Dec: Trying to select track (w/lang)
2009-06-12 17:48:16.499 Dec: Selecting first track
2009-06-12 17:48:16.499 Dec: Selected track #1 in the Unknown language(0)
2009-06-12 17:48:16.499 Dec: Selected track #1 in the English language(6647399)
......

So AvFormatDecoder? selects the AC3 track. This is then ignored and decoderbase selects the first audio track. This looks to be due to avformatdecoder.cpp at some time having a new method AutoSelectAudioTrack? and AutoSelectTrack? set as

// documented in decoderbase.cpp
int AvFormatDecoder::AutoSelectTrack(uint type)
{
    if (kTrackTypeAudio == type)
        return AutoSelectAudioTrack();

    if (ringBuffer->InDVDMenuOrStillFrame())
        return -1;

    return DecoderBase::AutoSelectTrack(type);
}

So if AvFormatDecoder::AutoSelectTrack? is used AutoSelectAudioTrack? will be used to get audio track. If DecoderBase::AutoSelectTrack? is used the first will be returned.

Is this incorrect behaviour? if so could a) decoderbase.h be changed to call AvFormatDecoder::AutoSelectTrack? (This seems a hack to me, where else is DecoderBase::AutoSelectTrack? used) e.g.

inline void DecoderBase::AutoSelectTracks(void)
{               
    for (uint i = 0; i < kTrackTypeCount; i++)
        AvFormatDecoder->AutoSelectTrack(i);
        //AutoSelectTrack(i);
}  

b) move AutoSelectAudioTrack? to decoderbase.cpp and change DecoderBase::AutoSelectTrack? to use it like AvFormatDecoder::AutoSelectTrack? currently does, then remove AvFormatDecoder::AutoSelectTrack?

Change History (4)

comment:1 Changed 14 years ago by sphery

see, also #8180 (which has links to samples)

comment:2 Changed 14 years ago by chris@…

Any update on this bug? It has been over a year, and I am still experiencing issues with it.

comment:3 Changed 14 years ago by robertm

Ticket locked: set

comment:4 Changed 14 years ago by robertm

Resolution: wontfix
Status: newclosed

It seems really unlikely that anyone is going to look at this in the absence of a patch. IF you come up with anything, please feel free to open a new ticket and we'll get it assigned.

Note: See TracTickets for help on using tickets.