[FFmpeg-user] How can I convert mpeg2 5.1 audio to ac3?
barsnick at gmx.net
Tue Nov 11 14:02:28 CET 2014
On Tue, Nov 11, 2014 at 12:29:09 +0000, Andy Furniss wrote:
> Carl Eugen Hoyos wrote:
> > Where I live all movies are broadcast PLII.
> Ahh, I didn't realise it was still so popular.
Where I live - Germany - the "minor" stations try to use less bandwidth
on the satellite transponders / in their bouquets, and transmit only
one AC-3 audio stream with two channels. Nevertheless, I get quite
proper surround sound from my sound system during many movies. So my
conclusion is that they use the PLII "down-mix".
(Unless that statement was a misunderstanding and we're talking about
something totally different.)
> > As said MythTV contains a PLII decoder (filter).
> Doesn't seem very much compared to the quite complicated looking
> descriptions of what a "real" decoder supposedly does.
> float lt = *samples++;
> float rt = *samples++;
> bufs->l[ic] = lt;
> bufs->lfe[ic] = bufs->c[ic] = (lt+rt) * m3db;
> bufs->r[ic] = rt;
> // surround channels receive out-of-phase
> bufs->ls[ic] = (rt-lt) * 0.5;
> bufs->rs[ic] = (lt-rt) * 0.5;
That looks different from what we were looking at earlier in the thread
(and far too simple). Carl Eugen had pointed out this file:
and its main worker function is block_decode(). It's far less simple
than your example, and sort of corresponds to my understanding of what
a decoder needs to do. You can't just add and subtract left and right
channels. Since you have to work with phases, you need to do FT when
operating in the digital domain. (From what I still know from my
studies in electrical engineering.) And that's what this function does.
Nevertheless, there's an implemention there! And even open sourced.
> I don't pretend to know what should happen
Disclaimer: I do honestly mostly pretend to know, but I really don't
know much. ;-)
More information about the ffmpeg-user