[Ffmpeg-devel] I want to know what data set to AVCodecContext for H.264

Chang Min Jeon jcm1981
Thu Jun 23 16:57:12 CEST 2005


My program can encode image from TV CARD to mpeg1video. :)
 I have refereced apiexample.c
 But I'm trying to encode image to H.264.
 example for mpeg1
 AVCodecContext *c = NULL;
 ...
  c->pix_fmt = PIX_FMT_YUV420P;
c->bit_rate = 400000;
 
c->width = 352;
c->height = 288;

c->time_base = (AVRational) {1,25};
c->gop_size = 10; /* emit one intra frame every ten frames */
c->max_b_frames=1;

 ...

for( i = 0; i < 2; i++ )
out_size = avcodec_encode_video( c, outbuf, outbuf_size, picture );

...

This source describes mpeg1video of encoding's method.

I don't know that what data set to AVCodecContext.




More information about the ffmpeg-devel mailing list