21 {
22
23 {"color-filter",
24 '\0',
25 OPTION_TYPE_CALLBACK,
26 offsetof(options_t, color_filter),
27 &default_color_filter_value,
28 sizeof(color_filter_t),
29 "Apply a monochromatic color tint to grayscale video. Values: none, black, white, green, magenta, fuchsia, "
30 "orange, teal, cyan, pink, red, yellow, rainbow. Using --color-filter automatically sets --color-mode to mono.",
31 "DISPLAY",
32 NULL,
33 false,
34 "ASCII_CHAT_COLOR_FILTER",
35 NULL,
37 false,
38 false,
39 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
43 .input_type = OPTION_INPUT_ENUM},
44 NULL},
45 {"render-mode",
46 'M',
47 OPTION_TYPE_CALLBACK,
48 offsetof(options_t, render_mode),
49 &default_render_mode_value,
50 sizeof(render_mode_t),
51 "Render mode of text for your client to display. Values: foreground, background, half-block. Press 'r' during "
52 "rendering to cycle.",
53 "DISPLAY",
54 NULL,
55 false,
56 "ASCII_CHAT_RENDER_MODE",
57 NULL,
59 false,
60 false,
61 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
65 .input_type = OPTION_INPUT_ENUM},
66 NULL},
67 {"palette",
68 'P',
69 OPTION_TYPE_CALLBACK,
70 offsetof(options_t, palette_type),
71 &default_palette_type_value,
72 sizeof(palette_type_t),
73 "Palette type with which to render images to text art. Values: standard, blocks, digital, minimal, cool, "
74 "custom. All but \"custom\" are built-in presets that all look different and nice. Try them out!",
75 "DISPLAY",
76 NULL,
77 false,
78 "ASCII_CHAT_PALETTE",
79 NULL,
81 false,
82 false,
83 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
87 .input_type = OPTION_INPUT_ENUM},
88 NULL},
89 {"palette-chars",
90 'C',
91 OPTION_TYPE_CALLBACK,
92 offsetof(options_t, palette_custom),
93 "",
94 0,
95 "Ordered sequence of characters from darkest to brightest to use with custom palette (--palette=custom) for "
96 "rendering images to text art for your client. These characters only will be used to create the rendered output. "
97 "Can be UTF-8 content (see --utf8).",
98 "DISPLAY",
99 "STRING",
100 false,
101 "ASCII_CHAT_PALETTE_CHARS",
102 NULL,
104 false,
105 false,
106 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
107 {0},
108 NULL},
109 {"stretch",
110 '\0',
111 OPTION_TYPE_BOOL,
112 offsetof(options_t, stretch),
113 &default_stretch_value,
115 "Allow aspect ratio distortion of image for rendering ascii output. This can allow the rendered ascii to fill "
116 "your terminal.",
117 "DISPLAY",
118 NULL,
119 false,
120 "ASCII_CHAT_STRETCH",
121 NULL,
122 NULL,
123 false,
124 false,
125 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
126 {0},
127 NULL},
128 {"fps",
129 '\0',
130 OPTION_TYPE_INT,
131 offsetof(options_t, fps),
132 &default_fps_value,
133 sizeof(int),
134 "Target framerate for rendering (1-144).",
135 "DISPLAY",
136 NULL,
137 false,
138 "ASCII_CHAT_FPS",
139 NULL,
140 NULL,
141 false,
142 false,
143 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
144 {.numeric_range = {1, 144, 1}, .examples =
g_fps_examples, .input_type = OPTION_INPUT_NUMERIC},
145 NULL},
146 {"snapshot",
147 'S',
148 OPTION_TYPE_BOOL,
149 offsetof(options_t, snapshot_mode),
150 &default_snapshot_mode_value,
152 "Snapshot mode (one frame and exit).",
153 "DISPLAY",
154 NULL,
155 false,
156 "ASCII_CHAT_SNAPSHOT",
157 NULL,
158 NULL,
159 false,
160 false,
161 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
162 {0},
163 NULL},
164 {"snapshot-delay",
165 'D',
166 OPTION_TYPE_DOUBLE,
167 offsetof(options_t, snapshot_delay),
168 &default_snapshot_delay_value,
169 sizeof(double),
170 "Snapshot delay in seconds. The timer starts right before the client-side program prints the first frame. "
171 "--snapshot --snapshot-delay=0 will print the first frame and exit.",
172 "DISPLAY",
173 "SECONDS",
174 false,
175 "ASCII_CHAT_SNAPSHOT_DELAY",
176 NULL,
177 NULL,
178 false,
179 false,
180 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
181 {.numeric_range = {0, 3600, 0}, .input_type = OPTION_INPUT_NUMERIC},
182 NULL},
183 {"matrix",
184 '\0',
185 OPTION_TYPE_BOOL,
186 offsetof(options_t, matrix_rain),
187 &default_matrix_rain_value,
189 "Enable Matrix-style digital rain effect. Works with --render-mode truecolor|256 and --color-filter [color].",
190 "DISPLAY",
191 NULL,
192 false,
193 "ASCII_CHAT_MATRIX",
194 NULL,
195 NULL,
196 false,
197 false,
198 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
199 {0},
200 NULL},
201 {"flip-x",
202 '\0',
203 OPTION_TYPE_BOOL,
204 offsetof(options_t, flip_x),
205 &default_flip_x_value,
207 "Flip video horizontally (X-axis). Works with webcam, files, and streams. Note: Ignored for webcam on macOS "
208 "(respects platform default like FaceTime).",
209 "DISPLAY",
210 NULL,
211 false,
212 "ASCII_CHAT_FLIP_X",
213 NULL,
214 NULL,
215 false,
216 false,
217 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
218 {0},
219 NULL},
220 {"flip-y",
221 '\0',
222 OPTION_TYPE_BOOL,
223 offsetof(options_t, flip_y),
224 &default_flip_y_value,
226 "Flip video vertically (Y-axis). Works with webcam, files, and streams.",
227 "DISPLAY",
228 NULL,
229 false,
230 "ASCII_CHAT_FLIP_Y",
231 NULL,
232 NULL,
233 false,
234 false,
235 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
236 {0},
237 NULL},
238
239 REGISTRY_TERMINATOR()};
bool parse_render_mode(const char *arg, void *dest, char **error_msg)
bool parse_palette_type(const char *arg, void *dest, char **error_msg)
bool parse_color_filter(const char *arg, void *dest, char **error_msg)
bool parse_palette_chars(const char *arg, void *dest, char **error_msg)