Consts
AV_CODEC_FLAG2_CHUNKS = 32768
AV_CODEC_FLAG2_EXPORT_MVS = 268435456
AV_CODEC_FLAG2_IGNORE_CROP = 65536
AV_CODEC_FLAG2_RO_FLUSH_NOOP = 1073741824
AV_CODEC_FLAG2_SHOW_ALL = 4194304
AV_CODEC_FLAG2_SKIP_MANUAL = 536870912
AV_CODEC_FLAG_AC_PRED = 16777216
AV_CODEC_FLAG_BITEXACT = 8388608
AV_CODEC_FLAG_CLOSED_GOP = 2147483648'u
AV_CODEC_FLAG_GLOBAL_HEADER = 4194304
AV_CODEC_FLAG_GRAY = 8192
AV_CODEC_FLAG_INTERLACED_DCT = 262144
AV_CODEC_FLAG_INTERLACED_ME = 536870912
AV_CODEC_FLAG_LOOP_FILTER = 2048
AV_CODEC_FLAG_LOW_DELAY = 524288
AV_CODEC_FLAG_PASS1 = 512
AV_CODEC_FLAG_PASS2 = 1024
AV_CODEC_FLAG_PSNR = 32768
AV_CODEC_FLAG_QPEL = 16
AV_CODEC_FLAG_TRUNCATED = 65536
AV_EF_AGGRESSIVE = 262144
AV_EF_BITSTREAM = 2
AV_EF_BUFFER = 4
AV_EF_CAREFUL = 65536
AV_EF_COMPLIANT = 131072
AV_EF_CRCCHECK = 1
AV_EF_EXPLODE = 8
AV_EF_IGNORE_ERR = 32768
AV_HWACCEL_CODEC_CAP_EXPERIMENTAL = 0x00000200
AV_INPUT_BUFFER_MIN_SIZE = 16384
AV_PARSER_PTS_NB = 4
AV_SUBTITLE_FLAG_FORCED = 0x00000001
FF_BUG_AMV = 32
FF_BUG_DC_CLIP = 4096
FF_BUG_DIRECT_BLOCKSIZE = 512
FF_BUG_EDGE = 1024
FF_BUG_HPEL_CHROMA = 2048
FF_BUG_IEDGE = 32768
FF_BUG_MS = 8192
FF_BUG_NO_PADDING = 16
FF_BUG_QPEL_CHROMA = 64
FF_BUG_QPEL_CHROMA2 = 256
FF_BUG_STD_QPEL = 128
FF_BUG_TRUNCATED = 16384
FF_BUG_UMP4 = 8
FF_CMP_BIT = 5
FF_CMP_CHROMA = 256
FF_CMP_DCT = 3
FF_CMP_DCT264 = 14
FF_CMP_DCTMAX = 13
FF_CMP_MEDIAN_SAD = 15
FF_CMP_NSSE = 10
FF_CMP_PSNR = 4
FF_CMP_RD = 6
FF_CMP_SAD = 0
FF_CMP_SATD = 2
FF_CMP_SSE = 1
FF_CMP_VSAD = 8
FF_CMP_VSSE = 9
FF_CMP_W53 = 11
FF_CMP_W97 = 12
FF_CMP_ZERO = 7
FF_CODEC_PROPERTY_CLOSED_CAPTIONS = 0x00000002
FF_CODEC_PROPERTY_LOSSLESS = 0x00000001
FF_CODER_TYPE_AC = 1
FF_DCT_ALTIVEC = 5
FF_DCT_AUTO = 0
FF_DCT_FAAN = 6
FF_DCT_FASTINT = 1
FF_DCT_INT = 2
FF_DCT_MMX = 3
FF_DEBUG_BUFFERS = 0x00008000
FF_DEBUG_BUGS = 0x00001000
FF_DEBUG_DCT_COEFF = 0x00000040
FF_DEBUG_ER = 0x00000400
FF_DEBUG_GREEN_MD = 0x00800000
FF_DEBUG_MB_TYPE = 8
FF_DEBUG_MMCO = 0x00000800
FF_DEBUG_NOMC = 0x01000000
FF_DEBUG_QP = 16
FF_DEBUG_RC = 2
FF_DEBUG_SKIP = 0x00000080
FF_DEBUG_STARTCODE = 0x00000100
FF_DEBUG_THREADS = 0x00010000
FF_DEBUG_VIS_MV_B_BACK = 0x00000004
FF_DEBUG_VIS_MV_B_FOR = 0x00000002
FF_DEBUG_VIS_MV_P_FOR = 0x00000001
FF_EC_DEBLOCK = 2
FF_EC_FAVOR_INTER = 256
FF_EC_GUESS_MVS = 1
FF_IDCT_ALTIVEC = 8
FF_IDCT_ARM = 7
FF_IDCT_AUTO = 0
FF_IDCT_FAAN = 20
FF_IDCT_INT = 1
FF_IDCT_NONE = 24
FF_IDCT_SIMPLE = 2
FF_IDCT_SIMPLEARM = 10
FF_IDCT_SIMPLEARMV6 = 17
FF_IDCT_SIMPLEAUTO = 128
FF_IDCT_SIMPLENEON = 22
FF_IDCT_XVID = 14
FF_LEVEL_UNKNOWN = -99
FF_PROFILE_AAC_ELD = 38
FF_PROFILE_AAC_HE_V2 = 28
FF_PROFILE_AAC_LD = 22
FF_PROFILE_DNXHD = 0
FF_PROFILE_DTS = 20
FF_PROFILE_DTS_96_24 = 40
FF_PROFILE_DTS_ES = 30
FF_PROFILE_DTS_HD_MA = 60
FF_PROFILE_H264_HIGH = 100
FF_PROFILE_H264_HIGH_10 = 110
FF_PROFILE_H264_HIGH_422 = 122
FF_PROFILE_H264_HIGH_444 = 144
FF_PROFILE_H264_INTRA = 2048
FF_PROFILE_H264_MAIN = 77
FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT = 0x000000C0
FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT = 0x000000C1
FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS = 0x000000C3
FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT = 0x000000C2
FF_PROFILE_MJPEG_JPEG_LS = 0x000000F7
FF_PROFILE_MPEG2_AAC_HE = 131
FF_PROFILE_MPEG2_AAC_LOW = 128
FF_PROFILE_RESERVED = -100
FF_PROFILE_UNKNOWN = -99
FF_PROFILE_VP9_0 = 0
FF_PROFILE_VP9_1 = 1
FF_PROFILE_VP9_2 = 2
FF_PROFILE_VP9_3 = 3
FF_THREAD_FRAME = 1
FF_THREAD_SLICE = 2
PARSER_FLAG_COMPLETE_FRAMES = 0x00000001
PARSER_FLAG_FETCHED_OFFSET = 0x00000004
PARSER_FLAG_ONCE = 0x00000002
PARSER_FLAG_USE_CODEC_TS = 0x00001000
SLICE_FLAG_ALLOW_FIELD = 0x00000002
SLICE_FLAG_ALLOW_PLANE = 0x00000004
SLICE_FLAG_CODED_ORDER = 0x00000001
Procs
proc av_fast_padded_malloc(ptr: pointer; size: ptr uint; min_size: uint) {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_fast_padded_mallocz(ptr: pointer; size: ptr uint; min_size: uint) {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_audio_frame_duration(avvctx: ptr AVCodecContext; frame_bytes: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_audio_frame_duration2(par: ptr AVCodecParameters; frame_bytes: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_bits_per_sample(codec_id: AVCodecID): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_exact_bits_per_sample(codec_id: AVCodecID): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_pcm_codec(fmt: AVSampleFormat; be: cint): AVCodecID {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_profile_name(codec: ptr AVCodec; profile: cint): cstring {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_parser_change(s: ptr AVCodecParserContext; avctx: ptr AVCodecContext; poutbuf: ptr ptr uint8; poutbuf_size: ptr cint; buf: ptr uint8; buf_size: cint; keyframe: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_parser_close(s: ptr AVCodecParserContext) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_parser_init(codec_id: cint): ptr AVCodecParserContext {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_parser_iterate(opaque: ptr pointer): ptr AVCodecParser {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_parser_parse2(s: ptr AVCodecParserContext; avctx: ptr AVCodecContext; poutbuf: ptr ptr uint8; poutbuf_size: ptr cint; buf: ptr uint8; buf_size: cint; pts: int64; dts: int64; pos: int64): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_align_dimensions(s: ptr AVCodecContext; width: ptr cint; height: ptr cint) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_align_dimensions2(s: ptr AVCodecContext; width: ptr cint; height: ptr cint; linesize_align: ptr cint) {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_alloc_context3(codec: ptr AVCodec): ptr AVCodecContext {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_chroma_pos_to_enum(xpos: cint; ypos: cint): AVChromaLocation {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_close(avctx: ptr AVCodecContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_configuration(): cstring {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_decode_subtitle2(avctx: ptr AVCodecContext; sub: ptr AVSubtitle; got_sub_ptr: ptr cint; avpkt: ptr AVPacket): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_default_execute(c: ptr AVCodecContext; func: proc ( c2: ptr AVCodecContext; arg2: pointer): cint; arg: pointer; ret: ptr cint; count: cint; size: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_default_execute2(c: ptr AVCodecContext; func: proc ( c2: ptr AVCodecContext; arg2: pointer; a3: cint; a4: cint): cint; arg: pointer; ret: ptr cint; count: ptr cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_default_get_buffer2(s: ptr AVCodecContext; frame: ptr AVFrame; flags: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_default_get_format(s: ptr AVCodecContext; fmt: UncheckedArray[AVPixelFormat]): AVPixelFormat {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_encode_audio2(avctx: ptr AVCodecContext; avpkt: ptr AVPacket; frame: ptr AVFrame; got_packet_ptr: ptr cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_encode_subtitle(avctx: ptr AVCodecContext; buf: ptr uint8; buf_size: cint; sub: ptr AVSubtitle): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_encode_video2(avctx: ptr AVCodecContext; avpkt: ptr AVPacket; frame: ptr AVFrame; got_packet_ptr: ptr cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_enum_to_chroma_pos(xpos: ptr cint; ypos: ptr cint; pos: AVChromaLocation): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_fill_audio_frame(frame: ptr AVFrame; nb_channels: cint; sample_fmt: AVSampleFormat; buf: ptr uint8; buf_size: cint; align: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_find_best_pix_fmt_of_list(pix_fmt_list: UncheckedArray[ AVPixelFormat]; src_pix_fmt: AVPixelFormat; has_alpha: cint; loss_ptr: ptr cint): AVPixelFormat {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_flush_buffers(avctx: ptr AVCodecContext) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_free_context(avctx: ptr ptr AVCodecContext) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_get_class(): ptr AVClass {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_get_hw_frames_parameters(avctx: ptr AVCodecContext; device_ref: ptr AVBufferRef; hw_pix_fmt: AVPixelFormat; out_frames_ref: ptr ptr AVBufferRef): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_is_open(s: ptr AVCodecContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_license(): cchar {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_open2(avctx: ptr AVCodecContext; codec: ptr AVCodec; options: ptr ptr AVDictionary): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_parameters_from_context(par: ptr AVCodecParameters; codec: ptr AVCodecContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_parameters_to_context(codec: ptr AVCodecContext; par: ptr AVCodecParameters): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_pix_fmt_to_codec_tag(pix_fmt: AVPixelFormat): uint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_profile_name(codec_id: AVCodecID; profile: cint): cstring {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_receive_frame(avctx: ptr AVCodecContext; frame: ptr AVFrame): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_receive_packet(avctx: ptr AVCodecContext; avpkt: ptr AVPacket): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_send_frame(avctx: ptr AVCodecContext; frame: ptr AVFrame): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_send_packet(avctx: ptr AVCodecContext; avpkt: ptr AVPacket): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_string(buf: cstring; buf_size: cint; enc: ptr AVCodecContext; encode: cint) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avcodec_version(): cuint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avsubtitle_free(sub: ptr AVSubtitle) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}