support ffmpeg-args flag
This commit is contained in:
parent
d14376431e
commit
9d8856db58
1 changed files with 3 additions and 1 deletions
4
main.go
4
main.go
|
@ -13,6 +13,7 @@ type CliFlags struct {
|
||||||
outputFileName string
|
outputFileName string
|
||||||
manifestFileName string
|
manifestFileName string
|
||||||
userAgent string
|
userAgent string
|
||||||
|
ffmpegArgs string
|
||||||
verbose bool
|
verbose bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ func ugoira2videoCmd(args []string, flags CliFlags) {
|
||||||
die("Could not read manifest: %s", err)
|
die("Could not read manifest: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ugoira2video(decodeUgoiraManifest(manifestData), ugoiraFileName, flags.outputFileName)
|
err = ugoira2video(decodeUgoiraManifest(manifestData), ugoiraFileName, flags.outputFileName, flags.ffmpegArgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
die("Conversion failed: %s", err)
|
die("Conversion failed: %s", err)
|
||||||
}
|
}
|
||||||
|
@ -166,6 +167,7 @@ func main() {
|
||||||
|
|
||||||
u2vCmd := flag.NewFlagSet("u2v", flag.ExitOnError)
|
u2vCmd := flag.NewFlagSet("u2v", flag.ExitOnError)
|
||||||
u2vCmd.StringVar(&flags.outputFileName, "o", "", "Converted Ugoira output file")
|
u2vCmd.StringVar(&flags.outputFileName, "o", "", "Converted Ugoira output file")
|
||||||
|
u2vCmd.StringVar(&flags.ffmpegArgs, "ffmpeg-args", "", "Arguments to be supplied to FFmpeg")
|
||||||
|
|
||||||
if len(os.Args) < 2 {
|
if len(os.Args) < 2 {
|
||||||
die("expected command")
|
die("expected command")
|
||||||
|
|
Loading…
Add table
Reference in a new issue