[MPlayer-dev-eng] [PATCH] [TEST AFILTER] Encode ac3 at runtime using lavc

Ulion ulion2002 at gmail.com
Sun Nov 18 21:42:22 CET 2007


2007/11/19, Ulion <ulion2002 at gmail.com>:
> Hello,
>
> As a wellknown feature of AC3Filter, it support encode ac3 at runtime
> and passthrough it to spdif. With this feature, peoples has only a
> decoder support ac3 can enjoy multi-channel audio from dts, aac, wma
> pro, eac3, etc.
>
> Here's a test audio filter which do this work by using lavc to encode
> ac3 at runtime. It works with me on ppc and intel, but seems it now
> introduce a little more flick of subtitles on mac system.
> And also, I'm not familar with audio filters, so the code probably do
> things in some wrong way, or missed something, such as encode the last
> audio frame, calculate the delay, etc, and also the calculate af->mul.
> If this filter is worth to do, please give suggests on it, or someone
> else make a better one.
>
> The patch need to reorder channels, so it rely on my reorder_copy
> patch I sent just now. Or I should make it independent?
>

I forgot to say the usage:

normally, add these to cmdline to encode multi-channel to spdif
-channels 6 -af lavcac3enc=1

full usage is
-af lavcac3enc=A:B:C

A: 0: output raw ac3 stream. 1: passthrough to spdif. current default is 0
B: bitrate, if not set default for 2ch is 192kbits, and 384kbits for
more than 2ch.
C: min_channel_num to apply this filter, if nch is less than this
value, detach the filter. current default is 5

-- 
Ulion



More information about the MPlayer-dev-eng mailing list