Skip to content

Commit bf76be8

Browse files
committed
stream options str
1 parent 9ab2ee6 commit bf76be8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/daio/video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ def __init__(self, filename, codec='libx264', fps=25, frame_shape=None, pix_fmt=
178178
#define codec defaults:
179179
if codec == 'h264':
180180
#kwargs = dict(bit_rate=1000000, pix_fmt='yuv420p').update(kwargs)
181-
kwargs = {**dict(bit_rate=1000000), **kwargs}
181+
kwargs = {**dict(bit_rate='1000000'), **kwargs}
182182
elif codec == 'libx264':
183183
#kwargs = dict(crf=23, preset='superfast', pix_fmt='yuv420p').update(kwargs)
184-
kwargs = {**dict(crf=23, preset='superfast'), **kwargs}
184+
kwargs = {**dict(crf='23', preset='superfast'), **kwargs}
185185
#add video stream, if frame_shape is provided (otherwise create when the first frame is written)
186186
if frame_shape is not None:
187187
self.stream = self.container.add_stream(codec, rate=fps, height=frame_shape[0], width=frame_shape[1], pix_fmt=pix_fmt, options=kwargs)

0 commit comments

Comments
 (0)