We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05e6d2d commit ffc38c2Copy full SHA for ffc38c2
1 file changed
src/ffmpegio/__init__.py
@@ -238,8 +238,16 @@ def open(
238
f"Invalid FFmpeg streaming mode: {mode}. Only 1 of 'rwf' may be specified."
239
)
240
241
- # auto-detect operation
242
- if not (read or write or filter):
+ if (read or write or filter):
+ # convert unused rate argument to ffmpeg option
243
+ if read and rate_in is not None:
244
+ kwds['r_in' if video else 'ar_in'] = rate_in
245
+ rate_in = None
246
+ elif write and rate is not None:
247
+ kwds['r' if video else 'ar'] = rate
248
+ rate = None
249
+ else:
250
+ # auto-detect operation
251
if rate_in is None:
252
read = True
253
elif rate is None:
0 commit comments