input_container = av.open(RTSP_URL)
video_stream: av.VideoStream = input_container.streams.video[0]
print(video_stream)
print(video_stream.gop_size)Shouldn't it be a simple int? Line 33 in ee30e4f |
Answered by
WyattBlue
Oct 31, 2024
Replies: 2 comments
|
Because the
|
0 replies
Answer selected by
WyattBlue
|
Thank you! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because the
gop_sizevalue for a decoder would, at best, produce a nonsense answer, and at worst, be slightly wrong or coincidentally correct.gop_sizetells the encoder how many non-keyframes there should be between each keyframe. Of course, the encoder might use that as only a rough guideline or ignore it completely. If you want to know the "gop_size" for a decoder. You can decode the frames in a loop, then checkframe.is_keyframeto calculate the value.