Tutorial by Examples

Media stream containers usually have a several streams, such as a video stream and an audio stream. For example, you can get the audio stream using the following: // A Format Context - see Reading Data for more info AVFormatContext *formatContext; // Inspect packets of stream to determine prope...
Once you have a stream Format Context and its respective Codec, you can open it for decoding using the following code: // The format context and codec, given - see Find a stream for how to get these AVFormatContext *formatContext; AVCodec* codec; int streamIndex; // Get the codec context AVC...
Given a codec context and encoded packets from a media stream, you can start decoding media into raw frames. To decode a single frame, you can use the following code: // A codec context, and some encoded data packet from a stream/file, given. AVCodecContext *codecContext; // See Open a codec cont...

Page 1 of 1