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