6 #include "cfg-common.h"
9 extern int fakemono
; // defined in dec_audio.c
13 extern int readPPOpt(void *, char *arg
);
14 extern void revertPPOpt(void *conf
, char* opt
);
18 extern m_option_t lameopts_conf
[];
22 extern m_option_t lavcopts_conf
[];
26 extern m_option_t toolameopts_conf
[];
30 extern m_option_t twolameopts_conf
[];
34 extern m_option_t faacopts_conf
[];
38 extern m_option_t vfwopts_conf
[];
41 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
42 extern m_option_t xvidencopts_conf
[];
45 #if defined(HAVE_X264)
46 extern void x264enc_set_param(m_option_t
* opt
, char* arg
);
50 extern m_option_t nuvopts_conf
[];
53 extern m_option_t mpegopts_conf
[];
54 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
55 extern m_option_t lavfopts_conf
[];
58 m_option_t ovc_conf
[]={
59 {"copy", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_COPY
, NULL
},
60 {"frameno", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_FRAMENO
, NULL
},
61 {"lavc", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_LIBAVCODEC
, NULL
},
62 // {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
63 {"raw", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_RAW
, NULL
},
64 {"vfw", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_VFW
, NULL
},
65 {"libdv", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_LIBDV
, NULL
},
66 {"xvid", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_XVID
, NULL
},
67 {"qtvideo", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_QTVIDEO
, NULL
},
68 {"nuv", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_NUV
, NULL
},
69 {"x264", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_X264
, NULL
},
70 {"help", "\nAvailable codecs:\n"
71 " copy - frame copy, without re-encoding. Doesn't work with filters.\n"
72 " frameno - special audio-only file for 3-pass encoding, see DOCS.\n"
73 " raw - uncompressed video. Use fourcc option to set format explicitly.\n"
75 " nuv - nuppel video\n"
78 " lavc - libavcodec codecs - best quality!\n"
81 " vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
82 " qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
85 " libdv - DV encoding with libdv v0.9.5\n"
87 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
88 " xvid - XviD encoding\n"
91 " x264 - H.264 encoding\n"
93 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
94 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
97 m_option_t oac_conf
[]={
98 {"copy", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_COPY
, NULL
},
99 {"pcm", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_PCM
, NULL
},
101 {"mp3lame", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_VBRMP3
, NULL
},
103 {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
105 #ifdef USE_LIBAVCODEC
106 {"lavc", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_LAVC
, NULL
},
108 {"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
111 {"toolame", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_TOOLAME
, NULL
},
113 {"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
116 {"twolame", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_TWOLAME
, NULL
},
118 {"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
121 {"faac", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_FAAC
, NULL
},
123 {"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
125 {"help", "\nAvailable codecs:\n"
126 " copy - frame copy, without re-encoding (useful for AC3)\n"
127 " pcm - uncompressed PCM audio\n"
129 " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n"
131 #ifdef USE_LIBAVCODEC
132 " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n"
135 " toolame - Toolame MP2 audio encoder\n"
138 " twolame - Twolame MP2 audio encoder\n"
141 " faac - FAAC AAC audio encoder\n"
143 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
144 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
147 m_option_t info_conf
[]={
148 {"name", &info_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
149 {"artist", &info_artist
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
150 {"genre", &info_genre
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
151 {"subject", &info_subject
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
152 {"copyright", &info_copyright
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
153 {"srcform", &info_sourceform
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
154 {"comment", &info_comment
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
155 {"help", "\nAvailable INFO fields:\n"
156 " name - title of the work\n"
157 " artist - artist or author of the work\n"
158 " genre - original work category\n"
159 " subject - contents of the work\n"
160 " copyright - copyright information\n"
161 " srcform - original format of the digitzed material\n"
162 " comment - general comments about the work\n"
163 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
164 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
167 m_option_t of_conf
[]={
168 {"avi", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_AVI
, NULL
},
169 {"mpeg", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_MPEG
, NULL
},
170 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
171 {"lavf", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_LAVF
, NULL
},
173 {"rawvideo", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_RAWVIDEO
, NULL
},
174 {"rawaudio", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_RAWAUDIO
, NULL
},
175 {"help", "\nAvailable output formats:\n"
176 " avi - Microsoft Audio/Video Interleaved\n"
177 " mpeg - MPEG-1/2 system stream format\n"
178 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
179 " lavf - FFmpeg libavformat muxers\n"
181 " rawvideo - (video only, one stream only) raw stream, no muxing\n"
182 " rawaudio - (audio only, one stream only) raw stream, no muxing\n"
183 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
184 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
187 extern float avi_aspect_override
; /* defined in libmpdemux/muxer_avi.c */
188 extern int write_odml
; /* defined in libmpdemux/muxer_avi.c */
190 m_option_t mencoder_opts
[]={
191 /* name, pointer, type, flags, min, max */
193 {"frameno-file", &frameno_filename
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
195 {"hr-edl-seek", &edl_seek_type
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
196 {"nohr-edl-seek", &edl_seek_type
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
198 // set output framerate - recommended for variable-FPS (ASF etc) files
199 // and for 29.97FPS progressive MPEG2 streams
200 {"ofps", &force_ofps
, CONF_TYPE_FLOAT
, CONF_MIN
|CONF_GLOBAL
, 0, 0, NULL
},
201 {"o", &out_filename
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
203 // limit number of skippable frames after a non-skipped one
204 {"skiplimit", &skip_limit
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
205 {"noskiplimit", &skip_limit
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
206 {"noskip", &skip_limit
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
208 {"audio-density", &audio_density
, CONF_TYPE_INT
, CONF_RANGE
|CONF_GLOBAL
, 1, 50, NULL
},
209 {"audio-preload", &audio_preload
, CONF_TYPE_FLOAT
, CONF_RANGE
|CONF_GLOBAL
, 0, 2, NULL
},
210 {"audio-delay", &audio_delay_fix
, CONF_TYPE_FLOAT
, CONF_GLOBAL
, 0, 0, NULL
},
212 {"x", "-x has been removed, use -vf scale=w:h for scaling.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
213 {"xsize", "-xsize has been removed, use -vf crop=w:h:x:y for cropping.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
215 // output audio/video codec selection
216 {"oac", oac_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
217 {"ovc", ovc_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
219 // output file format
220 {"of", of_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
222 // override audio format tag in output file
223 {"fafmttag", &force_audiofmttag
, CONF_TYPE_INT
, CONF_GLOBAL
, 0, 0, NULL
},
224 // override FOURCC in output file
225 {"ffourcc", &force_fourcc
, CONF_TYPE_STRING
, CONF_GLOBAL
, 4, 4, NULL
},
227 // override avi aspect autodetection
228 {"force-avi-aspect", &avi_aspect_override
, CONF_TYPE_FLOAT
, CONF_RANGE
|CONF_GLOBAL
, 0.2, 3.0, NULL
},
230 {"pass", "-pass has been removed, use -lavcopts vpass=n, -xvidencopts pass=n\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
231 {"passlogfile", &passtmpfile
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
233 {"vobsubout", &vobsub_out
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
234 {"vobsuboutindex", &vobsub_out_index
, CONF_TYPE_INT
, CONF_RANGE
|CONF_GLOBAL
, 0, 31, NULL
},
235 {"vobsuboutid", &vobsub_out_id
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
237 {"autoexpand", &auto_expand
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
238 {"noautoexpand", &auto_expand
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
240 {"encodedups", &encode_duplicates
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
241 {"noencodedups", &encode_duplicates
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
243 {"odml", &write_odml
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
244 {"noodml", &write_odml
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
246 // info header strings
247 {"info", info_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
250 {"lameopts", lameopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
252 #ifdef USE_LIBAVCODEC
253 {"lavcopts", lavcopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
255 {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
258 {"toolameopts", toolameopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
260 {"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
263 {"twolameopts", twolameopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
265 {"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
268 {"faacopts", faacopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
270 {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
273 {"xvfwopts", vfwopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
275 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
276 {"xvidencopts", xvidencopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
278 #if defined(HAVE_X264)
279 {"x264encopts", &x264enc_set_param
, CONF_TYPE_FUNC_PARAM
, CONF_GLOBAL
, 0, 0, NULL
},
283 {"nuvopts", nuvopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
285 {"mpegopts", mpegopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
286 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
287 {"lavfopts", lavfopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
291 #include "cfg-common.h"
294 // {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
295 // {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
296 // {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
297 {NULL
, NULL
, 0, 0, 0, 0, NULL
}