unstale

pypi / av

av

What changed in av 19, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

14 breaking2 security9 new APIs and options1 performance1 behavior and defaults18 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

av 1945 changes

Breaking changes 14

  • Rational attributes now return AV.Rational values rather than fractions.Fraction and are never None; unset values are falsy AVRational(0, 1). Setters still accept fractions.Fraction.

    19.0.0release notes

  • The metadata_encoding argument and matching attribute are removed; metadata is always read and written as UTF-8 with surrogateescape.

    19.0.0release notes

  • The metadata_errors argument and matching attribute are removed; metadata is always read and written as UTF-8 with surrogateescape.

    19.0.0release notes

  • The stream_options argument and matching attribute are removed. Pass options for every stream, set codec_context.options for one, or use Container.add_stream(..., options={}) when writing.

    19.0.0release notes

  • Removed because FFmpeg no longer defines this capability.

    19.0.0release notes

  • Removed because FFmpeg no longer defines this capability.

    19.0.0release notes

  • Removed because FFmpeg no longer defines this capability.

    19.0.0release notes

  • The undocumented attribute is removed; use CodecContext.is_hwaccel to check whether hardware acceleration is in use.

    19.0.0release notes

  • Returns None when the size cannot be determined instead of passing through a negative AVERROR.

    19.0.0release notes

  • Closing an output container frees its context; using it afterwards raises Container is not open.

    19.0.0release notes

  • Raises rather than freeing a context another thread is still muxing or closing.

    19.0.0release notes

  • Python 3.11 is no longer supported; binary wheels are built for Python 3.12 and later.

    19.0.0release notes

  • Replaces the Frame.side_data type stub's TypedDict with a SideDataContainer type.

    19.0.0release notes

  • Reading a Stream after its container is closed now raises instead of reading freed memory.

    19.0.0release notes

Security 2

New APIs and options 9

  • Adds block_align.

    19.0.0release notes

  • New enum names the chroma location values.

    19.0.0release notes

  • Exposes additional AVCodecContext fields, including pkt_timebase, frame_num, active_thread_type, bits_per_raw_sample, compression_level, rc_buffer_size, min_bit_rate, max_bit_rate setter, audio padding fields, and two-pass stats.

    19.0.0release notes

  • Exposes context global side data as a dict of bytes keyed by packet side data name.

    19.0.0release notes

  • Exposes context global side data as a dict of bytes keyed by Type; stream-wide HDR metadata arrives here after a frame is decoded.

    19.0.0release notes

  • Use this attribute to check whether hardware acceleration is in use.

    19.0.0release notes

  • Reports whether a format wants fixed size audio frames.

    19.0.0release notes

  • Adds FFmpeg enum members: Properties.FIELDS and ENHANCEMENT; PixFmtLoss.EXCESS_RESOLUTION and EXCESS_DEPTH; Flags2.icc_profiles; format.Flags.experimental; Interpolation.STRICT and UNSTABLE; ColorTrc.V_LOG; ColorPrimaries.V_GAMUT; and new sidedata and packet side data names.

    19.0.0release notes

  • Exposes the frame's chroma sample position relative to luma samples.

    19.0.0release notes

Performance 1

  • Shares one SwsContext per thread rather than allocating one per frame, reducing RSS growth when many frames are alive.

    19.0.0release notes

Behavior and default changes 1

  • Lists every codec FFmpeg knows of, including data and attachment codecs, matching ffmpeg -codecs.

    19.0.0release notes

Fixes and other changes 18

  • Passes thread_count to the audio encode resampler.

    19.0.2release notes

  • Passes output options through so the protocol uses them.

    19.0.2release notes

  • Side data no longer holds its frame in a reference cycle, addressing the resulting object lifetime issue.

    19.0.1release notes

  • Indexes are now range checked.

    19.0.0release notes

  • The getter now returns its value instead of always returning None.

    19.0.0release notes

  • Frames returned when flushing a codec context directly now carry the stream's time_base instead of None.

    19.0.0release notes

  • A rejected add_stream() or add_mux_stream() no longer breaks the container.

    19.0.0release notes

  • Keeps its Graph alive, preventing a segfault when the link outlives the graph.

    19.0.0release notes

  • Follows filters auto-inserted during graph configuration instead of using a stale cached pad.

    19.0.0release notes

  • Follows filters auto-inserted during graph configuration instead of using a stale cached pad.

    19.0.0release notes

  • Unknown side data types added by newer FFmpeg versions become UNKNOWN_<value> members rather than raising ValueError.

    19.0.0release notes

  • Now satisfies the Mapping protocol: iteration yields Type keys, mapping views work, and values can also be accessed by slice.

    19.0.0release notes

  • Passes flags to the created context, enabling requests such as CUDA's AV_CUDA_USE_PRIMARY_CONTEXT.

    19.0.0release notes

  • Holding index_entries keeps its container alive; entries are copies that remain readable after close and index reallocation.

    19.0.0release notes

  • Negative indexes are now handled like any sequence; mvs[-1] returns the last vector.

    19.0.0release notes

  • No longer raises for side data types FFmpeg has added since PyAV last listed them.

    19.0.0release notes

  • Applies to opening output containers, and network writes no longer block every other Python thread.

    19.0.0release notes

  • Applies to muxing and closing output containers; each mux gets the full timeout and close shares one across trailer writing and flushing. Only unseekable outputs are covered.

    19.0.0release notes