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

Allow requesting keyframes and add keyframe information in metadata #4

Merged
merged 18 commits into from
Aug 2, 2024

Conversation

Noarkhh
Copy link
Collaborator

@Noarkhh Noarkhh commented Jul 9, 2024

closes membraneframework/membrane_core#840

tests could be better, but i have issues with the fact that the event doesnt always come to the encoder before it produces and buffers a new frame

@Noarkhh Noarkhh changed the title Demand keyframe events Allow requesting keyframes and add keyframe information in metadata Jul 11, 2024
@Noarkhh Noarkhh requested a review from varsill July 11, 2024 07:37
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you somehow disable the keyframe generation on scene change (x264 has a sc_threshold: 0 option for that purpose :D ), set some fixed keyframe interval and then count all the keyframes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the tests once i add the option to specify frame lag in a separate PR (I won't add it in this one, since #6 changes the way config is passed to native functions)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is also a possibility that the encoder will finish encoding all frames and only then receive the requesting event

Element that encodes a VP8 stream
Element that encodes a VP8 stream.

This element can receive a `Membrane.VPx.ForceKeyframeEvent` on it's `:output` pad to force the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you have forgotten to change the docs here in in vp9_encoder.ex:

Suggested change
This element can receive a `Membrane.VPx.ForceKeyframeEvent` on it's `:output` pad to force the
This element can receive a `Membrane.KeyframeRequestEvent` on it's `:output` pad to force the

@Noarkhh Noarkhh requested a review from varsill July 25, 2024 13:29
@varsill varsill self-requested a review July 31, 2024 13:51
@Noarkhh Noarkhh merged commit fa70290 into master Aug 2, 2024
3 checks passed
@Noarkhh Noarkhh deleted the demand-keyframe-events branch August 2, 2024 09:59
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

Successfully merging this pull request may close these issues.

[vpx_plugin] Allow requesting keyframes
2 participants