[Ffmpeg-devel] bits_per_sample from input

Michel Bardiaux mbardiaux
Mon Feb 5 10:46:29 CET 2007


Dmitry Belous wrote:
> 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

No. The whole idea is to isolate each codec from all the others, not 
expose each to each! See in ffmpeg.c how its done: you open the input 
file then the input muxed streams then the input codecs. Then you copy 
what you need from the input, to the output structures.

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list