There is an audio resampler and downmixer in ffmpeg. I haven't used it yet,
so I can't tell you anything except that it's there. Maybe it helps you.
Take a look at avcodec.h ll 2807+

Jean-Yves Avenard schrieb:
> Hi
> 
> 2009/10/5 Amol Gandigude <[email protected]>:
>> Hi,
>> I think you can refer ffplay code, it handles this as follows:
>>
>>  AVCodecContext *enc;
>>
>>  if (enc->codec_type == CODEC_TYPE_AUDIO) {
>>
>> if (enc->channels > 0) {
>>
>> enc->request_channels = FFMIN(2, enc->channels);
>>
>> } else {
>>
>> enc->request_channels = 2;
>>
>> }
>>
>> }
>>
>>
>> so you need to set the request_channels parameter. The decoder will take
>> care everything else. Hope this will help.
> 
> Wouldn't this only work with decoder that are supporting downsampling ?
> For those that don't, then the resample filter is called and this one
> won't work.
> 
> So this solution doesn't seem to be universal.
> 
> For example with AAC, when I try this, I only get the left and right
> channel and the center channel (with all the vocals) is missing.
> 
> Thanks
> Jean-Yves
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
> 
> 
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to