Changelog¶
We are operating with semantic versioning.
v14.0.0¶
Major:
Drop FFmpeg 6.
Remove
AVError
alias (useFFmpegError
directly instead).Remove the template arg from
OutputContainer.add_stream()
.
Features:
Add
OutputContainer.add_stream_from_template()
by @WyattBlue and @cdce8p.
v13.1.0¶
Features:
Allow passing Python objects around using Frame.opaque and Packet.opaque by @CarlosRDomin and @WyattBlue in (#1533).
Allow extradata to be set by encoders by @daveisfera in (#1526).
Add getting ffmpeg version info string by @hmaarrfk in (#1564).
Fixes:
Remove the deprecation module in anticipation of PEP 702.
Add type stubs to previously unannotated API sections.
Improve type stubs for both mypy and mypy –strict.
Permit only setting time_base with a Fraction, as mypy is unable to respect different types in getters vs setters.
Declare write_packet function as const by @hmaarrfk in (#1517).
v13.0.0¶
Major:
Drop FFmpeg 5, Support FFmpeg 7.
Drop Python 3.8, Support Python 3.13.
Update FFmpeg to 7.0.2 for the binary wheels.
Disallow initializing an AudioLayout object with an int.
Disallow accessing gop_size, timebase as a decoder (Raised deprecation warning before).
Remove ticks_per_frame property because it was deprecated in FFmpeg.
Features:
Add AttachmentStream class.
Add best() method to StreamContainer.
Add set_audio_frame_size() method to Graph object.
Add nb_channels property to AudioLayout object.
Add from_bytes() method to VideoFrame object.
Fixes:
Fix VideoCC’s repl breaking when self._format is None.
Fix getting pix_fmt property when VideoCC’s self._format is None.
v12.3.0¶
Features:
Support libav’s av_log_set_level by @materight in (#1448).
Add Graph.link_nodes by @WyattBlue in (#1449).
Add default codec properties by @WyattBlue in (#1450).
Remove the xvid and ass packages in ffmpeg binaries because they were unused by @WyattBlue in (#1462).
Add supported_codecs property to OutputContainer by @WyattBlue in (#1465).
Add text and dialogue property to AssSubtitle, remove TextSubtitle by @WyattBlue in (#1456).
Fixes:
Include libav headers in final distribution by @materight in (#1455).
Fix segfault when calling subtitle_stream.decode() by @WyattBlue in (#1460).
flushing subtitle decoder requires a new uninitialized packet by @moonsikpark in (#1461).
Set default color range for VideoReformatter.format() by @elxy in (#1458).
Resampler: format, layout accepts str int too by @WyattBlue in (#1446).
v12.2.0¶
Features:
Add a make_writable method to Frame instances (#1414).
Use av_guess_sample_aspect_ratio to report sample and display aspect ratios.
Fixes:
v12.1.0¶
Features:
Build binary wheels with webp support.
Allow disabling logs, disable logs by default.
Add bitstream filters by @skeskinen in (#1379 #1375).
Expose CodecContext flush_buffers by @skeskinen in (#1382).
Fixes:
Fix type stubs, add missing type stubs.
Add S12M_TIMECODE by @WyattBlue in (#1381).
Subtitle.text now returns bytes by @WyattBlue in (#1398).
Allow packet.duration to be writable by @WyattBlue in (#1399).
Remove deprecated VideoStream.frame_rate by @WyattBlue in (#1351).
Build with Arm for PyPy now by @WyattBlue in (#1395).
Fix #1378 by @WyattBlue in (#1400).
setup.py: use PKG_CONFIG env var to get the pkg-config to use by @Artturin in (#1387).
v12.0.0¶
Major:
Add type hints.
Update FFmpeg to 6.1.1 for the binary wheels.
Update libraries for the binary wheels (notably dav1d to 1.4.1).
Deprecate VideoCodecContext.gop_size for decoders by @JoeSchiff in (#1256).
Deprecate frame.index by @JoeSchiff in (#1218).
Features:
Allow using pathlib.Path for av.open by @WyattBlue in (#1231).
Add max_b_frames property to CodecContext by @davidplowman in (#1119).
Add encode_lazy method to CodecContext by @rawler in (#1092).
Add color_range to CodecContext/Frame by @johanjeppsson in (#686).
Set time_base for AudioResampler by @daveisfera in (#1209).
Add support for ffmpeg’s AVCodecContext::delay by @JoeSchiff in (#1279).
Add color_primaries, color_trc, colorspace to VideoStream by @WyattBlue in (#1304).
Add bits_per_coded_sample to VideoCodecContext by @rvanlaar in (#1203).
AssSubtitle.ass now returns as bytes by @WyattBlue in (#1333).
Fixes:
Convert deprecated Cython extension class properties to decorator syntax by @JoeSchiff.
Check None packet when setting time_base after decode by @philipnbbc in (#1281).
Remove deprecated Buffer.to_bytes by @WyattBlue in (#1286).
Remove deprecated Packet.decode_one by @WyattBlue in (#1301).
v11.0.0¶
Major:
Add support for FFmpeg 6.0, drop support for FFmpeg < 5.0.
Add support for Python 3.12, drop support for Python < 3.8.
Build binary wheels against libvpx 1.13.1 to fix CVE-2023-5217.
Build binary wheels against FFmpeg 6.0.
Features:
Add support for the ENCODER_FLUSH encoder flag (#1067).
Add VideoFrame ndarray operations for yuv444p/yuvj444p formats (#788).
Add setters for AVFrame.dts, AVPacket.is_keyframe and AVPacket.is_corrupt (#1179).
Fixes:
v10.0.0¶
Major:
Add support for FFmpeg 5.0 and 5.1 (#817).
Drop support for FFmpeg < 4.3.
Deprecate CodecContext.time_base for decoders (#966).
Deprecate VideoStream.framerate and VideoStream.rate (#1005).
Stop proxying Codec from Stream instances (#1037).
Features:
Update FFmpeg to 5.1.2 for the binary wheels.
Provide binary wheels for Python 3.11 (#1019).
Add VideoFrame ndarray operations for gbrp formats (#986).
Add VideoFrame ndarray operations for gbrpf32 formats (#1028).
Add VideoFrame ndarray operations for nv12 format (#996).
Fixes:
v9.2.0¶
Features:
Update binary wheels to enable libvpx support.
Add an io_open argument to av.open for multi-file custom I/O.
Add support for AV_FRAME_DATA_SEI_UNREGISTERED (#723).
Ship .pxd files to allow other libraries to cimport av (#716).
Fixes:
v9.1.1¶
Fixes:
Update binary wheels to update dependencies on Windows, disable ALSA on Linux.
v9.1.0¶
Features:
Add VideoFrame ndarray operations for rgb48be, rgb48le, rgb64be, rgb64le pixel formats.
Add VideoFrame ndarray operations for gray16be, gray16le pixel formats (#674).
Make it possible to use av.open() on a pipe (#738).
Use the “ASS without timings” format when decoding subtitles.
Fixes:
Update binary wheels to fix security vulnerabilities (#921) and enable ALSA on Linux (#941).
Fix crash when closing an output container an encountering an I/O error (#613).
Fix crash when probing corrupt raw format files (#590).
Fix crash when manipulating streams with an unknown codec (#689).
Remove obsolete KEEP_SIDE_DATA and MP4A_LATM flags which are gone in FFmpeg 5.0.
Deprecate to_bytes() method of Packet, Plane and SideData, use bytes(packet) instead.
v9.0.2¶
Minor:
Update FFmpeg to 4.4.1 for the binary wheels.
Fix framerate when writing video with FFmpeg 4.4 (#876).
v9.0.1¶
Minor:
Update binary wheels to fix security vulnerabilities (#901).
v9.0.0¶
Major:
Re-implement AudioResampler with aformat and buffersink (#761). AudioResampler.resample() now returns a list of frames.
Remove deprecated methods: AudioFrame.to_nd_array, VideoFrame.to_nd_array and Stream.seek.
Minor:
Provide binary wheels for macOS/arm64 and Linux/aarch64.
Simplify setup.py, require Cython.
Update the installation instructions in favor of PyPI.
Fix VideoFrame.to_image with height & width (#878).
Fix setting Stream time_base (#784).
Replace deprecated av_init_packet with av_packet_alloc (#872).
Validate pixel format in VideoCodecContext.pix_fmt setter (#815).
Fix AudioFrame ndarray conversion endianness (#833).
Improve time_base support with filters (#765).
Allow flushing filters by sending None (#886).
Avoid unnecessary vsnprintf() calls in log_callback() (#877).
Make Frame.from_ndarray raise ValueError instead of AssertionError.
v8.1.0¶
Minor:
Update FFmpeg to 4.3.2 for the binary wheels.
Provide binary wheels for Python 3.10 (#820).
Stop providing binary wheels for end-of-life Python 3.6.
Fix args order in Frame.__repr__ (#749).
Fix documentation to remove unavailable QUIET log level (#719).
Expose codec_context.codec_tag (#741).
Add example for encoding with a custom PTS (#725).
Use av_packet_rescale_ts in Packet._rebase_time() (#737).
Do not hardcode errno values in test suite (#729).
Use av_guess_format for output container format (#691).
Fix documentation code block indentation (#783).
Fix link to Conda installation instructions (#782).
Export AudioStream from av.audio (#775).
Fix setting CodecContext.extradata (#801).
v8.0.3¶
Minor:
Update FFmpeg to 4.3.1 for the binary wheels.
v8.0.2¶
Minor:
v8.0.1¶
Minor:
Enable additional FFmpeg features in the binary wheels.
Use os.fsencode for both input and output file names (#600).
v8.0.0¶
Major:
Drop support for Python 2 and Python 3.4.
Provide binary wheels for Linux, Mac and Windows.
Minor:
Remove shims for obsolete FFmpeg versions (#588).
Add yuvj420p format for
VideoFrame.from_ndarray()
andVideoFrame.to_ndarray()
(#583).Add support for palette formats in
VideoFrame.from_ndarray()
andVideoFrame.to_ndarray()
(#601).Fix Python 3.8 deprecation warning related to abstract base classes (#616).
Remove ICC profiles from logos (#622).
Fixes:
v7.0.1¶
Fixes:
Removed deprecated
AV_FRAME_DATA_QP_TABLE_*
enums. (#607)
v7.0.0¶
Major:
Drop support for FFmpeg < 4.0. (#559)
Introduce per-error exceptions, and mirror the builtin exception hierarchy. It is recommended to examine your error handling code, as common FFmpeg errors will result in ValueError baseclasses now. (#563)
Data stream’s encode and decode return empty lists instead of none allowing common API use patterns with data streams.
Remove
whence
parameter fromInputContainer.seek()
as non-time seeking doesn’t seem to actually be supported by any FFmpeg formats.
Minor:
Users can disable the logging system to avoid lockups in sub-interpreters. (#545)
Filters support audio in general, and a new
Graph.add_abuffer()
. (#562)Expose
Stream.base_rate
andStream.guessed_rate
. (#564)VideoFrame.reformat()
can specify interpolation.Expose many sets of flags.
Fixes:
Fix typing in
CodecContext.parse()
and make it more robust.Fix wrong attribute in ByteSource. (#340)
Remove exception that would break audio remuxing. (#537)
Log messages include last FFmpeg error log in more helpful way.
Use AVCodecParameters so FFmpeg doesn’t complain. (#222)
v6.2.0¶
Major:
Allow
av.open()
to be used as a context manager.Fix compatibility with PyPy, the full test suite now passes. (#130)
Minor:
Add
InputContainer.close()
method. (#317, #456)Ensure audio output gets flushes when using a FIFO. (#511)
Make Python I/O buffer size configurable. (#512)
Make
AudioFrame
andVideoFrame
more garbage-collector friendly by breaking a reference cycle. (#517)
Build:
Do not install the scratchpad package.
v6.1.2¶
Micro:
Fix a numpy deprecation warning in
AudioFrame.to_ndarray()
.
v6.1.1¶
Micro:
Fix alignment in
VideoFrame.from_ndarray()
. (#478)Fix error message in
Buffer.update()
.
Build:
Fix more compiler warnings.
v6.1.0¶
Minor:
av.datasets
for sample data that is pulled from either FFmpeg’s FATE suite, or our documentation server.InputContainer.seek()
gets astream
argument to specify thetime_base
the requestedoffset
is in.
Micro:
Avoid infinite look in
Stream.__getattr__
. (#450)Correctly handle Python I/O with no
seek
method.Remove
Datastream.seek
override (#299)
Build:
Assert building against compatible FFmpeg. (#401)
Lock down Cython language level to avoid build warnings. (#443)
Other:
Incremental improvements to docs and tests.
Examples directory will now always be runnable as-is, and embeded in the docs (in a copy-pastable form).
v6.0.0¶
Major:
Drop support for FFmpeg < 3.2.
Remove
VideoFrame.to_qimage
method, as it is too tied to PyQt4. (#424)
Minor:
Add support for all known sample formats in
AudioFrame.to_ndarray()
and addAudioFrame.to_ndarray()
. (#422)Add support for more image formats in
VideoFrame.to_ndarray()
andVideoFrame.from_ndarray()
. (#415)
Micro:
Fix a memory leak in
OutputContainer.mux_one()
. (#431)Ensure
OutputContainer.close()
is called at destruction. (#427)Fix a memory leak in
OutputContainer
initialisation. (#427)Make all video frames created by PyAV use 8-byte alignment. (#425)
Behave properly in
VideoFrame.to_image()
andVideoFrame.from_image()
whenwidth != line_width
. (#425)Fix manipulations on video frames whose width does not match the line stride. (#423)
Fix several
Plane.line_size
misunderstandings. (#421)Consistently decode dictionary contents. (#414)
Always use send/recv en/decoding mechanism. This removes the
count
parameter, which was not used in the send/recv pipeline. (#413)Remove various deprecated iterators. (#412)
Fix a memory leak when using Python I/O. (#317)
Make
OutputContainer.mux_one()
call av_interleaved_write_frame with the GIL released.
Build:
Remove the “reflection” mechanism, and rely on FFmpeg version we build against to decide which methods to call. (#416)
Fix many more
const
warnings.
v0.x.y¶
Note
Below here we used v0.x.y
.
We incremented x
to signal a major change (i.e. backwards
incompatibilities) and incremented y
as a minor change (i.e. backwards
compatible features).
Once we wanted more subtlety and felt we had matured enough, we jumped
past the implications of v1.0.0
straight to v6.0.0
(as if we had not been stuck in v0.x.y
all along).
v0.5.3¶
Minor:
Expose
VideoFrame.pict_type
asPictureType
enum. (#402)Expose
Codec.video_rates
andCodec.audio_rates
. (#381)
Patch:
Fix
Packet.time_base
handling during flush. (#398)VideoFrame.reformat()
can throw exceptions when requested colorspace transforms aren’t possible.Wrapping the stream object used to overwrite the
pix_fmt
attribute. (#390)
Runtime:
Deprecate
VideoFrame.ptr
in favour ofVideoFrame.buffer_ptr
.Deprecate
Plane.update_buffer()
andPacket.update_buffer
in favour ofPlane.update()
. (#407)Deprecate
Plane.update_from_string()
in favour ofPlane.update()
. (#407)Deprecate
AudioFrame.to_nd_array()
andVideoFrame.to_nd_array()
in favour ofAudioFrame.to_ndarray()
andVideoFrame.to_ndarray()
. (#404)
Build:
Docs:
v0.5.2¶
Build:
Fixed Windows build, which broke in v0.5.1.
Compiler checks are not cached by default. This behaviour is retained if you
source scripts/activate.sh
to develop PyAV. (#256)Changed to
PYAV_SETUP_REFLECT_DEBUG=1
fromPYAV_DEBUG_BUILD=1
.
v0.5.1¶
Build:
Set
PYAV_DEBUG_BUILD=1
to force a verbose reflection (mainly for being installed viapip
, which is why this is worth a release).
v0.5.0¶
Major:
Dropped support for Libav in general. (#110)
No longer uses libavresample.
Minor:
av.open
hascontainer_options
andstream_options
.Frame
includespts
inrepr
.
Patch:
v0.4.1¶
Minor:
Add Frame.interlaced_frame to indicate if the frame is interlaced. (#327 by @MPGek)
Expose
CodecContext.extradata
for codecs that have extra data, e.g. Huffman tables. (#287 by @adavoudi)
Patch:
v0.4.0¶
Major:
CodecContext
has taken over encoding/decoding, and can work in isolation of streams/containers.Stream.encode
returns a list of packets, instead of a single packet.AudioFifo
andAudioResampler
will raiseValueError
if input frames inconsistentpts
.time_base
use has been revisited across the codebase, and may not be converted betweenStream.time_base
andCodecContext.time_base
at the same times in the transcoding pipeline.CodecContext.rate
has been removed, but proxied toVideoCodecContext.framerate
andAudioCodecContext.sample_rate
. The definition is effectively inverted from the old one (i.e. for 24fps it used to be1/24
and is now24/1
).Fractions (e.g.
time_base
,rate
) will beNone
if they are invalid.InputContainer.seek
andStream.seek
will raise TypeError if given a float, when previously they converted it from seconds.
Minor:
Added
Packet.is_keyframe
andPacket.is_corrupt
. (#226)Many more
time_base
,pts
and other attributes are writable.Option
exposes much more of the API (but not get/set). (#243)Expose metadata encoding controls. (#250)
Expose
CodecContext.skip_frame
. (#259)
Patch:
v0.3.3¶
Patch:
v0.3.2¶
Minor:
Expose basics of avfilter via
Filter
.Add
Packet.time_base
.Add
AudioFrame.to_nd_array
to match same onVideoFrame
.Update Windows build process.
Patch:
Further improvements to the logging system. (#128)
v0.3.1¶
Minor:
av.logging.set_log_after_shutdown
renamed toset_print_after_shutdown
Repeating log messages will be skipped, much like ffmpeg’s does by default
Patch:
v0.3.0¶
Major:
Python IO can write
Improve build system to use Python’s C compiler for function detection; build system is much more robust
Continuous integration on Windows via AppVeyor. (by @vidartf)
Minor:
Add
Packet.decode_one()
to skip packet flushing for codecs that would otherwise errorStreamContainer
for easier selection of streamsAdd buffer protocol support to Packet
Patch:
Fix bug when using Python IO on files larger than 2GB. (#109 by @xxr3376)
Fix usage of changed Pillow API
Known Issues:
VideoFrame is suspected to leak memory in narrow cases on Linux. (#128)
v0.2.4¶
v0.2.3¶
Warning
There was an issue with the PyPI distribution in which it required Cython to be installed.
Major:
Python IO.
Aggressively releases GIL
Add experimental Windows build. (#84)
Minor:
Several new Stream/Packet/Frame attributes
Patch:
v0.2.2¶
Cythonization in setup.py; mostly a development issue.
Fix for av.InputContainer.size over 2**31.
v0.2.1¶
Python 3 compatibility!
Build process fails if missing libraries.
Fix linking of libavdevices.
v0.2.0¶
Warning
This version has an issue linking in libavdevices, and very likely will not work for you.
It sure has been a long time since this was released, and there was a lot of arbitrary changes that come with us wrapping an API as we are discovering it. Changes include, but are not limited to:
Audio encoding.
Exposing planes and buffers.
Descriptors for channel layouts, video and audio formats, etc..
Seeking.
Many many more properties on all of the objects.
Device support (e.g. webcams).
v0.1.0¶
FIRST PUBLIC RELEASE!
Container/video/audio formats.
Audio layouts.
Decoding video/audio/subtitles.
Encoding video.
Audio FIFOs and resampling.