Setting time_base when adding a stream to an output container #1525
Replies: 5 comments 1 reply
-
Can't repo. "done" is printed successfully. import av
from fractions import Fraction
container = av.open("test.mp4", "w")
container.add_stream("h264", time_base=Fraction(1, 1000))
container.close()
print("done") |
Beta Was this translation helpful? Give feedback.
-
Your issue might be caused by compiling with Debian's old system libraries. |
Beta Was this translation helpful? Give feedback.
-
As I dug in more, it's a little more complicated than I realized because I had put in a workaround that I forgot about. I'm using So running this with no second arg so
|
Beta Was this translation helpful? Give feedback.
-
I noticed that the pixel format is missing when it uses the encoder, so is it doing something to set that when the decoder is used? Is there a way for me to ensure all of the codec values are set properly? |
Beta Was this translation helpful? Give feedback.
-
To check that theory, I did |
Beta Was this translation helpful? Give feedback.
-
Overview
Accessing
time_base
now raises an error with 13.0 when specifyingtime_base
when callingadd_stream
on an output containerExpected behavior
Able to specify the
time_base
on a stream like previous versionsActual behavior
RuntimeError
raised when it's calledTraceback:
Investigation
Caused by this commit
Reproduction
Call
add_stream
withtime_base
, like this:Versions
Research
I have done the following:
Additional context
If there's another way to specify this, then I'm definitely up for switching how I specify this, but I believe this is a valid use case since it's an encoder rather than a decoder and maybe the issue is that something is wrong with the
is_decoder
check?Beta Was this translation helpful? Give feedback.
All reactions