Skip to content

Commit

Permalink
Include blur into the chunk file name
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Dec 21, 2023
1 parent d1e2d41 commit 686453e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion markut.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ const ChunksFolder = "chunks"

func (chunk Chunk) Name() string {
inputPath := strings.ReplaceAll(chunk.InputPath, "/", "_")
return fmt.Sprintf("%s/%s-%09d-%09d.mp4", ChunksFolder, inputPath, chunk.Start, chunk.End)
sb := strings.Builder{}
fmt.Fprintf(&sb, "%s/%s-%09d-%09d", ChunksFolder, inputPath, chunk.Start, chunk.End)
if chunk.Blur {
sb.WriteString("-blur")
}
sb.WriteString(".mp4")
return sb.String()
}

func (chunk Chunk) Duration() Millis {
Expand Down

0 comments on commit 686453e

Please sign in to comment.