Fix integer overflow in ft_rendered_size_line
[ilaris-y4m-tools.git] / tools.txt
blobb6ec6efb154a0c481dfcd052220966d8605ba23d
1 Common constructs:
2 ------------------
3 <timespec>: One of:
4         <integer>: Frame number.
5         <decimal>: Point in seconds.
6         [<h>:]<m>:<s>[.<subsec>]: Point decomposed to hours, minutes and seconds.
7 <fps>: One of:
8         <integer>: Integer fps.
9         <integer>/<integer>: Fractional fps.
11 assumefps:
12 ==========
13 Change the fps in stream header without changing the actual stream.
15 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
17 Options:
18 --------
19 --fps=<fps>
20         The new framerate to apply.
22 changefps:
23 ==========
24 Change the fps of stream. Frames are duplicated and dropped. VFR streams become CFR.
26 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
28 Options:
29 --------
30 --fps=<fps>
31         The new framerate to apply.
33 concatenate:
34 ============
35 Output concatenation of multiple streams. Stream parameters (except framerate) must match.
37 If framerates do not match, then the non-matching ones are converted to match.
39 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
41 Options:
42 --------
43 --primary-header=<num>
44         Set from which stream to copy the stream header (first is 0, next is 1, and so on).
45 <filename>
46         Name of file to copy. Use '-' to copy standard input (may be done only once). At least one is required.
48 crop:
49 =====
50 Crop a stream.
52 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
54 Options:
55 --------
56 <x>,<y>,<w>,<h>
57         Crop region of size <w>,<h> starting from <x>,<y>.
58 <x>,<y>,<x2>,<y2>
59         Crop rectangle <x>,<y> to <x2>,<y2>.
61 Notes:
62 ------
63 - If stream is subsampled, offsets and sizes must be integral multiple of block size (x coordinates/sizes even
64   for 422, both x and y coordinates/sizes even for 420).
66 dedup:
67 ======
68 Discard identical frames.
70 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
72 Options:
73 --max=<number>
74         Maximum number of consequtive frames to discard.
76 Notes:
77 ------
78 VFR streams can't be dedupped.
80 ffmpegsource:
81 =============
82 Read file using ffmpeg.
84 Supported chroma: N/A (output RGB)
86 Options:
87 --------
88 --format=<string>
89         Force format.
90 --sar=<num>/<num>
91         Set output SAR.
92 --no-sync
93         Do not attempt to sync video, output each frame once.
94 --ignore-length
95         Ignore reported length of file, read until end of video.
96 <filename>
97         File to read. Exactly one required.
99 Notes:
100 ------
101 - Use --ignore-length for MKV files.
102 - The automatic syncing can create sync problems (or resolve those).
104 fftaa:
105 ======
106 Badly broken FFT-based antialiaser. DON'T USE.
108 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
110 Options:
111 --------
112 --resolution=<w>x<h>
113         Set output resolution.
114 --scale=<x>x<y>
115         Scale down by <x> horizontally and by <y> vertically.
116 --scale=<n>
117         Scale down by <n>.
119 One of options is required.
121 Notes:
122 ------
123 - This filter rings like hell and is not to be used.
125 hdify:
126 ======
127 Point scale stream to HD resolution.
129 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
131 Options:
132 --------
133 --half
134         Only scale to half HD resolution.
136 Notes:
137 ------
138 Scaling to half resolution is to be used with --double option of subsample.
140 imgload:
141 ========
142 Load PNG image as video.
144 Supported chroma: N/A (output RGB)
146 Options:
147 --------
148 --duration=<number>
149 --duration=<number>/<number>
150         Number of seconds image lasts. Default is 2.
152 rawtoy4m:
153 =========
154 Import raw RGB stream and make Y4M wrapper around it.
156 Supported chroma: RGB
158 Options:
159 --------
160 --resolution=<num>x<num>
161         Resolution to use. Required.
162 --fps=<fps>
163         Fps to use.
164 --progressive
165         No interlacing. Default.
166 --interlace=top
167         Interlace top field first.
168 --interlace=bottom
169         Interlace bottom field first.
171 redup:
172 ======
173 Apply timecodes to convert video + timecodes back to CFR.
175 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
177 Options:
178 --------
179 --fps=<fps>
180         Base fps to use.
181 <filename>
182         Timecode file. Exactly one required.
184 Notes:
185 ------
186 - The frame durations in original file are ignored. Each frame is processed according to timecodes in sequence.
187 - Base fps controls the fps used for snapping the frames to and is the fps of resulting stream.
189 resize:
190 =======
191 Resize image.
193 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
195 Options:
196 --------
197 --precorrect
198         Do aspect precorrection. Affects the output resolution and effects changing output SAR to 1:1.
199 --resolution=<num>x<num>
200         Set output resolution.
201 --factor=/<num>
202         Downscale by <num>.
203 --factor=x<num>
204         Upscale by <num>.
205 --factor=/<num>x/<num>
206         Downscale by <num>x<num>.
207 --factor=x<num>xx<num>
208         Upscale by <num>x<num>.
209 --fast-bilinear
210 --bilinear
211 --bicubic
212 --experimential
213 --point
214 --area
215 --bicubic-linear
216 --gauss
217 --sinc
218 --lanczos
219 --spline
220         Set algorithm.
222 If --precorrect is not specified, --resolution or --factor is required.
224 rgbtoyuv:
225 =========
226 Convert RGB stream to YUV444.
228 Supported chroma: RGB (output 444 or 444p16)
230 Options:
231 --------
232 --matrix=<matrix>
233         Set matrix to use. Valid values are 'pc601', 'rec601', 'pc709', 'rec709'. Default is 'rec601'.
234 --8bit
235         Output 444 instead of 444p16.
238 subsample:
239 ==========
240 Subsample 444 to 420.
242 Supported chroma: 444, 444p16 (output 420 or 420p16).
244 Options:
245 --------
246 --16bit
247         Output 420p16 instead of 420.
248 --bilinear
249         Use bilinear downsampling for chroma.
250 --double
251         Convert by upscaling luma 2x using point scaling and leaving chroma alone.
253 subtitle:
254 =========
255 Add subtitles.
257 Supported chroma: RGB, 444, 444p16
259 Options:
260 --------
261 --font-file=<file>
262         Set font file to use. Required for text rendering.
263 --font-size=<int>
264         Set font size.
265 --text_alignment=left
266 --text_alignment=center
267 --text_alignment=right
268         Set inter-line text alignment.
269 --text_alignment=<num>
270         Set text alignment on range -1000...1000.
271 --text-spacing=<num>
272         Set number padding pixels betweeen rows.
273 --font-face=<num>
274         Set font face withing font file.
275 --fg-color=<r>,<g>,<b>[,<a>]
276         Set font foreground color. Alpha range is 0-256.
277 --bg-color=<r>,<g>,<b>[,<a>]
278         Set font background color. Alpha range is 0-256.
279 --halo-color=<r>,<g>,<b>[,<a>]
280         Set font halo color. Alpha range is 0-256.
281 --fg-alpha=<num>
282         Set font foreground alpha (0-256).
283 --bg-alpha=<num>
284         Set font background alpha (0-256).
285 --halo-alpha=<num>
286         Set font halo alpha (0-256).
287 --halo-thickness=<num>
288         Set font halo thickness.
289 --text=<timespec>,<text>
290         Render text starting at given time. '\' is escaped as '\\'. Linefeed is escaped as '\n'.
291 --file=<timespec>,<filename>
292         Read raw text to render from <filename>.
293 --png=<timespec>,<filename>
294         Read PNG image to render from specified file. Text rendering options have no effect.
295 --duration=<timespec>
296         Set duration of subtitle.
297 --xpos=left
298 --xpos=center
299 --xpos=right
300 --xpos=abs:<coordinate>
301 --xpos=<relative>
302         Set x-position of the subtitle. The last form has -1000 be the same as left and 1000 the same as right.
303 --ypos=top
304 --ypos=center
305 --ypos=bottom
306 --ypos=abs:<coordinate>
307 --ypos=<relative>
308         Set y-position of the subtitle. The last form has -1000 be the same as top and 1000 the same as bottom.
310 Notes:
311 ------
312 - If applied to 444 stream, converts RGB values to YUV according to the matrix used (rec601 if unknown).
314 timeshow:
315 =========
316 Show progress.
318 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
320 Options:
321 --------
322 --interval=<seconds>
323         Set number of seconds between showing progress messages.
325 truncate:
326 =========
327 Truncate streams.
329 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16
331 Options:
332 --------
333 --start=<timespec>
334         Starting point to cut.
335 --end=<timespec>
336         Ending point to cut.
338 vflip:
339 ======
340 Flip the image vertically.
342 Supported chroma: RGB, 420, 420p16, 422, 422p16, 444, 444p16