Skip to content

Commit

Permalink
Experimenting with probing the pipes (yeah)
Browse files Browse the repository at this point in the history
  • Loading branch information
benpate committed Nov 20, 2024
1 parent 201098c commit ddca57d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/ffmpeg/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ func SetMetadata(input io.Reader, mimeType string, metadata map[string]string, o
args = append(args, values...)
}

add("-f", ffmpegFormat(mimeType)) // specify input format because it can't be deduced from a pipe
add("-i", "pipe:0") // read the input from stdin
add("-f", ffmpegFormat(mimeType)) // specify input format because it can't be deduced from a pipe
add("-probe_size", "5000000") // increase the probe size to 5MB to get more accurate metadata
add("-analyzeduration", "30000000") // increase the analysis duration to 30 seconds to get more accurate metadata
add("-i", "pipe:0") // read the input from stdin

// Special case for cover art
if cover := metadata["cover"]; cover != "" {
Expand Down

0 comments on commit ddca57d

Please sign in to comment.