Skip to content

Commit

Permalink
fix: Segment duration while packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioabreu committed Apr 26, 2024
1 parent 4dd2da4 commit a0a0a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/service/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (g *GPACCommand) Execute() error {
args = append(args, fmt.Sprintf("@%d", i))
}

args = append(args, "-o", fmt.Sprintf("%s/%s/index.m3u8:segdur=2:dmode=dynamic:profile=live:muxtype=ts", g.Output, g.ID))
args = append(args, "-o", fmt.Sprintf("%s/%s/index.m3u8:segdur=%d:dmode=dynamic:profile=live:muxtype=ts", g.Output, g.ID, defaultSegmentDuration))

log.Printf("Executing gpac command: %s", strings.Join(args, " "))

Expand Down
2 changes: 1 addition & 1 deletion internal/service/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestGPACCommandExecute(t *testing.T) {
"@@", "c=avc:b=2000k",
"@@", "c=aac:b=128k",
"@", "@1", "@2",
"-o", "/output/1234/index.m3u8:segdur=2:dmode=dynamic:profile=live:muxtype=ts",
"-o", "/output/1234/index.m3u8:segdur=3:dmode=dynamic:profile=live:muxtype=ts",
}
assert.Equal(t, expectedArgs, args)
return nil
Expand Down

0 comments on commit a0a0a7c

Please sign in to comment.