[MPlayer-dev-eng] [PATCH] dvd subtitle and audio selection

Arpi arpi at thot.banki.hu
Sat Aug 2 23:40:26 CEST 2003


Hi,

> On Sat, Aug 02, 2003 at 10:49:51PM +0200, Arpi wrote:
> > this was discussed many times in teh past: it's not possible (recommended)
> > to switch just audio id, and then wait what happens.
> > after you changed audio stream id, you have to
> > - flush demuxers' dp queue
> > - reinit codec to new format (when switching between 2.0, 5.1, dts etc)
> > - reinit af and ao when number of channels or samplerate changed
> > 
> > and unfortuanetlly g1 was not designed to allow changing codec while playing
> 
> Okay... can you mention an example of a Region 1 DVD that has multiple
> audio codecs used?  I would like to find a copy for testing.  All DVDs I
> have all use the same audio codec for all channels.

all dvd with DTS audio tracks, or almost all music DVD (which have LPCM
(uncompressed) audio).

but actually AC3 2.0 and AC3 5.1 (stereo and dolby digital) are different
codecs. the same liba52 decodes both, but needs to eb initialized
differently for them. And all of the DVDs i have have both 5.1 and 2.0
tracks. If you start mplayer ion a 2.0 track, it may work, as liba52 can
downsampel 5.1 to 2.0 (thanks Rich for the idea), but for switch from 2.0 to
5.1 you'll get buffer errors unless you reinit liba52 and the resampler,
and the af and ao layers (they are inited to 6 channels, but liba52 cant
decode 2.0 to 5.1, and the resampler cant resample 6 channels from space of
2 channels without sig11...)

and then we didnt mention switching to/from ac3 and lpcm/dts tracks yet.

and what if samplerate changes?

this thing you did may work with hwac3 only, which just passthru all dat ato
digital out, and external ac3 amplifiers usually recognize ac3, dts and lpcm
from headers.

> Until I can find such a DVD, I'm going to continue to include this patch
> in my cygwin patches.  Thanks for your response, I won't bother any more
> with getting this in CVS.

i don't care what do you do wiht this, but this was implemented long before
you did (year(s) ago) and turned out to be unworkable for the above reason.


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list