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