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

livepeer/starter: remove testTranscoder flag #2472

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
livepeer/starter: deprecate testTranscoder flag to prevent starting a…
…n O with no capabilities

The -testTranscoder flag defaults to true which requires all hardware
transcoders to call core.TestTranscoderCapabilities() to discover
transcoding caps. Setting this flag to false is not a valid use case
anymore so this change deprecates that option.
emranemran committed Jun 21, 2022
commit 3f9804779f419a02c4447abf346dd5d0d86c0f05
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@

- \#2466 bugfix: rendition resolution fix for portrait input videos; Min resolution applied for Nvidia hardware (@AlexKordic)
- \#338 lpms: Add exception handling code for importing a binary signature (@oscar_davids)
- \#2472 livepeer/starter: deprecate testTranscoder flag to prevent starting an O with no capabilities (@emahbub)

#### CLI
- \#2456 cli: Show O rather than B options when -redeemer flag set (@thomshutt)
1 change: 0 additions & 1 deletion cmd/livepeer/livepeer.go
Original file line number Diff line number Diff line change
@@ -116,7 +116,6 @@ func parseLivepeerConfig() starter.LivepeerConfig {
cfg.CurrentManifest = flag.Bool("currentManifest", *cfg.CurrentManifest, "Expose the currently active ManifestID as \"/stream/current.m3u8\"")
cfg.Nvidia = flag.String("nvidia", *cfg.Nvidia, "Comma-separated list of Nvidia GPU device IDs (or \"all\" for all available devices)")
cfg.Netint = flag.String("netint", *cfg.Netint, "Comma-separated list of NetInt device GUIDs (or \"all\" for all available devices)")
cfg.TestTranscoder = flag.Bool("testTranscoder", *cfg.TestTranscoder, "Test Nvidia GPU transcoding at startup")
cfg.SceneClassificationModelPath = flag.String("sceneClassificationModelPath", *cfg.SceneClassificationModelPath, "Path to scene classification model")
cfg.DetectContent = flag.Bool("detectContent", *cfg.DetectContent, "Set to true to enable content type detection")

16 changes: 4 additions & 12 deletions cmd/livepeer/starter/starter.go
Original file line number Diff line number Diff line change
@@ -83,7 +83,6 @@ type LivepeerConfig struct {
CurrentManifest *bool
Nvidia *string
Netint *string
TestTranscoder *bool
SceneClassificationModelPath *string
DetectContent *bool
EthAcctAddr *string
@@ -147,7 +146,6 @@ func DefaultLivepeerConfig() LivepeerConfig {
defaultCurrentManifest := false
defaultNvidia := ""
defaultNetint := ""
defaultTestTranscoder := true
defaultDetectContent := false
defaultSceneClassificationModelPath := "tasmodel.pb"

@@ -213,7 +211,6 @@ func DefaultLivepeerConfig() LivepeerConfig {
CurrentManifest: &defaultCurrentManifest,
Nvidia: &defaultNvidia,
Netint: &defaultNetint,
TestTranscoder: &defaultTestTranscoder,
SceneClassificationModelPath: &defaultSceneClassificationModelPath,
DetectContent: &defaultDetectContent,

@@ -387,15 +384,10 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) {
}
glog.Infof("Transcoding on these %v devices: %v", accelName, devices)
// Test transcoding with specified device
if *cfg.TestTranscoder {
transcoderCaps, err = core.TestTranscoderCapabilities(devices, tf)
if err != nil {
glog.Fatal(err)
return
}
} else {
// no capability test was run, assume default capabilities
transcoderCaps = append(transcoderCaps, core.DefaultCapabilities()...)
transcoderCaps, err = core.TestTranscoderCapabilities(devices, tf)
if err != nil {
glog.Fatal(err)
return
}
// initialize Tensorflow runtime on each device to reduce delay when creating new transcoding session
if accel == ffmpeg.Nvidia && *cfg.DetectContent {