[Ffmpeg-devel] I'm trying to encode h.264 using ffmpeg but..

Chang Min Jeon jcm1981
Wed Jun 22 16:35:08 CEST 2005


Hello. I'm korean student.
So I can't write English very well.

I can read video from tv card.

I confirm that save ppm file.

I'm trying to encode h.264 using ffmpeg

I have referenced that apiexample.c

So I change some apiexample.c

But I don't know h.264 header information.


......

/* find the h.264 video encoder */
codec = avcodec_find_encoder( CODEC_ID_H264);
if ( !codec ) 
{
fprintf( stderr, "codec not found\n" );
exit( 1 );
}

.....

/* get the delayed frames */ 
for( ; out_size; i++ ) 
{
fflush( stdout); 
out_size = avcodec_encode_video( c, outbuf, outbuf_size, NULL );
printf( "write frame %3d (size=%5d)\n", i, out_size );
fwrite( outbuf, 1, out_size, f );
}

/* add sequence end code to have a real mpeg file */
outbuf[0] = 0x00; 
outbuf[1] = 0x00;
outbuf[2] = 0x01;
outbuf[3] = 0xb7;
fwrite( outbuf, 1, 4, f );

......

what's the h.264 header info ? 

Please help me that h.264 encoding example source.




More information about the ffmpeg-devel mailing list