Hi, All I am writing "custom" encoder/decoder/muxer/demuxer Can I get a bits_per_sample from input stream in encoder. For example, $ ffmpeg -i file.wav file.custom I want to use bits_per_sample from file.wav in "custom" encoder. static int masc_init(AVCodecContext *avctx) { avctxt->bits_per_sample = ???; //??? - bps from input } -- Dmitry