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

api/stream: Add a couple more hacks for testing Trovo profiles #2155

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

victorges
Copy link
Member

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

  • When isMobileflag is set to true in the pull API endpoint, all transcode profiles set by the end user should be overwritten by fps=0. The rest of the parameters can remain as-is. So for example, if fps=30 is set by the user, we should replace that profile with fps=0 and keep remaining parameters the same. This is a temporary workaround required to resolve stuttering issues seen with Trovo's mobile app (PS-382)

For example, a /pull API request where the user set profiles like this:

"profiles": [ { "name": "360p0", "fps": 30, "bitrate": 800000, "width": 640, "height": 360, "profile": "H264ConstrainedHigh" }, { "name": "480p0", "fps": 30, "bitrate": 1600000, "width": 854, "height": 480, "profile": "H264ConstrainedHigh" }, ] }

will become the following (only fps field overwritten and set to 0):

"profiles": [ { "name": "360p0", "fps": 0, "bitrate": 800000, "width": 640, "height": 360, "profile": "H264ConstrainedHigh" }, { "name": "480p0", "fps": 0, "bitrate": 1600000, "width": 854, "height": 480, "profile": "H264ConstrainedHigh" }, ] }
  • Any request that has a width=853 and height=480, should be updated so that width=854. This is because 853 is not a standard dimension and it results in a vertical green line on the right side of the frame (PS-381)

Specific updates (required)

The 2 things above.

How did you test each of these updates (required)

yarn test

Does this pull request close any open issues?

Implements PS-534

Checklist

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@victorges victorges requested a review from a team as a code owner April 30, 2024 12:27
Copy link

vercel bot commented Apr 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 0:31am

@victorges victorges changed the title Vg/chore/trovo profile hacks api/stream: Add a couple more hacks for testing Trovo profiles Apr 30, 2024
@@ -1,15 +1,12 @@
import { Router, Request } from "express";
import { Request, Router } from "express";
import _ from "lodash";
Copy link
Member

Choose a reason for hiding this comment

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

Probably imported by mistake?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see it was elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

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

@victorges victorges merged commit 307c0e1 into master Apr 30, 2024
13 checks passed
@victorges victorges deleted the vg/chore/trovo-profile-hacks branch April 30, 2024 14:15
@pwilczynskiclearcode
Copy link
Contributor

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.

None yet

3 participants