Dundar
Dundar

Reputation: 1249

Encoding video frames with libavcodec

I am a newbie in video coding and I have a simple task to do for my own project.

Basically, I have a certain number of raw RGB frames in the memory which are easily accessible by pointers. I want to encode them using libavcoded. Initializing is fine but I couldn't really understand how I should feed these frame information to the codec. Should I use avpicture_fill function? Could you please shed some light on me, preferably with some examples. I am using MSVC++ environment.

Thank you very much.

Upvotes: 2

Views: 5703

Answers (1)

Oktalist
Oktalist

Reputation: 14724

There are a couple of examples under the doc directory:

  • examples/avcodec.c - encoding or decoding audio or video with libavcodec
  • examples/output.c - taking your encoded audio/video and muxing it (putting it in a container format like AVI) with libavformat

Upvotes: 4

Related Questions