Skip to content

Commit fb2b822

Browse files
SaxSax
authored andcommitted
add gop_num_b_frames to preset
1 parent e4983dc commit fb2b822

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

presets.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type Preset struct {
5959
VideoBitrate string `xml:"video_description>h264_settings>bitrate,omitempty"`
6060
GopSize string `xml:"video_description>h264_settings>gop_size,omitempty"`
6161
GopMode string `xml:"video_description>h264_settings>gop_mode,omitempty"`
62+
GopNumBFrames string `xml:"video_description>h264_settings>gop_num_b_frames,omitempty"`
6263
Profile string `xml:"video_description>h264_settings>profile,omitempty"`
6364
ProfileLevel string `xml:"video_description>h264_settings>level,omitempty"`
6465
RateControl string `xml:"video_description>h264_settings>rate_control_mode,omitempty"`

presets_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func TestGetPreset(t *testing.T) {
186186
AudioBitrate: "128000",
187187
GopSize: "80",
188188
GopMode: "fixed",
189+
GopNumBFrames: "0",
189190
Profile: "Baseline",
190191
ProfileLevel: "3",
191192
RateControl: "ABR",
@@ -339,6 +340,7 @@ func TestGetPresetForHls(t *testing.T) {
339340
AudioBitrate: "64000",
340341
GopSize: "90",
341342
GopMode: "fixed",
343+
GopNumBFrames: "2",
342344
Profile: "Main",
343345
ProfileLevel: "3.1",
344346
RateControl: "VBR",
@@ -476,6 +478,7 @@ func TestCreatePreset(t *testing.T) {
476478
AudioBitrate: "64000",
477479
GopSize: "90",
478480
GopMode: "fixed",
481+
GopNumBFrames: "2",
479482
Profile: "Main",
480483
ProfileLevel: "3.1",
481484
RateControl: "VBR",

0 commit comments

Comments
 (0)