change output resolution in stream io #38
-
expected result code
result expected result p.s. best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The correct approach is to make the reader to output small frames: with ffmpegio.open(input, 'rv', s=(180,320)) as fin, ffmpegio.open(output, 'wv', rate_in = fin.rate, overwrite = True) as fout:
... The FFmpeg with ffmpegio.open(input, 'rv', s=(180,-1)) as fin, ffmpegio.open(output, 'wv', rate_in = fin.rate, overwrite = True) as fout:
... |
Beta Was this translation helpful? Give feedback.
The correct approach is to make the reader to output small frames:
The FFmpeg
s
option (or-s
option in cli) sets the output frame size (implicitly inserts a resize filter). If you wish to only set height or width and automatically scale the other, keeping the aspect ratio, specify the dependent dimension as-1
or-2
if you need to make sure even number of pixels. For example,