-
Notifications
You must be signed in to change notification settings - Fork 2
/
ffcvt_cli.yaml
333 lines (271 loc) · 7.28 KB
/
ffcvt_cli.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# 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: Cfg
Type: string
Flag: cfg
Value: '""'
Usage: "cfg file to define your own targets: webm/wx/youtube etc"
- Name: Target
Type: string
Flag: t
Value: '"webm"'
Usage: "target type: webm/x265-opus/x264-mp3/wx/youtube/copy, or empty"
- 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: Cut
Type: mFlags
Flag: C,Cut
Value: '""'
Usage: "Cut segment(s) out to keep. Specify in the form of start-[end],\\n\\tstrictly in the format of hh:mm:ss, and may repeat"
- Name: Seg
Type: string
Flag: S,Seg
Value: '""'
Usage: "Split video into multiple segments (strictly in format: hh:mm:ss)"
- Name: Speed
Type: string
Flag: Speed
Value: '""'
Usage: "Speed up/down video playback speed (e.g. 1.28)"
- Name: Karaoke
Type: bool
Flag: K,karaoke
Value: false
Usage: "Add a karaoke audio track to .mp4 MTV"
- Name: TranspFrom
Type: string
Flag: tkf
Value: '""'
Usage: "Transpose song's key from (e.g. C/C#/Db/D etc)"
- Name: TranspTo
Type: string
Flag: tkt
Value: '""'
Usage: "Transpose song's key to (e.g. -tkf C -tkt Db)"
- Name: TranspBy
Type: int
Flag: tkb
Value: 0
Usage: "Transpose song by (e.g. +2, -3, etc) chromatic scale"
- Name: Lang
Type: string
Flag: lang
Value: '"eng"'
Usage: "language selection for audio stream extraction"
- Name: SEL
Type: mFlags
Flag: sel
Value: '""'
Usage: "subtitle encoding language (language picked for reencoded video)"
- 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: BreathTime
Type: duration
Flag: bt
Value: '120*time.Second'
Usage: "breath time, interval between conversion to take a breath"
- Name: MaxC
Type: int
Flag: maxc
Value: 0
Usage: max conversion done each run (default no limit)
- 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: |
To reduce output, use '-debug 0', e.g., 'ffcvt -force -debug 0 -f testf.mp4 ...'