ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
media.c File Reference

Media file and stream options. More...

Go to the source code of this file.

Variables

const registry_entry_t g_media_entries []
 

Detailed Description

Media file and stream options.

Options for streaming from media files, URLs, seeking, looping, and cookie handling for streaming services.

Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file media.c.

Variable Documentation

◆ g_media_entries

const registry_entry_t g_media_entries[]

Definition at line 21 of file media.c.

21 {
22 // Media File Streaming Options
23 {"file",
24 'f',
25 OPTION_TYPE_STRING,
26 offsetof(options_t, media_file),
27 "",
28 0,
29 "Stream from media file or stdin (use '-' for stdin). Supported formats: see man ffmpeg-formats; codecs: see man "
30 "ffmpeg-codecs",
31 "MEDIA",
32 NULL,
33 false,
34 "ASCII_CHAT_FILE",
35 NULL,
36 NULL,
37 false,
38 false,
39 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
40 {0},
41 NULL},
42 {"url",
43 'u',
44 OPTION_TYPE_STRING,
45 offsetof(options_t, media_url),
46 "",
47 0,
48 "Stream from network URL. Direct HTTP/HTTPS/RTSP streams use FFmpeg; complex sites (YouTube, TikTok, etc.) use "
49 "yt-dlp. Supported formats: see man ffmpeg-formats; codecs: see man ffmpeg-codecs; sites: yt-dlp "
50 "https://github.com/yt-dlp/yt-dlp/blob/master/README.md#supported-sites",
51 "MEDIA",
52 NULL,
53 false,
54 "ASCII_CHAT_URL",
55 NULL,
56 NULL,
57 false,
58 false,
59 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
60 {0},
61 NULL},
62 {"loop",
63 'l',
64 OPTION_TYPE_BOOL,
65 offsetof(options_t, media_loop),
66 &default_media_loop_value,
67 sizeof(bool),
68 "Loop media file playback (not supported for --url).",
69 "MEDIA",
70 NULL,
71 false,
72 "ASCII_CHAT_LOOP",
73 NULL,
74 NULL,
75 false,
76 false,
77 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
78 {0},
79 NULL},
80 {"pause",
81 '\0',
82 OPTION_TYPE_BOOL,
83 offsetof(options_t, pause),
84 &default_pause_value,
85 sizeof(bool),
86 "Start playback paused (toggle with spacebar, requires --file or --url).",
87 "MEDIA",
88 NULL,
89 false,
90 "ASCII_CHAT_PAUSE",
91 NULL,
92 NULL,
93 false,
94 false,
95 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
96 {0},
97 NULL},
98 {"seek",
99 's',
100 OPTION_TYPE_CALLBACK,
101 offsetof(options_t, media_seek_timestamp),
102 &default_media_seek_value,
103 sizeof(double),
104 "Seek to timestamp before playback (format: seconds, MM:SS, or HH:MM:SS.ms).",
105 "MEDIA",
106 NULL,
107 false,
108 "ASCII_CHAT_SEEK",
109 NULL,
111 false,
112 false,
113 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
114 {.examples = g_seek_examples, .input_type = OPTION_INPUT_STRING},
115 NULL},
116 {"yt-dlp-options",
117 '\0',
118 OPTION_TYPE_STRING,
119 offsetof(options_t, yt_dlp_options),
120 NULL,
121 sizeof(((options_t *)0)->yt_dlp_options),
122 "Arbitrary yt-dlp options passed to the extraction subprocess for URL resolution. "
123 "Examples: \"--no-warnings\" or \"--proxy socks5://127.0.0.1:1080\" or \"--cookies-from-browser=firefox\"",
124 "MEDIA",
125 NULL,
126 false,
127 "ASCII_CHAT_YT_DLP_OPTIONS",
128 NULL,
129 NULL,
130 false,
131 false,
132 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
133 {0},
134 NULL},
135
136 REGISTRY_TERMINATOR()};
const char * g_seek_examples[]
Definition metadata.c:147
bool parse_timestamp(const char *arg, void *dest, char **error_msg)
Custom parser for –seek flag.
Definition parsers.c:890
#define bool
Definition stdbool.h:22