From adae81160a42c5694859315c2155f67dbc0543d0 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Tue, 19 Nov 2024 03:00:50 -0500 Subject: [PATCH] time_base cannot be None --- av/container/output.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/av/container/output.pyx b/av/container/output.pyx index a07bc79e8..1227c4340 100644 --- a/av/container/output.pyx +++ b/av/container/output.pyx @@ -1,5 +1,6 @@ import logging import os +from fractions import Fraction cimport libav as lib @@ -186,7 +187,7 @@ cdef class OutputContainer(Container): elif template.type == "audio": py_stream.time_base = kwargs.pop("time_base", 1 / template.rate) else: - py_stream.time_base = kwargs.pop("time_base", None) + py_stream.time_base = kwargs.pop("time_base", Fraction(0, 1)) for k, v in kwargs.items(): setattr(py_stream, k, v)