[Ffmpeg-devel] Fwd: How to encode video?

Cool_Zer0 c00jz3r0
Wed Feb 14 11:11:07 CET 2007

I've sent this mail to the users lists but I think that the the devel list
is more appropriated...

---------- Forwarded message ----------
From: Cool_Zer0 <c00jz3r0 at gmail.com>
Date: Feb 14, 2007 9:56 AM
Subject: How to encode video?
To: FFmpeg user questions and RTFMs <ffmpeg-user at mplayerhq.hu>

Hi there,

I'm trying to encode video to H.263 format...

I'm making this:

void video_encode(unsigned char* frame_rgb, int frame_rgb_size) {
    int r = avcodec_encode_video(enc_context, frame_rgb, frame_rgb_size,


Something is missing here...
How can the encoder know that the frame_rgb contains a raw RGB frame?
Next... encoded_frame->data is a array of 4 positions... When
avcodec_encode_video() returns the first 3 positions of the array are set...
How can I save the frames to disk?

I've been looking for some documentation but I can't find anything related
to encoding video...


More information about the ffmpeg-devel mailing list