Quit on eof, was broken by r17150
[mplayer/glamo.git] / cfg-mencoder.h
blob64b821edc5c7fd04afcd0f10574f204d39c5baef
2 /*
3 * config for cfgparser
4 */
6 #include "cfg-common.h"
8 #ifdef USE_FAKE_MONO
9 extern int fakemono; // defined in dec_audio.c
10 #endif
12 extern int sws_flags;
13 extern int readPPOpt(void *, char *arg);
14 extern void revertPPOpt(void *conf, char* opt);
15 extern char *pp_help;
17 #ifdef HAVE_MP3LAME
18 extern m_option_t lameopts_conf[];
19 #endif
21 #ifdef USE_LIBAVCODEC
22 extern m_option_t lavcopts_conf[];
23 #endif
25 #ifdef HAVE_TOOLAME
26 extern m_option_t toolameopts_conf[];
27 #endif
29 #ifdef HAVE_TWOLAME
30 extern m_option_t twolameopts_conf[];
31 #endif
33 #ifdef HAVE_FAAC
34 extern m_option_t faacopts_conf[];
35 #endif
37 #ifdef USE_WIN32DLL
38 extern m_option_t vfwopts_conf[];
39 #endif
41 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
42 extern m_option_t xvidencopts_conf[];
43 #endif
45 #if defined(HAVE_X264)
46 extern m_option_t x264encopts_conf[];
47 #endif
49 extern m_option_t nuvopts_conf[];
50 extern m_option_t mpegopts_conf[];
51 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
52 extern m_option_t lavfopts_conf[];
53 #endif
55 m_option_t ovc_conf[]={
56 {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
57 {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
58 {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
59 // {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
60 {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
61 {"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
62 {"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
63 {"xvid", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_XVID, NULL},
64 {"qtvideo", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_QTVIDEO, NULL},
65 {"nuv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NUV, NULL},
66 {"x264", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_X264, NULL},
67 {"help", "\nAvailable codecs:\n"
68 " copy - frame copy, without re-encoding. Doesn't work with filters.\n"
69 " frameno - special audio-only file for 3-pass encoding, see DOCS.\n"
70 " raw - uncompressed video. Use fourcc option to set format explicitly.\n"
71 " nuv - nuppel video\n"
72 #ifdef USE_LIBAVCODEC
73 " lavc - libavcodec codecs - best quality!\n"
74 #endif
75 #ifdef USE_WIN32DLL
76 " vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
77 " qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
78 #endif
79 #ifdef HAVE_LIBDV095
80 " libdv - DV encoding with libdv v0.9.5\n"
81 #endif
82 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
83 " xvid - XviD encoding\n"
84 #endif
85 #ifdef HAVE_X264
86 " x264 - H.264 encoding\n"
87 #endif
88 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
89 {NULL, NULL, 0, 0, 0, 0, NULL}
92 m_option_t oac_conf[]={
93 {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
94 {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
95 #ifdef HAVE_MP3LAME
96 {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
97 #else
98 {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
99 #endif
100 #ifdef USE_LIBAVCODEC
101 {"lavc", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_LAVC, NULL},
102 #else
103 {"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
104 #endif
105 #ifdef HAVE_TOOLAME
106 {"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL},
107 #else
108 {"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
109 #endif
110 #ifdef HAVE_TWOLAME
111 {"twolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TWOLAME, NULL},
112 #else
113 {"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
114 #endif
115 #ifdef HAVE_FAAC
116 {"faac", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_FAAC, NULL},
117 #else
118 {"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
119 #endif
120 {"help", "\nAvailable codecs:\n"
121 " copy - frame copy, without re-encoding (useful for AC3)\n"
122 " pcm - uncompressed PCM audio\n"
123 #ifdef HAVE_MP3LAME
124 " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n"
125 #endif
126 #ifdef USE_LIBAVCODEC
127 " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n"
128 #endif
129 #ifdef HAVE_TOOLAME
130 " toolame - Toolame MP2 audio encoder\n"
131 #endif
132 #ifdef HAVE_TWOLAME
133 " twolame - Twolame MP2 audio encoder\n"
134 #endif
135 #ifdef HAVE_FAAC
136 " faac - FAAC AAC audio encoder\n"
137 #endif
138 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
139 {NULL, NULL, 0, 0, 0, 0, NULL}
142 m_option_t info_conf[]={
143 {"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
144 {"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
145 {"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
146 {"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL},
147 {"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL},
148 {"srcform", &info_sourceform, CONF_TYPE_STRING, 0, 0, 0, NULL},
149 {"comment", &info_comment, CONF_TYPE_STRING, 0, 0, 0, NULL},
150 {"help", "\nAvailable INFO fields:\n"
151 " name - title of the work\n"
152 " artist - artist or author of the work\n"
153 " genre - original work category\n"
154 " subject - contents of the work\n"
155 " copyright - copyright information\n"
156 " srcform - original format of the digitzed material\n"
157 " comment - general comments about the work\n"
158 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
159 {NULL, NULL, 0, 0, 0, 0, NULL}
162 m_option_t of_conf[]={
163 {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
164 {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
165 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
166 {"lavf", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_LAVF, NULL},
167 #endif
168 {"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL},
169 {"rawaudio", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWAUDIO, NULL},
170 {"help", "\nAvailable output formats:\n"
171 " avi - Microsoft Audio/Video Interleaved\n"
172 " mpeg - MPEG-1/2 system stream format\n"
173 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
174 " lavf - FFmpeg libavformat muxers\n"
175 #endif
176 " rawvideo - (video only, one stream only) raw stream, no muxing\n"
177 " rawaudio - (audio only, one stream only) raw stream, no muxing\n"
178 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
179 {NULL, NULL, 0, 0, 0, 0, NULL}
182 extern float avi_aspect_override; /* defined in libmpdemux/muxer_avi.c */
183 extern int write_odml; /* defined in libmpdemux/muxer_avi.c */
185 m_option_t mencoder_opts[]={
186 /* name, pointer, type, flags, min, max */
188 {"endpos", &end_at_string, CONF_TYPE_STRING, 0, 0, 0, NULL},
190 {"frameno-file", &frameno_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
192 {"hr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
193 {"nohr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 1, 0, NULL},
195 // set output framerate - recommended for variable-FPS (ASF etc) files
196 // and for 29.97FPS progressive MPEG2 streams
197 {"ofps", &force_ofps, CONF_TYPE_FLOAT, CONF_MIN|CONF_GLOBAL, 0, 0, NULL},
198 {"o", &out_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
200 // limit number of skippable frames after a non-skipped one
201 {"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL},
202 {"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL},
203 {"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL},
205 {"audio-density", &audio_density, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 1, 50, NULL},
206 {"audio-preload", &audio_preload, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0, 2, NULL},
207 {"audio-delay", &audio_delay_fix, CONF_TYPE_FLOAT, CONF_GLOBAL, 0, 0, NULL},
209 {"x", "-x is obsolete, use -vf scale=w:h for scaling.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
210 {"xsize", "-xsize is obsolete, use -vf crop=w:h:x:y for cropping.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
212 // output audio/video codec selection
213 {"oac", oac_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
214 {"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
216 // output file format
217 {"of", of_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
219 // override audio format tag in output file
220 {"fafmttag", &force_audiofmttag, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL},
221 // override FOURCC in output file
222 {"ffourcc", &force_fourcc, CONF_TYPE_STRING, CONF_GLOBAL, 4, 4, NULL},
224 // override avi aspect autodetection
225 {"force-avi-aspect", &avi_aspect_override, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0.2, 3.0, NULL},
227 {"pass", "-pass is obsolete, use -lavcopts vpass=n, -xvidencopts pass=n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
228 {"passlogfile", &passtmpfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
230 {"vobsubout", &vobsub_out, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
231 {"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 31, NULL},
232 {"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
234 {"autoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 0, 1, NULL},
235 {"noautoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 1, 0, NULL},
237 {"encodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 0, 1, NULL},
238 {"noencodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 1, 0, NULL},
240 {"odml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
241 {"noodml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
243 // info header strings
244 {"info", info_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
246 #ifdef HAVE_MP3LAME
247 {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
248 #endif
249 #ifdef USE_LIBAVCODEC
250 {"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
251 #else
252 {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
253 #endif
254 #ifdef HAVE_TOOLAME
255 {"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
256 #else
257 {"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
258 #endif
259 #ifdef HAVE_TWOLAME
260 {"twolameopts", twolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
261 #else
262 {"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
263 #endif
264 #ifdef HAVE_FAAC
265 {"faacopts", faacopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
266 #else
267 {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
268 #endif
269 #ifdef USE_WIN32DLL
270 {"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
271 #endif
272 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
273 {"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
274 #endif
275 #if defined(HAVE_X264)
276 {"x264encopts", x264encopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
277 #endif
279 {"nuvopts", nuvopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
280 {"mpegopts", mpegopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
281 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
282 {"lavfopts", lavfopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
283 #endif
285 #define MAIN_CONF
286 #include "cfg-common.h"
287 #undef MAIN_CONF
289 // {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
290 // {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
291 // {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
292 {NULL, NULL, 0, 0, 0, 0, NULL}