Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Commit 2717628

Browse files
authored
bitmovin: default encoding mode to single pass unless twoPass is defined (#133)
1 parent 54cc631 commit 2717628

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

provider/bitmovin/internal/configuration/codec/h264.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ func h264ConfigFrom(preset db.Preset) (model.H264VideoConfiguration, error) {
9898
cfg.SceneCutThreshold = int32ToPtr(int32(0))
9999
}
100100

101+
cfg.EncodingMode = model.EncodingMode_SINGLE_PASS
102+
if preset.TwoPass {
103+
cfg.EncodingMode = model.EncodingMode_TWO_PASS
104+
}
105+
101106
return cfg, nil
102107
}
103108

provider/bitmovin/internal/configuration/codec/h265.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ func h265ConfigFrom(preset db.Preset) (model.H265VideoConfiguration, error) {
103103
}
104104
}
105105

106+
cfg.EncodingMode = model.EncodingMode_SINGLE_PASS
107+
if preset.TwoPass {
108+
cfg.EncodingMode = model.EncodingMode_TWO_PASS
109+
}
110+
106111
return cfg, nil
107112
}
108113

provider/bitmovin/internal/configuration/codec/vp8.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,10 @@ func vp8ConfigFrom(preset db.Preset) (model.Vp8VideoConfiguration, error) {
5353
}
5454
cfg.Bitrate = bitrate
5555

56+
cfg.EncodingMode = model.EncodingMode_SINGLE_PASS
57+
if preset.TwoPass {
58+
cfg.EncodingMode = model.EncodingMode_TWO_PASS
59+
}
60+
5661
return cfg, nil
5762
}

0 commit comments

Comments
 (0)