[Libav-user] Retrieving informations for encoding

... ... bersac_1 at hotmail.fr
Wed Jun 19 17:43:48 CEST 2013


Hi,
I want to decode a video. The decoded datas are embedded in a  AVFrame, and the encode data will be encode in a AVPacket. In order to decode my video, I need to tweak the AVCodecContex. The problem is that I don't know how to get the informations I need to fill the AVCodecContext. Here is the sample of code :
	AVFrame* dataDecode;//frame fill with the decoded data	codecContext->bit_rate = ???;	codecContext->width = dataDecode->width;	codecContext->height = dataDecode->height;	codecContext->pix_fmt = (enum AVPixelFormat)dataDecode->format;	/* frames per second */	codecContext->time_base= dataDecode->???;	codecContext->gop_size = ???; /* emit one intra frame every ??? frames */	codecContext->max_b_frames= ???;
How could I fill this attributes ? Do we need to fill this attributes if we want to encode to a image ? By the way, which AVPixelFormat match with the AV_CODEC_ID_JPEGLS  codec ?
Thanks,Guillaume Bersac237bis rue de Pessac33000 Bordeaux06.65.30.89.43
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130619/d6540efe/attachment.html>


More information about the Libav-user mailing list