[MPlayer-dev-eng] [PATCH] -oac copy with ac3 sound and lavf ts demuxer issues (Was: Re: [MEncoder-users] Video/Audio asynchronous)
michaelni at gmx.at
Tue Feb 20 17:48:05 CET 2007
On Tue, Feb 20, 2007 at 03:59:05PM +0100, Nico Sabbi wrote:
> Matthias Hopf wrote:
> >So the remaining question is basically twofold:
> >- Why is nBlockAlign, wBitsPerSample not set correctly?
> >- Why is dwRate/dwScale/dwStart/dwLength/dwSuggestedBufferSize wrong?
> > What are the right values?
> > I assume codec->frame_size and/or codec->sample_rate are wrong.
> > lavf gets it right for constant bit rate, but an unknown ac3 stream is
> > inherrently variable, so a VBR approach is the right thing (TM) to do.
> >Can anyone with a deeper understanding how demuxing in mplayer actually
> >works comment on my findings?
> those parameters must be set by decoders, not demuxers.
> More: those parameters are avi-specific; mplayer's core
> shouldn't even use them.
> In the case of ac3:
> - dwRate is srate
> - dwScale is 1536 (samples per frame)
> - nBlockAlign is 0
yes that is what demux_lavf should have set, ive changed nBlockAlign to 1
now and am waiting for feedback on what effect that has, its unclear if 0
is valid and 1 should work fine too in theory, its dwSampleSize which
switches VBR/CBR behavior
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the MPlayer-dev-eng