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

Add non-integer framerate support #1525

Merged
merged 4 commits into from
Jun 8, 2020
Merged

Add non-integer framerate support #1525

merged 4 commits into from
Jun 8, 2020

Conversation

jailuthra
Copy link
Contributor

@jailuthra jailuthra commented May 30, 2020

What does this pull request do? Explain your changes. (required)

This PR adds support for non-integer framerates (#1474) by passing an optional FPS denominator field everywhere (like protobufs, webhooks etc.).

Specific updates (required)

  • bce44ea
    • Add FPS Denominator field in VideoProfile protobuf struct
    • Verify correct conversion of VideoProfile structs between LPMS <-> Protobuf
    • Ensure all uses of FPS like pixel calc & cost calc use denominator as well
  • b669b55 Add ability to set fps denominator through the AuthWebhook's JSON response
  • 0ef95a5 Add FullProfiles3 field to maintain back compat with late upgraders who wouldn't support the new Denominator field
  • 2958518 Serialize ffmpeg.VideoProfile to net.VideoProfile, also update webhook docs.

How did you test each of these updates (required)

  • Unit Tests for every change
  • Manual Testing
    • Non-int FPS with new B -> new OT Works
    • Non-int FPS with new B -> old OT Fails
    • Int FPS with old B -> new OT Works

Does this pull request close any open issues?

Fixes #1474

Checklist:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass

Copy link
Collaborator

@j0sh j0sh left a comment

Choose a reason for hiding this comment

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

Looks great, just a few comments around test cases and field naming.

The webhook documentation also needs to be updated to reflect the new field: https://github.com/livepeer/go-livepeer/blob/master/doc/rtmpwebhookauth.md It probably doesn't hurt to mention in the doc that if the field is optional, and if omitted, a value of 1 is used by default.

server/mediaserver_test.go Show resolved Hide resolved
server/segment_rpc_test.go Outdated Show resolved Hide resolved
server/rpc.go Show resolved Hide resolved
core/streamdata.go Show resolved Hide resolved
server/segment_rpc_test.go Outdated Show resolved Hide resolved
net/lp_rpc.proto Outdated Show resolved Hide resolved
server/mediaserver.go Outdated Show resolved Hide resolved
jailuthra added 3 commits June 4, 2020 18:50
* Add FPS denominator in Protobuf VideoProfile structs
* Add unit tests to confirm correct conversion b/w LPMS & Protobuf
VideoProfile
* Ensure fee calculations & cost calculations work with non-int FPS
* Add unit tests for calculation changes
server/segment_rpc_test.go Outdated Show resolved Hide resolved
Also update RTMP auth webhook docs to add info on the field
@jailuthra jailuthra requested a review from j0sh June 4, 2020 22:24
Copy link
Collaborator

@j0sh j0sh left a comment

Choose a reason for hiding this comment

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

🚢

@jailuthra jailuthra merged commit d0ea014 into master Jun 8, 2020
@jailuthra jailuthra deleted the jl/nonintfps branch June 8, 2020 17:46
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.

Non Integer Frame Rate Support
2 participants