Skip to content

Commit

Permalink
fix(concat): mpegts are application/octet-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Aug 25, 2024
1 parent 6b48df4 commit 02a2032
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions video/concat/concat.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func Do(ctx context.Context, output string, inputs []string, opts ...Option) err
}

if len(validInputs) == 0 {
log.Warn().Msg("no valid inputs")
log.Error().Msg("no valid inputs")
return nil
}

Expand Down Expand Up @@ -301,7 +301,14 @@ func WithPrefix(ctx context.Context, remuxFormat string, prefix string, opts ...
panic(err)
}
if !strings.HasPrefix(mtype.String(), "video/") &&
!strings.HasPrefix(mtype.String(), "audio/") {
!strings.HasPrefix(
mtype.String(),
"audio/",
) && mtype.String() != "application/octet-stream" {
log.Warn().
Str("file", input).
Stringer("mime", mtype).
Msg("file is not a valid video or audio file")
continue
}

Expand Down

0 comments on commit 02a2032

Please sign in to comment.