support for Geforce FX5500 based on patch by Pascal Yu <yu_pascal at hotmail.com>
[mplayer/greg.git] / cfg-mencoder.h
blobb18e904e1eea5926df1e17f744680a55180146b0
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
11 #ifdef HAVE_ODIVX_POSTPROCESS
12 extern int use_old_pp;
13 #endif
15 extern int sws_flags;
16 extern int readPPOpt(void *, char *arg);
17 extern void revertPPOpt(void *conf, char* opt);
18 extern char *pp_help;
20 #ifdef HAVE_DIVX4ENCORE
21 extern m_option_t divx4opts_conf[];
22 #endif
24 #ifdef HAVE_MP3LAME
25 extern m_option_t lameopts_conf[];
26 #endif
28 #ifdef USE_LIBAVCODEC
29 extern m_option_t lavcopts_conf[];
30 #endif
32 #ifdef HAVE_TOOLAME
33 extern m_option_t toolameopts_conf[];
34 #endif
36 #ifdef HAVE_TWOLAME
37 extern m_option_t twolameopts_conf[];
38 #endif
40 #ifdef HAVE_FAAC
41 extern m_option_t faacopts_conf[];
42 #endif
44 #ifdef USE_WIN32DLL
45 extern m_option_t vfwopts_conf[];
46 #endif
48 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
49 extern m_option_t xvidencopts_conf[];
50 #endif
52 #if defined(HAVE_X264)
53 extern m_option_t x264encopts_conf[];
54 #endif
56 extern m_option_t nuvopts_conf[];
57 extern m_option_t mpegopts_conf[];
58 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
59 extern m_option_t lavfopts_conf[];
60 #endif
62 m_option_t ovc_conf[]={
63 {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
64 {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
65 {"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL},
66 {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
67 // {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
68 {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
69 {"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
70 {"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
71 {"xvid", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_XVID, NULL},
72 {"qtvideo", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_QTVIDEO, NULL},
73 {"nuv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NUV, NULL},
74 {"x264", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_X264, NULL},
75 {"help", "\nAvailable codecs:\n"
76 " copy - frame copy, without re-encoding. Doesn't work with filters.\n"
77 " frameno - special audio-only file for 3-pass encoding, see DOCS.\n"
78 " raw - uncompressed video. Use fourcc option to set format explicitly.\n"
79 " nuv - nuppel video\n"
80 #ifdef HAVE_DIVX4ENCORE
81 #ifdef ENCORE_XVID
82 " divx4 - XviD (divx4linux compatibility mode)\n"
83 #else
84 " divx4 - divx4linux/divx5linux library (depends on configuration)\n"
85 #endif
86 #endif
87 #ifdef USE_LIBAVCODEC
88 " lavc - libavcodec codecs - best quality!\n"
89 #endif
90 #ifdef USE_WIN32DLL
91 " vfw - VfW DLLs, currently only AVID is supported.\n"
92 " qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
93 #endif
94 #ifdef HAVE_LIBDV095
95 " libdv - DV encoding with libdv v0.9.5\n"
96 #endif
97 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
98 " xvid - XviD encoding\n"
99 #endif
100 #ifdef HAVE_X264
101 " x264 - H.264 encoding\n"
102 #endif
103 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
104 {NULL, NULL, 0, 0, 0, 0, NULL}
107 m_option_t oac_conf[]={
108 {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
109 {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
110 #ifdef HAVE_MP3LAME
111 {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
112 #else
113 {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
114 #endif
115 #ifdef USE_LIBAVCODEC
116 {"lavc", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_LAVC, NULL},
117 #else
118 {"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
119 #endif
120 #ifdef HAVE_TOOLAME
121 {"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL},
122 #else
123 {"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
124 #endif
125 #ifdef HAVE_TWOLAME
126 {"twolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TWOLAME, NULL},
127 #else
128 {"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
129 #endif
130 #ifdef HAVE_FAAC
131 {"faac", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_FAAC, NULL},
132 #else
133 {"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
134 #endif
135 {"help", "\nAvailable codecs:\n"
136 " copy - frame copy, without re-encoding (useful for AC3)\n"
137 " pcm - uncompressed PCM audio\n"
138 #ifdef HAVE_MP3LAME
139 " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n"
140 #endif
141 #ifdef USE_LIBAVCODEC
142 " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n"
143 #endif
144 #ifdef HAVE_TOOLAME
145 " toolame - Toolame MP2 audio encoder\n"
146 #endif
147 #ifdef HAVE_TWOLAME
148 " twolame - Twolame MP2 audio encoder\n"
149 #endif
150 #ifdef HAVE_FAAC
151 " faac - FAAC AAC audio encoder\n"
152 #endif
153 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
154 {NULL, NULL, 0, 0, 0, 0, NULL}
157 m_option_t info_conf[]={
158 {"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
159 {"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
160 {"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
161 {"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL},
162 {"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL},
163 {"srcform", &info_sourceform, CONF_TYPE_STRING, 0, 0, 0, NULL},
164 {"comment", &info_comment, CONF_TYPE_STRING, 0, 0, 0, NULL},
165 {"help", "\nAvailable INFO fields:\n"
166 " name - title of the work\n"
167 " artist - artist or author of the work\n"
168 " genre - original work category\n"
169 " subject - contents of the work\n"
170 " copyright - copyright information\n"
171 " srcform - original format of the digitzed material\n"
172 " comment - general comments about the work\n"
173 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
174 {NULL, NULL, 0, 0, 0, 0, NULL}
177 m_option_t of_conf[]={
178 {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
179 {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
180 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
181 {"lavf", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_LAVF, NULL},
182 #endif
183 {"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL},
184 {"rawaudio", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWAUDIO, NULL},
185 {"help", "\nAvailable output formats:\n"
186 " avi - Microsoft Audio/Video Interleaved\n"
187 " mpeg - MPEG-1/2 system stream format\n"
188 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
189 " lavf - FFmpeg libavformat muxers\n"
190 #endif
191 " rawvideo - (video only, one stream only) raw stream, no muxing\n"
192 " rawaudio - (audio only, one stream only) raw stream, no muxing\n"
193 "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
194 {NULL, NULL, 0, 0, 0, 0, NULL}
197 extern float avi_aspect_override; /* defined in libmpdemux/muxer_avi.c */
198 extern int write_odml; /* defined in libmpdemux/muxer_avi.c */
200 m_option_t mencoder_opts[]={
201 /* name, pointer, type, flags, min, max */
203 {"endpos", &end_at_string, CONF_TYPE_STRING, 0, 0, 0, NULL},
205 {"frameno-file", &frameno_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
207 #ifdef USE_EDL
208 {"hr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
209 {"nohr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 1, 0, NULL},
210 #endif
212 // set output framerate - recommended for variable-FPS (ASF etc) files
213 // and for 29.97FPS progressive MPEG2 streams
214 {"ofps", &force_ofps, CONF_TYPE_FLOAT, CONF_MIN|CONF_GLOBAL, 0, 0, NULL},
215 {"o", &out_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
217 // limit number of skippable frames after a non-skipped one
218 {"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL},
219 {"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL},
220 {"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL},
222 {"audio-density", &audio_density, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 1, 50, NULL},
223 {"audio-preload", &audio_preload, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0, 2, NULL},
224 {"audio-delay", &audio_delay_fix, CONF_TYPE_FLOAT, CONF_MIN|CONF_GLOBAL, 0, 0, NULL},
226 {"x", "-x is obsolete, use -vf scale=w:h for scaling.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
227 {"xsize", "-xsize is obsolete, use -vf crop=w:h:x:y for cropping.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
229 // output audio/video codec selection
230 {"oac", oac_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
231 {"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
233 // output file format
234 {"of", of_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
236 // override audio format tag in output file
237 {"fafmttag", &force_audiofmttag, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL},
238 // override FOURCC in output file
239 {"ffourcc", &force_fourcc, CONF_TYPE_STRING, CONF_GLOBAL, 4, 4, NULL},
241 // override avi aspect autodetection
242 {"force-avi-aspect", &avi_aspect_override, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0.2, 3.0, NULL},
244 {"pass", "-pass is obsolete, use -lavcopts vpass=n, -xvidencopts pass=n, -divx4opts pass=n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
245 {"passlogfile", &passtmpfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
247 {"vobsubout", &vobsub_out, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
248 {"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 31, NULL},
249 {"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
251 {"autoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 0, 1, NULL},
252 {"noautoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 1, 0, NULL},
254 {"encodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 0, 1, NULL},
255 {"noencodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 1, 0, NULL},
257 {"odml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
258 {"noodml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
260 // info header strings
261 {"info", info_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
263 #ifdef HAVE_DIVX4ENCORE
264 {"divx4opts", divx4opts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
265 #endif
266 #ifdef HAVE_MP3LAME
267 {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
268 #endif
269 #ifdef USE_LIBAVCODEC
270 {"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
271 #else
272 {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
273 #endif
274 #ifdef HAVE_TOOLAME
275 {"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
276 #else
277 {"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
278 #endif
279 #ifdef HAVE_TWOLAME
280 {"twolameopts", twolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
281 #else
282 {"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
283 #endif
284 #ifdef HAVE_FAAC
285 {"faacopts", faacopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
286 #else
287 {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
288 #endif
289 #ifdef USE_WIN32DLL
290 {"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
291 #endif
292 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
293 {"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
294 #endif
295 #if defined(HAVE_X264)
296 {"x264encopts", x264encopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
297 #endif
299 {"nuvopts", nuvopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
300 {"mpegopts", mpegopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
301 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
302 {"lavfopts", lavfopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
303 #endif
305 #define MAIN_CONF
306 #include "cfg-common.h"
307 #undef MAIN_CONF
309 // {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
310 // {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
311 // {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
312 {NULL, NULL, 0, 0, 0, 0, NULL}