Codebase list ffcvt / cc264d78-c65e-4e59-8faf-ffd6ee9991ee/main ffcvt_cli.yaml
cc264d78-c65e-4e59-8faf-ffd6ee9991ee/main

Tree @cc264d78-c65e-4e59-8faf-ffd6ee9991ee/main (Download .tar.gz)

ffcvt_cli.yaml @cc264d78-c65e-4e59-8faf-ffd6ee9991ee/mainraw · history · blame

# easygen data driven file for ffcvt commandline handling
#
# easygen -tf $GOPATH/src/github.com/go-easygen/easygen/test/commandlineFlag ffcvt_cli | sed '/\tAES\t\tstring/{ N; N; N; N; N; s|^.*$|\tEncoding\t// anonymous field to hold encoding values|; }; /\tExt\t\tstring/d; ' | gofmt > config.go
#
# Ref, old code log:
# ... | sed -n '/ The Options struct /{N; N; N; N; N; N; N; p; q; }' | tee -a structEnc.go

# program name, name for the executable
ProgramName: ffcvt

# package name
# - For standalone program that does not belong to any package, e.g., 
#   https://github.com/suntong001/easygen/blob/7791e4f0e5605543d27da1671a21376cdb9dcf2a/easygen/easygen.go
#   just ignore the first line, the `package` output, and copy the rest
# - If you don't mind using a separated file to handle commandline paramters,
#   then name the package as "main". see the spin-out "TF-minus1.go" file under
#   https://github.com/suntong001/easygen/tree/d1ab0b5fe80ddac57fe9ef51f6ccb3ab998cd5ee
# - If you are using it in a pacakge, look no further than
#   https://github.com/suntong001/easygen/blob/master/easygenapi/config.go
#   which was a direct dump: easygen test/commandlineFlag > easygenapi/config.go
#
PackageName: main

# Name of the structure to hold the values for/from commandline
StructName: Options
# The actual variable that hold the commandline paramter values
StructVar: Opts

Options:

  # Basic fields for encoding
  
  - Name: Target
    Type: string
    Flag: t
    Value: '"webm"'
    Usage: "target type: webm/x265-opus/x264-mp3/youtube"

  - Name: VES
    Type: string
    Flag: ves
    Value: '""'
    Usage: "video encoding method set"

  - Name: AES
    Type: string
    Flag: aes
    Value: '""'
    Usage: "audio encoding method set"

  - Name: SES
    Type: string
    Flag: ses
    Value: '""'
    Usage: "subtitle encoding method set"

  - Name: VEP
    Type: string
    Flag: vep
    Value: '""'
    Usage: "video encoding method prepend"

  - Name: AEP
    Type: string
    Flag: aep
    Value: '""'
    Usage: "audio encoding method prepend"

  - Name: SEP
    Type: string
    Flag: sep
    Value: '""'
    Usage: "subtitle encoding method prepend"

  - Name: VEA
    Type: string
    Flag: vea
    Value: '""'
    Usage: "video encoding method append"

  - Name: AEA
    Type: string
    Flag: aea
    Value: '""'
    Usage: "audio encoding method append"

  - Name: ABR
    Type: string
    Flag: abr
    Value: '""'
    Usage: "audio bitrate (64k for opus, 256k for mp3)"

  - Name: CRF
    Type: string
    Flag: crf
    Value: '""'
    Usage: "the CRF value: 0-51. Higher CRF gives lower quality\\n\\t (28 for x265, ~ 23 for x264)"

  - Name: SEPARATOR
  
  # Optional parameters that controls the encoding
  
  - Name: Directory
    Type: string
    Flag: d
    Value: '""'
    Usage: "directory that hold input files"
    
  - Name: File
    Type: string
    Flag: f
    Value: '""'
    Usage: "input file name (either -d or -f must be specified)"
    
  - Name: Links
    Type: bool
    Flag: sym
    Value: false
    Usage: symlinks will be processed as well

#  - Name: File
#    Type: string
#    Flag: fs
#    Value: '""'
#    Usage: "file supplements, more files to encode (in form of: -i f2 -i f3...)"

  - Name: Exts
    Type: string
    Flag: exts
    Value: '".3GP.3G2.ASF.AVI.DAT.DIVX.FLV.M2TS.M4V.MKV.MOV.MPEG.MP4.MPG.RMVB.RM.TS.VOB.WEBM.WMV"'
    Usage: "extension list for all the files to be queued"

  - Name: Suffix
    Type: string
    Flag: suf
    Value: '""'
    Usage: "suffix to the output file names"

  - Name: Ext
    Type: string
    Flag: ext
    Value: '""'
    Usage: "extension for the output file"

  - Name: WDirectory
    Type: string
    Flag: w
    Value: '""'
    Usage: "work directory that hold output files"

  - Name: SEPARATOR

  - Name: AC
    Type: bool
    Flag: ac
    Value: false
    Usage: copy audio codec

  - Name: VC
    Type: bool
    Flag: vc
    Value: false
    Usage: copy video codec

  - Name: AN
    Type: bool
    Flag: an
    Value: false
    Usage: no audio, output video only

  - Name: VN
    Type: bool
    Flag: vn
    Value: false
    Usage: no video, output audio only

  - Name: VSS
    Type: bool
    Flag: vss
    Value: true
    Usage: "video: same size"

  - Name: Lang
    Type: string
    Flag: lang
    Value: '"eng"'
    Usage: "language selection for audio stream extraction"

  - Name: OptExtra
    Type: string
    Flag: o
    Value: '""'
    Usage: "more options that will pass to ffmpeg program"
    
  - Name: A2Opus
    Type: bool
    Flag: ato-opus
    Value: false
    Usage: "audio encode to opus, using -abr"

  - Name: V2X265
    Type: bool
    Flag: vto-x265
    Value: false
    Usage: "video video encode to x265, using -crf"

  - Name: SEPARATOR

  - Name: Par2C
    Type: bool
    Flag: "p"
    Value: false
    Usage: "par2create, create par2 files (in work directory)"

  - Name: NoClobber
    Type: bool
    Flag: nc
    Value: false
    Usage: "no clobber, do not queue those already been converted"

  - Name: NoExec
    Type: bool
    Flag: "n"
    Value: false
    Usage: "no exec, dry run"

  - Name: SEPARATOR

  - Name: Force
    Type: bool
    Flag: force
    Value: false
    Usage: overwrite any existing none-empty file

  - Name: Debug
    Type: int
    Flag: debug
    Value: 1
    Usage: debugging level
    
  - Name: FFMpeg
    Type: string
    Flag: ffmpeg
    Value: '"ffmpeg"'
    Usage: "ffmpeg program executable name"

  - Name: FFProbe
    Type: string
    Flag: ffprobe
    Value: '"ffprobe -print_format flat"'
    Usage: "ffprobe program execution"

  - Name: PrintV
    Type: bool
    Flag: "version"
    Value: false
    Usage: "print version then exit"


# Use the USAGE_SUMMARY in Usage help
UsageSummary: "TRUE"

UsageLead: "\\nUsage:\\n %s [flags] \\n\\nFlags:\\n\\n"

UsageEnd: "\\nTo reduce output, use `-debug 0`, e.g., `ffcvt -force -debug 0 -f testf.mp4 ...`\\n"