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

Added Content-Resolution to prepare & transcode #31

Merged
merged 2 commits into from
May 19, 2022

Conversation

gioelecerati
Copy link
Member

Fixes #25
Depends on livepeer/go-api-client#6

What does it do?
Retrieve the source asset resolution and provide it to PushSegment, to be used as a Content-Resolution header and display the source resolution correctly.

@gioelecerati gioelecerati requested a review from a team as a code owner May 13, 2022 16:12
Comment on lines +165 to +170
for _, track := range tctx.InputAsset.AssetSpec.VideoSpec.Tracks {
if track.Type == "video" {
contentResolution = fmt.Sprintf("%dx%d", track.Width, track.Height)
break
}
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: We should probably create a litle helper/utility to grab the video track from an asset spec (or maybe receiving a trackType string and returning the first track with that). We have this exact same loop repeated in a couple of places now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Gonna do this in another pr

task/transcode.go Show resolved Hide resolved
Copy link
Collaborator

@figintern figintern left a comment

Choose a reason for hiding this comment

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

LGTM!

@gioelecerati gioelecerati force-pushed the gio/prepare/contentresolution branch from 83f253a to b02bd95 Compare May 19, 2022 17:40
@gioelecerati gioelecerati merged commit d6fdaae into main May 19, 2022
@@ -4,7 +4,7 @@ go 1.16

require (
github.com/golang/glog v1.0.0
github.com/livepeer/go-api-client v0.1.2
github.com/livepeer/go-api-client v0.1.3-0.20220513154150-a37f7c0b5586
Copy link
Collaborator

Choose a reason for hiding this comment

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

v0.1.3

https://github.com/livepeer/go-api-client/releases/tag/v0.1.3

go get github.com/livepeer/go-api-client@v0.1.3 
go mod tidy

@hjpotter92 hjpotter92 deleted the gio/prepare/contentresolution branch September 29, 2022 06:04
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.

Fix source resolution in HLS playback
3 participants