- AVCodec* avcodec_find_encoder(AVCodecID)
- AVCodecContext* avcodec_alloc_context3(AVCodec*)
- av_opt_set(...)
- avcodec_open2(AVCodecContext*, AVCodecID)
- AVPacket* av_packet_alloc()
- AVFrame* av_frame_alloc()
- av_frame_get_buffer(AVFrame*)
- struct SwsContext* sws_getContext()
- FILL FRAME DATA
- sws_scale(struct SwsContext*, ...) IF NEEDED
- avcodec_send_frame(AVCodecContext*, AVFrame*)
- avcodec_receive_packet(AVCodecContext*, AVPacket*) IF READY
- SAVE PACKET DATA
- av_packet_unref(AVPacket*)
- av_packet_free(AVPacket**)
- av_frame_free(AVFrame**)
- sws_freeContext(struct SwsContext*)
- avcodec_free_context(AVCodecContext**)