imageio.plugins.pyav.PyAVPlugin.set_video_filter#

PyAVPlugin.set_video_filter(filter_sequence: Optional[List[Tuple[str, Union[str, dict]]]] = None, filter_graph: Optional[Tuple[dict, List]] = None) None[source]#

Set the filter(s) to use.

This function creates a new FFMPEG filter graph to use when reading or writing video. In the case of reading, frames are passed through the filter graph before begin returned and, in case of writing, frames are passed through the filter before being written to the video.

Parameters:
filter_sequenceList[str, str, dict]

If not None, apply the given sequence of FFmpeg filters to each ndimage. Check the (module-level) plugin docs for details and examples.

filter_graph(dict, List)

If not None, apply the given graph of FFmpeg filters to each ndimage. The graph is given as a tuple of two dicts. The first dict contains a (named) set of nodes, and the second dict contains a set of edges between nodes of the previous dict. Check the (module-level) plugin docs for details and examples.

Notes

Changing a filter graph with lag during reading or writing will currently cause frames in the filter queue to be lost.