[Libav-user] A very mysterious question about FFMpeg encoding.

Denis info at denisgottardello.it
Thu Sep 22 22:36:47 CEST 2011

> Where does your encoded data come from? Persumably you have data that you
> write to the opened avio contexts. Just copy that data into a buffer?

The data comes from a webcam. I have not understood how.
See the code:

AVOutputFormat *pOutputFormat= av_guess_format("mp4", NULL, NULL); 
AVFormatContext *pFormatCtx;
avformat_alloc_output_context2(&pFormatCtx, pOutputFormat, NULL, NULL);
AVStream *pVideoStream= av_new_stream(pFormatCtx, 0);
AVCodecContext *pCodecCtx= pVideoStream->codec;
AVCodec *pCodec= avcodec_find_encoder(pCodecCtx->codec_id);
avio_open(&pFormatCtx->pb, "file.mpg", AVIO_FLAG_WRITE)

These are the five steps to encode a frame. Which is the avio context from that 
obtain the readable buffer?

Skype: mrdebug
Videosurveillance and home automation! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110922/0e29c03d/attachment.html>

More information about the Libav-user mailing list