|
|
|
@ -3,6 +3,7 @@ package main |
|
|
|
|
import ( |
|
|
|
|
"fmt" |
|
|
|
|
"os" |
|
|
|
|
"path/filepath" |
|
|
|
|
"strconv" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -22,6 +23,7 @@ func main() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sourceFile := os.Args[1] |
|
|
|
|
fileExt := filepath.Ext(sourceFile) |
|
|
|
|
|
|
|
|
|
numCopies, err := strconv.Atoi(os.Args[2]) |
|
|
|
|
if err != nil || numCopies <= 0 { |
|
|
|
@ -50,12 +52,12 @@ func main() { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fmt.Fprintf(os.Stdout, "Generating:\n %d copies of %s\n %d random bytes of data\n %d interations(s)\n Chance to random %d%%\n\n", |
|
|
|
|
numCopies, sourceFile, shitSize, iterations, chanceToRandom) |
|
|
|
|
fmt.Fprintf(os.Stdout, "Generating:\n %d copies of %s\n %d random bytes of data\n %d interations(s)\n Chance to random %d%%\n File Extention: %s\n\n", |
|
|
|
|
numCopies, sourceFile, shitSize, iterations, chanceToRandom, fileExt) |
|
|
|
|
|
|
|
|
|
makeOutputDir() |
|
|
|
|
defer clearOutputDir() |
|
|
|
|
|
|
|
|
|
generateGlitchedSequence(sourceFile, numCopies, shitSize, iterations, int32(chanceToRandom)) |
|
|
|
|
ffmpegGenerateMP4() |
|
|
|
|
generateGlitchedSequence(sourceFile, fileExt, numCopies, shitSize, iterations, int32(chanceToRandom)) |
|
|
|
|
ffmpegGenerateMP4(fileExt) |
|
|
|
|
} |
|
|
|
|