@@ -24,9 +24,7 @@ def _run_read(*args, shape=None, pix_fmt_in=None, s_in=None, show_log=None, **kw
2424 :rtype: numpy.ndarray
2525 """
2626
27- dtype , shape , _ = configure .finalize_video_read_opts (
28- args [0 ], pix_fmt_in , s_in
29- )
27+ dtype , shape , _ = configure .finalize_video_read_opts (args [0 ], pix_fmt_in , s_in )
3028
3129 if dtype == np .dtype ("b" ):
3230 raise ValueError ("pix_fmt must be one of gray*, ya*, rgb*, rgba*" )
@@ -63,7 +61,6 @@ def create(
6361 pix_fmt = None ,
6462 vf = None ,
6563 vframe = None ,
66- progress = None ,
6764 show_log = None ,
6865 ** kwargs
6966):
@@ -73,8 +70,12 @@ def create(
7370 :type name: str
7471 :param \\ *args: filter arguments
7572 :type \\ *args: tuple, optional
76- :param progress: progress callback function, defaults to None
77- :type progress: callable object, optional
73+ :param pix_fmt: RGB/grayscale pixel format name, defaults to None (rgb24)
74+ :type pix_fmt: str, optional
75+ :param vf: additional video filter, defaults to None
76+ :type vf: FilterGraph or str, optional
77+ :param vframe: video frame index to capture, defaults to None (=0)
78+ :type vframe: int, optional
7879 :param show_log: True to show FFmpeg log messages on the console,
7980 defaults to None (no show/capture)
8081 Ignored if stream format must be retrieved automatically.
@@ -84,6 +85,7 @@ def create(
8485 :return: image data
8586 :rtype: numpy.ndarray
8687
88+
8789 Supported Video Source Filters
8890 ------------------------------
8991
@@ -128,23 +130,19 @@ def create(
128130
129131 outopts ["frames:v" ] = vframe if vframe else 1
130132
131- return _run_read (ffmpeg_args , progress = progress , s_in = s_in , show_log = show_log )
133+ return _run_read (ffmpeg_args , s_in = s_in , show_log = show_log )
132134
133135
134- def read (url , progress = None , show_log = None , ** options ):
136+ def read (url , show_log = None , ** options ):
135137 """Read an image file or a snapshot of a video frame
136138
137139 :param url: URL of the image or video file to read.
138140 :type url: str
139- :param stream_id: video stream id (numeric part of ``v:#`` specifier), defaults to 0.
140- :type stream_id: int, optional
141- :param progress: progress callback function, defaults to None
142- :type progress: callable object, optional
143141 :param show_log: True to show FFmpeg log messages on the console,
144142 defaults to None (no show/capture)
145143 Ignored if stream format must be retrieved automatically.
146144 :type show_log: bool, optional
147- :param \\ **options: other keyword options (see :doc:`options`)
145+ :param \\ **options: FFmpeg options, append '_in' for input option names (see :doc:`options`)
148146 :type \\ **options: dict, optional
149147 :return: image data
150148 :rtype: numpy.ndarray
@@ -179,26 +177,23 @@ def read(url, progress=None, show_log=None, **options):
179177 ffmpeg_args ,
180178 stdin = stdin ,
181179 input = input ,
182- progress = progress ,
183180 show_log = show_log ,
184181 pix_fmt_in = pix_fmt_in ,
185182 s_in = s_in ,
186183 )
187184
188185
189- def write (url , data , progress = None , show_log = None , ** options ):
186+ def write (url , data , show_log = None , ** options ):
190187 """Write a NumPy array to an image file.
191188
192189 :param url: URL of the image file to write.
193190 :type url: str
194191 :param data: image data 3-D array (rowsxcolsxcomponents)
195192 :type data: `numpy.ndarray`
196- :param progress: progress callback function, defaults to None
197- :type progress: callable object, optional
198193 :param show_log: True to show FFmpeg log messages on the console,
199194 defaults to None (no show/capture)
200195 :type show_log: bool, optional
201- :param \\ **options: other keyword options (see :doc:`options`)
196+ :param \\ **options: FFmpeg options, append '_in' for input option names (see :doc:`options`)
202197 :type \\ **options: dict, optional
203198 """
204199
@@ -217,20 +212,19 @@ def write(url, data, progress=None, show_log=None, **options):
217212 ffmpeg_args ,
218213 input = data ,
219214 stdout = stdout ,
220- progress = progress ,
221215 capture_log = False if show_log else None ,
222216 )
223217
224218
225- def filter (expr , input , progress = None , ** options ):
219+ def filter (expr , input , ** options ):
226220 """Filter image pixels.
227221
228222 :param expr: SISO filter graph.
229223 :type expr: str
230224 :param input: input image data
231225 :type input: 2D/3D numpy.ndarray
232- :param progress: progress callback function, defaults to None
233- :type progress: callable object , optional
226+ :param \\ **options: FFmpeg options, append '_in' for input option names (see :doc:`options`)
227+ :type \\ **options: dict , optional
234228 :return: output sampling rate and data
235229 :rtype: numpy.ndarray
236230
0 commit comments