Skip to content

Commit

Permalink
Add skipcat flag to watch subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Jan 24, 2024
1 parent ac5bde0 commit 3be1e3a
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions markut.go
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ func pruneSubcommand(args []string) bool {
func watchSubcommand(args []string) bool {
subFlag := flag.NewFlagSet("watch", flag.ContinueOnError)
markutPtr := subFlag.String("markut", "", "Path to the Markut file with markers (mandatory)")
skipcatPtr := subFlag.Bool("skipcat", false, "Skip concatenation step")

err := subFlag.Parse(args)

Expand Down Expand Up @@ -1046,18 +1047,21 @@ func watchSubcommand(args []string) bool {
return false
}

listPath := "final-list.txt"
err = ffmpegGenerateConcatList(context.chunks, listPath)
if err != nil {
fmt.Printf("ERROR: Could not generate final concat list %s: %s\n", listPath, err)
return false;
}
if !*skipcatPtr {

outputPath := "output.mp4"
err = ffmpegConcatChunks(listPath, outputPath)
if err != nil {
fmt.Printf("ERROR: Could not generated final output %s: %s\n", outputPath, err)
return false
listPath := "final-list.txt"
err = ffmpegGenerateConcatList(context.chunks, listPath)
if err != nil {
fmt.Printf("ERROR: Could not generate final concat list %s: %s\n", listPath, err)
return false;
}

outputPath := "output.mp4"
err = ffmpegConcatChunks(listPath, outputPath)
if err != nil {
fmt.Printf("ERROR: Could not generated final output %s: %s\n", outputPath, err)
return false
}
}

context.PrintSummary()
Expand Down

0 comments on commit 3be1e3a

Please sign in to comment.