6 #include "cfg-common.h"
9 extern int readPPOpt(void *, char *arg
);
10 extern void revertPPOpt(void *conf
, char* opt
);
13 extern m_option_t lameopts_conf
[];
14 extern m_option_t lavcopts_conf
[];
15 extern m_option_t toolameopts_conf
[];
16 extern m_option_t twolameopts_conf
[];
17 extern m_option_t faacopts_conf
[];
18 extern m_option_t vfwopts_conf
[];
19 extern m_option_t xvidencopts_conf
[];
21 extern void x264enc_set_param(const m_option_t
* opt
, char* arg
);
23 extern m_option_t nuvopts_conf
[];
24 extern m_option_t mpegopts_conf
[];
25 extern m_option_t lavfopts_conf
[];
27 const m_option_t ovc_conf
[]={
28 {"copy", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_COPY
, NULL
},
29 {"frameno", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_FRAMENO
, NULL
},
30 {"lavc", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_LIBAVCODEC
, NULL
},
31 // {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
32 {"raw", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_RAW
, NULL
},
33 {"vfw", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_VFW
, NULL
},
34 {"libdv", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_LIBDV
, NULL
},
35 {"xvid", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_XVID
, NULL
},
36 {"qtvideo", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_QTVIDEO
, NULL
},
37 {"nuv", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_NUV
, NULL
},
38 {"x264", &out_video_codec
, CONF_TYPE_FLAG
, 0, 0, VCODEC_X264
, NULL
},
39 {"help", "\nAvailable codecs:\n"
40 " copy - frame copy, without re-encoding. Doesn't work with filters.\n"
41 " frameno - special audio-only file for 3-pass encoding, see DOCS.\n"
42 " raw - uncompressed video. Use fourcc option to set format explicitly.\n"
44 " nuv - nuppel video\n"
47 " lavc - libavcodec codecs - best quality!\n"
50 " vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
51 " qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
54 " libdv - DV encoding with libdv v0.9.5\n"
56 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
57 " xvid - XviD encoding\n"
60 " x264 - H.264 encoding\n"
62 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
63 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
66 const m_option_t oac_conf
[]={
67 {"copy", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_COPY
, NULL
},
68 {"pcm", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_PCM
, NULL
},
70 {"mp3lame", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_VBRMP3
, NULL
},
72 {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
75 {"lavc", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_LAVC
, NULL
},
77 {"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
80 {"toolame", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_TOOLAME
, NULL
},
82 {"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
85 {"twolame", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_TWOLAME
, NULL
},
87 {"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
90 {"faac", &out_audio_codec
, CONF_TYPE_FLAG
, 0, 0, ACODEC_FAAC
, NULL
},
92 {"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
94 {"help", "\nAvailable codecs:\n"
95 " copy - frame copy, without re-encoding (useful for AC3)\n"
96 " pcm - uncompressed PCM audio\n"
98 " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n"
100 #ifdef USE_LIBAVCODEC
101 " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n"
104 " toolame - Toolame MP2 audio encoder\n"
107 " twolame - Twolame MP2 audio encoder\n"
110 " faac - FAAC AAC audio encoder\n"
112 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
113 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
116 const m_option_t info_conf
[]={
117 {"name", &info_name
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
118 {"artist", &info_artist
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
119 {"genre", &info_genre
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
120 {"subject", &info_subject
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
121 {"copyright", &info_copyright
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
122 {"srcform", &info_sourceform
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
123 {"comment", &info_comment
, CONF_TYPE_STRING
, 0, 0, 0, NULL
},
124 {"help", "\nAvailable INFO fields:\n"
125 " name - title of the work\n"
126 " artist - artist or author of the work\n"
127 " genre - original work category\n"
128 " subject - contents of the work\n"
129 " copyright - copyright information\n"
130 " srcform - original format of the digitzed material\n"
131 " comment - general comments about the work\n"
132 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
133 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
136 const m_option_t of_conf
[]={
137 {"avi", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_AVI
, NULL
},
138 {"mpeg", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_MPEG
, NULL
},
139 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
140 {"lavf", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_LAVF
, NULL
},
142 {"rawvideo", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_RAWVIDEO
, NULL
},
143 {"rawaudio", &out_file_format
, CONF_TYPE_FLAG
, 0, 0, MUXER_TYPE_RAWAUDIO
, NULL
},
144 {"help", "\nAvailable output formats:\n"
145 " avi - Microsoft Audio/Video Interleaved\n"
146 " mpeg - MPEG-1/2 system stream format\n"
147 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
148 " lavf - FFmpeg libavformat muxers\n"
150 " rawvideo - (video only, one stream only) raw stream, no muxing\n"
151 " rawaudio - (audio only, one stream only) raw stream, no muxing\n"
152 "\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
153 {NULL
, NULL
, 0, 0, 0, 0, NULL
}
156 extern float avi_aspect_override
; /* defined in libmpdemux/muxer_avi.c */
157 extern int write_odml
; /* defined in libmpdemux/muxer_avi.c */
159 const m_option_t mencoder_opts
[]={
160 /* name, pointer, type, flags, min, max */
162 {"frameno-file", &frameno_filename
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
164 {"hr-edl-seek", &edl_seek_type
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
165 {"nohr-edl-seek", &edl_seek_type
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
167 // set output framerate - recommended for variable-FPS (ASF etc) files
168 // and for 29.97FPS progressive MPEG2 streams
169 {"ofps", &force_ofps
, CONF_TYPE_FLOAT
, CONF_MIN
|CONF_GLOBAL
, 0, 0, NULL
},
170 {"o", &out_filename
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
172 // limit number of skippable frames after a non-skipped one
173 {"skiplimit", &skip_limit
, CONF_TYPE_INT
, 0, 0, 0, NULL
},
174 {"noskiplimit", &skip_limit
, CONF_TYPE_FLAG
, 0, 0, -1, NULL
},
175 {"noskip", &skip_limit
, CONF_TYPE_FLAG
, 0, 0, 0, NULL
},
177 {"audio-density", &audio_density
, CONF_TYPE_INT
, CONF_RANGE
|CONF_GLOBAL
, 1, 50, NULL
},
178 {"audio-preload", &audio_preload
, CONF_TYPE_FLOAT
, CONF_RANGE
|CONF_GLOBAL
, 0, 2, NULL
},
179 {"audio-delay", &audio_delay_fix
, CONF_TYPE_FLOAT
, CONF_GLOBAL
, 0, 0, NULL
},
181 {"x", "-x has been removed, use -vf scale=w:h for scaling.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
182 {"xsize", "-xsize has been removed, use -vf crop=w:h:x:y for cropping.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
184 // output audio/video codec selection
185 {"oac", oac_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
186 {"ovc", ovc_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
188 // output file format
189 {"of", of_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
191 // override audio format tag in output file
192 {"fafmttag", &force_audiofmttag
, CONF_TYPE_INT
, CONF_GLOBAL
, 0, 0, NULL
},
193 // override FOURCC in output file
194 {"ffourcc", &force_fourcc
, CONF_TYPE_STRING
, CONF_GLOBAL
, 4, 4, NULL
},
196 // override avi aspect autodetection
197 {"force-avi-aspect", &avi_aspect_override
, CONF_TYPE_FLOAT
, CONF_RANGE
|CONF_GLOBAL
, 0.2, 3.0, NULL
},
199 {"pass", "-pass has been removed, use -lavcopts vpass=n, -xvidencopts pass=n\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
200 {"passlogfile", &passtmpfile
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
202 {"vobsubout", &vobsub_out
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
203 {"vobsuboutindex", &vobsub_out_index
, CONF_TYPE_INT
, CONF_RANGE
|CONF_GLOBAL
, 0, 31, NULL
},
204 {"vobsuboutid", &vobsub_out_id
, CONF_TYPE_STRING
, CONF_GLOBAL
, 0, 0, NULL
},
206 {"autoexpand", &auto_expand
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
207 {"noautoexpand", &auto_expand
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
209 {"encodedups", &encode_duplicates
, CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
210 {"noencodedups", &encode_duplicates
, CONF_TYPE_FLAG
, 0, 1, 0, NULL
},
212 {"odml", &write_odml
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 0, 1, NULL
},
213 {"noodml", &write_odml
, CONF_TYPE_FLAG
, CONF_GLOBAL
, 1, 0, NULL
},
215 // info header strings
216 {"info", info_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
219 {"lameopts", lameopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
221 #ifdef USE_LIBAVCODEC
222 {"lavcopts", lavcopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
224 {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
227 {"toolameopts", toolameopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
229 {"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
232 {"twolameopts", twolameopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
234 {"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
237 {"faacopts", faacopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
239 {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT
, CONF_NOCFG
, 0, 0, NULL
},
242 {"xvfwopts", vfwopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
244 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
245 {"xvidencopts", xvidencopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
247 #if defined(HAVE_X264)
248 {"x264encopts", &x264enc_set_param
, CONF_TYPE_FUNC_PARAM
, CONF_GLOBAL
, 0, 0, NULL
},
252 {"nuvopts", nuvopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
254 {"mpegopts", mpegopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
255 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
256 {"lavfopts", lavfopts_conf
, CONF_TYPE_SUBCONFIG
, CONF_GLOBAL
, 0, 0, NULL
},
260 #include "cfg-common.h"
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
}