Welcome to avfilters’ documentation!

Welcome to avfilters’ documentation!#

concatenate(files, dst)

Concatenate multiple media into a single media.

inspect(file)

Inpsect a multimedia file container.

reverse(src, dst)

Reverse a media.

Common Audio and Video filters.

This package provides an easy-to-use, high-level, and well tested interface to some of features exposed by the av module.

While this library was first developed for another Python project, another Python project, Manim Slides, I welcome any feature suggestion, bug report, or question in the GitHub issues!

concatenate(files, dst)[source]#

Concatenate multiple media into a single media.

Roughly equivalent to:

ffmpeg -f concat -safe 0 -i list.txt -c copy dst

Where list.txt contains the list of files to concatenate. It will be automatically created in a temporary file.

Parameters:
  • files (Iterable[str]) –

    The files that should be concatenated.

    All files must have the same streams (same codecs, same time base, etc.)

  • dst (str) – The path to the destination file. Any existing file will be overwritten.

Return type:

None

inspect(file)[source]#

Inpsect a multimedia file container.

Parameters:

file (str) – The multimedia file.

Return type:

Container

Returns:

The corresponding container dataclass.

reverse(src, dst)[source]#

Reverse a media.

Roughly equivalent to:

ffmpeg -i src -vf reverse -af areverse dst
Parameters:
  • src (str) – The path to the source file. The file must exist and be a valid media.

  • dst (str) – The path to the destination file. Any existing file will be overwritten.

Return type:

None