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

[BUG] enable_sps_framerate parameter only works for hardware encoder #1142

Open
mikkelam opened this issue Oct 25, 2024 · 3 comments
Open

[BUG] enable_sps_framerate parameter only works for hardware encoder #1142

mikkelam opened this issue Oct 25, 2024 · 3 comments

Comments

@mikkelam
Copy link

Please only report one bug per issue!

Describe the bug
Cannot include enable_sps_framerate. As this interface is kinda hidden in how it switches, it's not easy for a user to understand this difference.

To Reproduce

FPS = 30
enc = H264Encoder(enable_sps_framerate=True, framerate=FPS)

Expected behaviour
A clear and concise description of what you expected to happen.

Console Output, Screenshots

  encoder = H264Encoder(enable_sps_framerate=True, framerate=FPS)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: LibavH264Encoder.__init__() got an unexpected keyword argument 'enable_sps_framerate'

Hardware :
rpi4 -> rpi5 is what made me see the problem

Additional context
Add any other context about the problem here.

@davidplowman
Copy link
Collaborator

Hi, I can put this on the list of little jobs to do. PRs also welcome!! :)

@mikkelam
Copy link
Author

Hi, I can put this on the list of little jobs to do. PRs also welcome!! :)

I could try. How would you like me to handle it? I cannot see a similar configuration on the pyav side. Should we give a warning or silently accept the flag?

@davidplowman
Copy link
Collaborator

Well, I think there is a "framerate" parameter in the codec context that one could set, and I think that does get reflected in the SPS. Though there might be some confusion about whether libav is talking about frames or fields, I'm not quite sure. But it might even be the right thing to do!!

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