Skip to content

Commit

Permalink
add skip confidence to killed ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Oct 26, 2021
1 parent 71c127c commit 97c059f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ var rootCmd = &cobra.Command{

if lastReport != nil {
if int64(lastReport.TotalSize) > metadata.Format.SizeInt() {

log.Infof("Kept original %s: %s < %s",
fileName,
utils.BytesHumanReadable(metadata.Format.SizeInt()),
Expand All @@ -156,6 +155,16 @@ var rootCmd = &cobra.Command{

notifications.NotifyEnd(nil, lastReport, models.ResultKeepOriginal)
}

skipConfidence := utils.SkipConfidenceMeta(metadata, lastReport.Frame, lastReport.TotalSize)
if skipConfidence > viper.GetFloat64("skip-confidence") {
log.Infof("Kept original %s: Skip confidence of %.2f",
fileName,
skipConfidence,
)

notifications.NotifyEnd(nil, lastReport, models.ResultKeepOriginal)
}
}

continue
Expand Down

0 comments on commit 97c059f

Please sign in to comment.