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

Matthew Einhorn moiein2000 at gmail.com
Thu Sep 22 22:55:30 CEST 2011

On Thu, Sep 22, 2011 at 4:36 PM, Denis <info at denisgottardello.it> wrote:

> **
> >
> > 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.

You need to show the source of your data. How do you get the frames from a
webcam, does it come in packets? RGB data? that's the code you should show.
The problem that I'm seeing is that you're using an avio context when you
don't actually intend to write data with it to a file. Just take the webcam
frame data call avcodec_encode_video and that function writes it to a
buffer. I'm not sure why you're making the all these avio calls. I suggest
you also look at the headers for avcodec_encode_video.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110922/58641fc7/attachment.html>

More information about the Libav-user mailing list