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.
Best regards
Amol
On Sun, Oct 4, 2009 at 9:34 PM, Jean-Yves Avenard <[email protected]>wrote:
> Hi there...
>
> I'm not sure this is the right mailing list, as while it's for an
> external program, it probably will require changes to ffmpeg code.
>
> Let me know which list would be more appropriate..
>
>
> I'm currently investigating how to add some code in MythTV in order to
> properly play multi-channels audio tracks on a stereo system.
>
> Looking into the matter, I found this post
> http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/046633.html
>
> One of the issue at the time was that decoders sent output in native
> channel order for that codec.
> However, I now believe that all codecs (except Ogg, but there's a
> patch) output in SMPTE order.
>
> The resample code still doesn't handle resampling when the audio source is
> > 2
> (code start with:
> if ( input_channels > 2)
> {
> av_log(NULL, AV_LOG_ERROR, "Resampling with input channels
> greater than 2 unsupported.\n");
> return NULL;
> }
> )
>
> What would be the best way to downsample/downmix any audio , and is
> that even possible with the current libavcodec ?
>
> Thanks in advance for the thousands of answers I'm sure will get soon :)
>
> Cheers
> 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