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

bond b-o-n-d
Fri Jun 24 12:31:06 CEST 2005


> Message: 4
> Date: Fri, 24 Jun 2005 02:09:07 +0900
> From: Chang Min Jeon <jcm1981 at gmail.com>
> Subject: Re: [Ffmpeg-devel] I want to know what data set to
> AVCodecContext for H.264
> To: FFMpeg development discussions and patches
> <ffmpeg-devel at mplayerhq.hu>
> Message-ID: <22a41326050623100955edd0dd at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> No, I have not problems during program's running.
>  I did set to AVCodecContext following line.
>   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 );
> printf( "encoding frame %3d (size=%5d)\n", i, out_size );
> fwrite(outbuf, 1, out_size, f);
> ...
>  Console messages.
>  encoding frame 2 (size= 2053)
> Video encoding
> 352, 288
> [h264 @ 0x82dd274]using cpu capabilities MMX MMXEXT SSE SSE2
> encoding frame 2 (size= 2035)
> Video encoding
> 352, 288
> [h264 @ 0x82dd274]using cpu capabilities MMX MMXEXT SSE SSE2
> encoding frame 2 (size= 2121)
> Video encoding
> 352, 288
> [h264 @ 0x82dd274]using cpu capabilities MMX MMXEXT SSE SSE2
> encoding frame 2 (size= 2107)
> write frame 2 (size= 0)
> [h264 @ 0x82dd274]slice I:1 Avg QP:23.00 Avg size: 1948 PSNR Mean Y:49.67
U:
> 52.96 V:48.31 Avg:49.79 Global:49.79
> [h264 @ 0x82dd274]slice I Avg I4x4:2.3% I8x8:0.0% I16x16:97.7%
> [h264 @ 0x82dd274]PSNR Mean Y:49.67 U:52.96 V:48.31 Avg:49.79
Global:49.79kb/s:
> 389.6
>  But mplayer can't play movie that I encode to h.264 to file (e.g :
test.mp4
> )
>  mplayer has compiled with x264 So it can play h264 movie.

as i wrote already very often: even if there are some small patches here and
there for avc/h.264 support in the mp4 muxer, ffmpeg does NOT produce
correct mp4 files for avc (and also not for mpeg-4 part2)
eg the most important bug for avc is the missing of the avcC atom, which is
very very important

so until someone seriously starts to read the iso 14496-14 (for mpeg-4 part2
video) and 14496-15 (for avc video) specs and starts implementing the mp4
muxing following the specs, i can only repeat to not use ffmpeg for creating
.mp4 files
just because mplayer plays them, it doesnt mean the files are good

sorry for the rant, but i simply see people doing that far too often






More information about the ffmpeg-devel mailing list