Consts
AV_DISPOSITION_ATTACHED_PIC = 1024
AV_DISPOSITION_CAPTIONS = 65536
AV_DISPOSITION_DEPENDENT = 524288
AV_DISPOSITION_DESCRIPTIONS = 131072
AV_DISPOSITION_METADATA = 262144
AV_DISPOSITION_STILL_IMAGE = 1048576
AVFMT_ALLOW_FLUSH = 0x00010000
AVFMT_EVENT_FLAG_METADATA_UPDATED = 0x00000001
AVFMT_EXPERIMENTAL = 0x00000004
AVFMT_FLAG_AUTO_BSF = 0x00200000
AVFMT_FLAG_BITEXACT = 0x00000400
AVFMT_FLAG_CUSTOM_IO = 0x00000080
AVFMT_FLAG_DISCARD_CORRUPT = 0x00000100
AVFMT_FLAG_FAST_SEEK = 0x00080000
AVFMT_FLAG_FLUSH_PACKETS = 0x00000200
AVFMT_FLAG_GENPTS = 0x00000001
AVFMT_FLAG_IGNDTS = 0x00000008
AVFMT_FLAG_IGNIDX = 0x00000002
AVFMT_FLAG_NOBUFFER = 0x00000040
AVFMT_FLAG_NOFILLIN = 0x00000010
AVFMT_FLAG_NONBLOCK = 0x00000004
AVFMT_FLAG_NOPARSE = 0x00000020
AVFMT_FLAG_PRIV_OPT = 0x00020000
AVFMT_FLAG_SHORTEST = 0x00100000
AVFMT_FLAG_SORT_DTS = 0x00010000
AVFMT_GENERIC_INDEX = 0x00000100
AVFMT_GLOBALHEADER = 0x00000040
AVFMT_NEEDNUMBER = 0x00000002
AVFMT_NO_BYTE_SEEK = 0x00008000
AVFMT_NOBINSEARCH = 0x00002000
AVFMT_NODIMENSIONS = 0x00000800
AVFMT_NOFILE = 0x00000001
AVFMT_NOGENSEARCH = 0x00004000
AVFMT_NOSTREAMS = 0x00001000
AVFMT_NOTIMESTAMPS = 0x00000080
AVFMT_SEEK_TO_PTS = 0x04000000
AVFMT_SHOW_IDS = 0x00000008
AVFMT_TS_DISCONT = 0x00000200
AVFMT_TS_NEGATIVE = 0x00040000
AVFMT_TS_NONSTRICT = 0x00020000
AVFMT_VARIABLE_FPS = 0x00000400
AVFMTCTX_NOHEADER = 0x00000001
AVFMTCTX_UNSEEKABLE = 0x00000002
AVINDEX_DISCARD_FRAME = 0x00000002
AVINDEX_KEYFRAME = 0x00000001
AVPROBE_PADDING_SIZE = 32
AVPROBE_SCORE_MAX = 100
AVPROBE_SCORE_MIME = 75
AVPROBE_SCORE_RETRY = 25.0
AVPROBE_SCORE_STREAM_RETRY = 24.0
AVSEEK_FLAG_ANY = 4
AVSEEK_FLAG_BYTE = 2
AVSTREAM_EVENT_FLAG_METADATA_UPDATED = 0x00000001
FF_FDEBUG_TS = 0x00000001
MAX_REORDER_DELAY = 16
MAX_STD_TIMEBASES = 399
Procs
proc av_add_index_entry(st: ptr AVStream; pos, time_stamp: int64; size, distance, flags: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_append_packet(s: ptr AVIOContext; pkt: ptr AVPacket; size: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_codec_get_id(tags: ptr ptr AVCodecTag; tag: cuint): AVCodecID {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_codec_get_tag(tags: ptr ptr AVCodecTag; id: AVCodecID): cuint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_codec_get_tag2(tags: ptr ptr AVCodecTag; id: AVCodecID; tag: ptr cuint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_demuxer_iterate(opaque: ptr pointer): ptr AVInputFormat {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_disposition_from_string(disp: cstring): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_disposition_to_string(siaposition: cint): cstring {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_dump_format(ic: ptr AVFormatContext; index: cint; url: cstring; is_output: cint) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_filename_number_test(filename: cstring): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_find_best_stream(ic: ptr AVFormatContext; type: AVMediaType; wanted_stream_nb, related_stream: cint; decoder_ret: ptr ptr AVCodec; flags: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_find_default_stream_index(s: ptr AVFormatContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_find_input_format(short_name: cstring): ptr AVInputFormat {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_find_program_from_stream(ic: ptr AVFormatContext; last: ptr AVProgram; s: cint): ptr AVProgram {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_fmt_ctx_get_duration_estimation_method(ctx: ptr AVFormatContext): AVDurationEstimationMethod {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_format_inject_global_side_data(s: ptr AVFormatContext) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_frame_filename(buf: cstring; buf_size: cint; path: cstring; number: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_frame_filename2(buf: cstring; buf_size: cint; path: cstring; number: cint; flags: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_output_timestamp(s: ptr AVFormatContext; stream: cint; dts, wall: ptr int64): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_get_packet(s: ptr AVIOContext; pkt: ptr AVPacket; size: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_guess_codec(fmt: ptr AVOutputFormat; short_name, filenamme, mime_type: cstring; type: AVMediaType): AVCodecID {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_guess_format(short_name: cstring; filename: cstring; mime_type: cstring): ptr AVOutputFormat {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_guess_frame_rate(ctx: ptr AVFormatContext; stream: ptr AVStream; frame: ptr AVFrame): AVRational {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_guess_sample_aspect_ratio(format: ptr AVFormatContext; stream: ptr AVStream; frame: ptr AVFrame): AVRational {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_hex_dump(f: ptr File; buf: ptr uint8; size: cint) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_hex_dump_log(avcl: pointer; level: cint; buf: ptr uint8; size: cint) {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_index_search_timestamp(st: ptr AVStream; timestamp: int64; flags: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_interleaved_write_frame(s: ptr AVFormatContext; pkt: ptr AVPacket): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_interleaved_write_uncoded_frame(s: ptr AVFormatContext; stream_index: cint; frame: ptr AVFrame): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_match_ext(filename, extensions: cstring): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_muxer_iterate(opaque: ptr pointer): ptr AVOutputFormat {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_new_program(s: ptr AVFormatContext; id: cint): AVProgram {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_pkt_dump2(f: ptr File; pkt: ptr AVPacket; dump_payload: cint; st: ptr AVStream) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_pkt_dump_log2(avcl: pointer; level: cint; pkt: ptr AVPacket; dump_payload: cint; st: ptr AVStream) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_probe_input_buffer(pb: ptr AVIOContext; fmt: ptr ptr AVInputFormat; url: cstring; logctx: pointer; offset, max_probe_size: cuint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_probe_input_buffer2(pb: ptr AVIOContext; fmt: ptr ptr AVInputFormat; url: cstring; logctx: pointer; offset, max_probe_size: cuint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_probe_input_format(pd: ptr AVProbeData; is_opened: cint): ptr AVInputFormat {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_probe_input_format2(pd: ptr AVProbeData; is_opened, score_max: cint): ptr AVInputFormat {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_probe_input_format3(pd: ptr AVProbeData; is_opened: cint; score_ret: cint): ptr AVInputFormat {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_program_add_stream_index(ac: ptr AVFormatContext; progid: cint; idx: cuint) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_read_frame(s: ptr AVFormatContext; pkt: ptr AVPacket): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_read_pause(s: ptr AVFormatContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_read_play(s: ptr AVFormatContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_sdp_create(ac: ptr openArray[AVFormatContext]; n_files: cint; buf: cstring; size: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_seek_frame(s: ptr AVFormatContext; stream_index: cint; timestamp: int64; flags: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_add_side_data(st: ptr AVStream; type: AVPacketSideDataType; data: ptr uint8; size: csize_t): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_get_class(): ptr AVClass {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_get_codec_timebase(st: ptr AVStream): AVRational {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_get_end_pts(st: ptr AVStream): int64 {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_get_parser(s: ptr AVStream): ptr AVCodecParserContext {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_get_side_data(stream: ptr AVStream; type: AVPacketSideDataType; size: ptr csize_t): uint8 {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_stream_new_side_data(stream: ptr AVStream; type: AVPacketSideDataType; size: csize_t): uint8 {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_url_split(proto: cstring; proto_size: cint; authorization: cstring; authorization_size: cint; hostname: cstring; hostname_size: cint; port_ptr: ptr cint; path: cstring; path_size: cint; url: cstring) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_write_frame(s: ptr AVFormatContext; pkt: ptr AVPacket): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_write_trailer(s: ptr AVFormatContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_write_uncoded_frame(s: ptr AVFormatContext; stream_index: cint; frame: ptr AVFrame): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc av_write_uncoded_frame_query(s: ptr AVFormatContext; stream_index: cint): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_alloc_context(): ptr AVFormatContext {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_alloc_output_context2(ctx: ptr ptr AVFormatContext; oformat: ptr AVOutputFormat; format_name: cstring; filename: cstring): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_close_input(s: ptr ptr AVFormatContext) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_configuration(): cstring {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_find_stream_info(ic: ptr AVFormatContext; options: ptr ptr AVDictionary): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_flush(s: ptr AVFormatContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_free_context(s: ptr AVFormatContext) {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_get_class(): ptr AVClass {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_index_get_entries_count(st: ptr AVStream): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_index_get_entry(st: ptr AVStream; idx: cint): ptr AVIndexEntry {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_index_get_entry_from_timestamp(st: ptr AVStream; wanted_timestamp: int64; flags: cint): ptr AVIndexEntry {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_init_output(s: ptr AVFormatContext; options: ptr ptr AVDictionary): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_license(): cstring {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_match_stream_specifier(s: ptr AVFormatContext; st: ptr AVStream; spec: cstring): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_network_deinit(): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_network_init(): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_new_stream(s: ptr AVFormatContext; c: ptr AVCodec): ptr AVStream {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_open_input(ps: ptr ptr AVFormatContext; url: cstring; fmt: ptr AVInputFormat; options: ptr ptr AVDictionary): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_query_codec(ofmt: ptr AVOutputFormat; codec_id: AVCodecID; std_compliance: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_queue_attached_pictures(s: ptr AVFormatContext): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_seek_file(s: ptr AVFormatContext; stream_index: cint; min_ts, ts, max_ts: int64; flags: cint): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_transfer_internal_stream_timing_info(ofmt: ptr AVOutputFormat; ost, ist: ptr AVStream; copy_tb: AVTimebaseSource): cint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_version(): cuint {.importc, cdecl, ...raises: [], tags: [], forbids: [].}
proc avformat_write_header(s: ptr AVFormatContext; options: ptr ptr AVDictionary): cint {. importc, cdecl, ...raises: [], tags: [], forbids: [].}