[FFmpeg-devel] [PATCH] avfilter/af_pan: ignore named channels not in current layout

Ricardo Constantino wiiaboo at gmail.com
Thu May 11 03:41:26 EEST 2017


On 11 May 2017 at 00:01, Marton Balint <cus at passwd.hu> wrote:

>
> On Wed, 10 May 2017, Ricardo Constantino wrote:
>
> instead of erroring out.
>>
>> af pan=stereo|FL=FL|FR=FR|FC=FC would error because there's no
>> Front Center in stereo layout.
>>
>> This allows just changing the output channel layout and keeping
>> the same channel configuration across more than one output.
>>
>> Example usecase
>> * changing balance to the right-side channels for stereo and 7.1
>>
>> before:
>> pan=stereo|FL=0.2*FL+0.8*FR|FR=0*FL+1*FR
>> pan=7.1|FL=0.2*FL+0.8*FR|FR=0.0*FL+1.0*FR|FC=FC|LFE=LFE|BL=0
>> .2*BL+0.8*BR|BR=0.0*BL+1.0*BR|SL=0.2*SL+0.8*SR|SR=0.0*SL+1.0*SR
>>
>> after:
>> pan=stereo|FL=0.2*FL+0.8*FR|FR=0.0*FL+1.0*FR|FC=FC|LFE=LFE|
>> BL=0.2*BL+0.8*BR|BR=0.0*BL+1.0*BR|SL=0.2*SL+0.8*SR|SR=0.0*SL+1.0*SR
>> pan=7.1|FL=0.2*FL+0.8*FR|FR=0.0*FL+1.0*FR|FC=FC|LFE=LFE|BL=0
>> .2*BL+0.8*BR|BR=0.0*BL+1.0*BR|SL=0.2*SL+0.8*SR|SR=0.0*SL+1.0*SR
>>
>
> You still have to use a different command line for stereo and 7.1, so I
> don't quite see how this simplifies your use case. Even if your use case
> were justified, I'd still think the current behaviour should be preserved
> as a default.
>

My usecase is a script that changes the balance from left to right
without having to assume a certain channel layout.

As is, the script needs to know which channels exist in which layout for
every single layout and change the left and right channels. If you happen to
give pan a channel that doesn't exist it'll fail instead of just ignoring
it.


More information about the ffmpeg-devel mailing list