livepeer / livepeer/lpms

Auto-create ABR list based on incoming video parameters

Open
#84 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
283
Forks
72
Avg merge
27m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
There is no sensible ABR default now - the developer has to worry about setting ABR for each video when doing transcoding. It can get potentially complex if the node has multiple input videos at the same time.

**Describe the solution you'd like**
Simple logic to automatically create ABR list based on incoming video parameters. We can add a method in `ffmpeg_segment_transcoder.go` called `autoDetectABRProfiles` that takes a `HLSSegment` and returns a list of `VideoProfile`.

The logic:
* Only support 16x9 and 4x3, standard resolutions.
* Based on input resolution, create an ABR list that includes everything in the standard resolutions list **below** the input resolution.
* Try to guess FPS, and select the same FPS for the ABS list.

**Describe alternatives you've considered**
We could dynamically decide on the ABR list and accept non-standard formats. But that requires for us to move away from the enumerated `VideoProfile` concept and create dynamic `VideoProfiles`. We'd have to do some fuzzy math to "snap into" standard resolutions.

**Additional context**
_This feature depends on https://github.com/livepeer/lpms/issues/83_

In `go-livepeer`, we can create a `-autoABR` flag, default to `true`. If `-autoABR` is set to false, rely on the user to set the transcode profiles. Otherwise, try to automatically set the ABR list.

Standard ABR Lists
_16x9_
* P1080p60fps16x9
* P1080p30fps16x9
* P720p60fps16x9
* P720p30fps16x9
* P576p60fps16x9
* P576p30fps16x9
* P360p60fps16x9
* P360p30fps16x9
* P288p60fps16x9
* P288p30fps16x9
* P144p60fps16x9
* P144p30fps16x9

_4x3_
* P960p60fps4x3
* P960p30fps4x3
* P480p60fps4x3
* P480p30fps4x3
* P240p60fps4x3
* P240p30fps4x3
* P120p60fps4x3
* P120p30fps4x3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ffmpeg_segment_transcoder.go and trace how HLSSegment, VideoProfile, and existing transcode profiles are handled. Review the dependency in issue 83 and the go-livepeer entry point for the proposed -autoABR flag; done means standard 16x9 or 4x3 profiles are selected from the input parameters, with user profiles still used when autoABR is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.