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
