Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'str' object has no attribute 'numerator' #276

Open
Liam203 opened this issue Dec 5, 2024 · 1 comment
Open

AttributeError: 'str' object has no attribute 'numerator' #276

Liam203 opened this issue Dec 5, 2024 · 1 comment

Comments

@Liam203
Copy link

Liam203 commented Dec 5, 2024

在运行colab demo的时候报这个错误是为什么?

@WackYHooz
Copy link

同样的报错,经排查是av版本太高了,通过修改 inference_utils.py 解决。
脚本内导入fractions包:

from fractions import Fraction

修改第34行代码,将frame_rate用Fraction封装:

self.stream = self.container.add_stream('h264', rate=Fraction(frame_rate))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants