2001-11-02 02:25:13 +01:00
|
|
|
/*
|
|
|
|
* config for cfgparser
|
|
|
|
*/
|
|
|
|
|
2001-11-10 00:46:06 +01:00
|
|
|
#include "cfg-common.h"
|
|
|
|
|
2001-11-02 02:25:13 +01:00
|
|
|
#ifdef USE_FAKE_MONO
|
|
|
|
extern int fakemono; // defined in dec_audio.c
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_ODIVX_POSTPROCESS
|
|
|
|
extern int use_old_pp;
|
|
|
|
#endif
|
|
|
|
|
2001-12-02 21:03:26 +01:00
|
|
|
extern int sws_flags;
|
2001-12-26 20:45:49 +01:00
|
|
|
extern int readPPOpt(void *, char *arg);
|
2002-01-19 17:59:59 +01:00
|
|
|
extern void revertPPOpt(void *conf, char* opt);
|
2003-01-03 13:40:10 +01:00
|
|
|
extern char *pp_help;
|
2001-12-02 21:03:26 +01:00
|
|
|
|
2001-12-22 17:59:10 +01:00
|
|
|
#ifdef HAVE_DIVX4ENCORE
|
2002-04-11 04:52:03 +02:00
|
|
|
extern struct config divx4opts_conf[];
|
2001-12-22 17:59:10 +01:00
|
|
|
#endif
|
2001-11-02 04:22:33 +01:00
|
|
|
|
2001-12-06 23:27:09 +01:00
|
|
|
#ifdef HAVE_MP3LAME
|
2001-11-02 04:22:33 +01:00
|
|
|
struct config lameopts_conf[]={
|
2002-01-15 00:54:31 +01:00
|
|
|
{"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
|
2002-05-01 16:42:42 +02:00
|
|
|
{"aq", &lame_param_algqual, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
{"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL},
|
|
|
|
{"cbr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
|
|
|
{"abr", &lame_param_vbr, CONF_TYPE_FLAG, 0, 0, vbr_abr, NULL},
|
|
|
|
{"mode", &lame_param_mode, CONF_TYPE_INT, CONF_RANGE, 0, MAX_INDICATOR, NULL},
|
|
|
|
{"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR, NULL},
|
|
|
|
{"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL},
|
|
|
|
{"ratio", &lame_param_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
|
2002-04-26 22:19:31 +02:00
|
|
|
{"vol", &lame_param_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10, NULL},
|
2002-12-21 23:16:49 +01:00
|
|
|
#if HAVE_MP3LAME >= 392
|
|
|
|
{"fast", &lame_param_fast, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
|
|
|
{"preset", &lame_param_preset, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
2002-12-26 13:48:36 +01:00
|
|
|
#else
|
|
|
|
{"fast", "MPlayer was built without -lameopts fast support (requires libmp3lame >=3.92)!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{"preset", "MPlayer was built without -lameopts preset support (requires libmp3lame >=3.92)!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-12-21 23:16:49 +01:00
|
|
|
#endif
|
2003-01-11 21:33:04 +01:00
|
|
|
{"help", MSGTR_MEncoderMP3LameHelp, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-04 00:01:17 +01:00
|
|
|
};
|
2001-12-06 23:27:09 +01:00
|
|
|
#endif
|
2001-11-04 00:01:17 +01:00
|
|
|
|
2001-12-22 15:32:08 +01:00
|
|
|
#ifdef USE_LIBAVCODEC
|
2002-04-11 04:52:03 +02:00
|
|
|
extern struct config lavcopts_conf[];
|
2001-12-22 15:32:08 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_WIN32DLL
|
2002-05-13 23:19:28 +02:00
|
|
|
extern struct config vfwopts_conf[];
|
2001-12-22 15:32:08 +01:00
|
|
|
#endif
|
|
|
|
|
2002-09-21 14:41:29 +02:00
|
|
|
#ifdef HAVE_XVID
|
|
|
|
extern struct config xvidencopts_conf[];
|
|
|
|
#endif
|
|
|
|
|
2001-11-04 00:01:17 +01:00
|
|
|
struct config ovc_conf[]={
|
2002-01-15 00:54:31 +01:00
|
|
|
{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
|
|
|
|
{"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
|
|
|
|
{"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL},
|
2002-04-11 04:52:03 +02:00
|
|
|
// {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
{"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
|
2002-04-11 04:52:03 +02:00
|
|
|
// {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
|
2002-02-07 21:22:03 +01:00
|
|
|
{"rawrgb", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAWRGB, NULL},
|
|
|
|
{"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
|
2002-04-12 23:50:38 +02:00
|
|
|
{"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
|
2002-09-21 14:41:29 +02:00
|
|
|
{"xvid", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_XVID, NULL},
|
2002-12-16 02:49:39 +01:00
|
|
|
{"qtvideo", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_QTVIDEO, NULL},
|
2002-08-05 15:41:32 +02:00
|
|
|
{"help", "\nAvailable codecs:\n"
|
|
|
|
" copy - frame copy, without re-encoding. doesn't work with filters!\n"
|
|
|
|
" frameno - special audio-only file for 3-pass encoding, see DOCS!\n"
|
|
|
|
" rawrgb - uncompressed RGB 24bpp video\n"
|
2002-04-18 17:32:30 +02:00
|
|
|
#ifdef HAVE_DIVX4ENCORE
|
2002-08-05 15:41:32 +02:00
|
|
|
" divx4 - using divx4linux/divx5linux or xvid (depends on configuration)\n"
|
2002-04-18 17:32:30 +02:00
|
|
|
#endif
|
|
|
|
#ifdef USE_LIBAVCODEC
|
2002-08-05 15:41:32 +02:00
|
|
|
" lavc - using libavcodec codecs - best quality!\n"
|
2002-04-18 17:32:30 +02:00
|
|
|
#endif
|
|
|
|
#ifdef USE_WIN32DLL
|
2002-08-05 15:41:32 +02:00
|
|
|
" vfw - using VfW DLLs, currently only AVID is supported\n"
|
2002-12-26 12:33:11 +01:00
|
|
|
" qtvideo - using QuickTime DLLs, currently only SVQ1/3 are supported\n"
|
2002-04-18 17:32:30 +02:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_LIBDV095
|
2002-08-05 15:41:32 +02:00
|
|
|
" libdv - DV encoding using libdv v0.9.5\n"
|
2002-09-21 14:41:29 +02:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_XVID
|
2002-11-27 23:45:54 +01:00
|
|
|
" xvid - xvid encoding\n"
|
2002-04-18 17:32:30 +02:00
|
|
|
#endif
|
|
|
|
"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-04 00:01:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct config oac_conf[]={
|
2002-01-15 00:54:31 +01:00
|
|
|
{"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
|
|
|
|
{"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
|
2001-12-06 23:27:09 +01:00
|
|
|
#ifdef HAVE_MP3LAME
|
2002-01-15 00:54:31 +01:00
|
|
|
{"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
|
2001-12-06 23:27:09 +01:00
|
|
|
#else
|
2002-01-15 00:54:31 +01:00
|
|
|
{"mp3lame", "MPlayer was compiled without libmp3lame support!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2001-12-06 23:27:09 +01:00
|
|
|
#endif
|
2002-08-05 15:41:32 +02:00
|
|
|
{"help", "\nAvailable codecs:\n"
|
2002-12-26 12:33:11 +01:00
|
|
|
" copy - frame copy, without re-encoding (useful for AC3)\n"
|
2002-08-05 15:41:32 +02:00
|
|
|
" pcm - uncompressed PCM audio\n"
|
|
|
|
#ifdef HAVE_MP3LAME
|
|
|
|
" mp3lame - cbr/abr/vbr MP3 using libmp3lame\n"
|
|
|
|
#endif
|
|
|
|
"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-02 04:22:33 +01:00
|
|
|
};
|
|
|
|
|
2002-08-29 22:50:49 +02:00
|
|
|
struct config info_conf[]={
|
|
|
|
{"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"srcform", &info_sourceform, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"comment", &info_comment, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"help", "\nAvailable INFO fields:\n"
|
|
|
|
" name - title of the subject of the file\n"
|
|
|
|
" artist - artist or author of the original subject of the file\n"
|
|
|
|
" genre - original work category\n"
|
|
|
|
" subject - contents of the file\n"
|
|
|
|
" copyright - copyright information for the file\n"
|
|
|
|
" srcform - original form of the material that was digitized\n"
|
|
|
|
" comment - general comments about the file or the subject of the file\n"
|
|
|
|
"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
|
|
|
};
|
|
|
|
|
2002-12-27 23:43:20 +01:00
|
|
|
struct config of_conf[]={
|
|
|
|
{"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
|
|
|
|
{"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
|
|
|
|
{"help", "\nAvailable output formats:\n"
|
|
|
|
" avi - Microsoft Audio/Video Interleaved\n"
|
|
|
|
" mpeg - MPEG-1 system stream format\n"
|
|
|
|
"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
|
|
|
};
|
|
|
|
|
2002-01-15 02:03:22 +01:00
|
|
|
static config_t mencoder_opts[]={
|
2001-11-02 02:25:13 +01:00
|
|
|
/* name, pointer, type, flags, min, max */
|
2002-01-15 00:55:51 +01:00
|
|
|
{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */
|
2001-11-02 02:25:13 +01:00
|
|
|
|
2002-01-15 01:20:50 +01:00
|
|
|
{"endpos", parse_end_at, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL},
|
2002-05-04 23:26:45 +02:00
|
|
|
|
|
|
|
// set output framerate - recommended for variable fps (.asf etc) files
|
|
|
|
// and for 29.97fps progressive mpeg2 streams
|
2002-01-15 00:54:31 +01:00
|
|
|
{"ofps", &force_ofps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL},
|
|
|
|
{"o", &out_filename, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
2001-11-02 04:22:33 +01:00
|
|
|
|
2002-05-04 23:26:45 +02:00
|
|
|
// limit number of skippable frames after a non-skipped one
|
2002-04-15 04:33:05 +02:00
|
|
|
{"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL},
|
|
|
|
{"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL},
|
|
|
|
{"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
|
|
|
|
2002-08-01 10:39:33 +02:00
|
|
|
{"audio-density", &audio_density, CONF_TYPE_INT, CONF_RANGE, 1, 50, NULL},
|
|
|
|
{"audio-preload", &audio_preload, CONF_TYPE_FLOAT, CONF_RANGE, 0, 2, NULL},
|
2002-08-01 10:53:32 +02:00
|
|
|
{"audio-delay", &audio_delay, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL},
|
2002-08-01 10:39:33 +02:00
|
|
|
|
2002-04-22 01:13:52 +02:00
|
|
|
{"x", "This option is obsolete, use -vop scale=w:h for scaling\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{"xsize", "This option is obsolete, use -vop crop=w:h:x0:y0 for cropping\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-03-23 14:13:12 +01:00
|
|
|
|
2002-12-26 12:33:11 +01:00
|
|
|
// output audio/video codec selection
|
2002-01-15 00:54:31 +01:00
|
|
|
{"oac", oac_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
|
|
|
{"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-11-03 01:44:02 +01:00
|
|
|
|
2002-12-27 23:43:20 +01:00
|
|
|
// output file format
|
|
|
|
{"of", of_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
|
|
|
|
2002-05-04 23:26:45 +02:00
|
|
|
// override FOURCC in output file
|
2002-01-15 00:54:31 +01:00
|
|
|
{"ffourcc", &force_fourcc, CONF_TYPE_STRING, 0, 4, 4, NULL},
|
2001-12-22 15:32:08 +01:00
|
|
|
|
2002-11-02 04:51:05 +01:00
|
|
|
{"pass", "The -pass option is obsolete. Use -lavcopts vpass=n or -divx4opts pass=n!\nRTFM!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
{"passlogfile", &passtmpfile, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
2001-11-02 04:22:33 +01:00
|
|
|
|
2002-07-08 23:44:51 +02:00
|
|
|
{"vobsubout", &vobsub_out, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
{"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
|
|
|
|
{"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
|
|
|
|
2002-08-29 22:50:49 +02:00
|
|
|
// info header strings
|
|
|
|
{"info", info_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
|
|
|
|
2002-03-29 08:20:44 +01:00
|
|
|
#ifdef HAVE_DIVX4ENCORE
|
2002-01-15 00:54:31 +01:00
|
|
|
{"divx4opts", divx4opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-22 17:59:10 +01:00
|
|
|
#endif
|
2001-12-06 23:27:09 +01:00
|
|
|
#ifdef HAVE_MP3LAME
|
2002-01-15 00:54:31 +01:00
|
|
|
{"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-06 23:27:09 +01:00
|
|
|
#endif
|
2001-12-22 15:32:08 +01:00
|
|
|
#ifdef USE_LIBAVCODEC
|
2002-01-15 00:54:31 +01:00
|
|
|
{"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-22 15:32:08 +01:00
|
|
|
#endif
|
|
|
|
#ifdef USE_WIN32DLL
|
2002-01-15 00:54:31 +01:00
|
|
|
{"vfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
2001-12-22 15:32:08 +01:00
|
|
|
#endif
|
2002-09-21 14:41:29 +02:00
|
|
|
#ifdef HAVE_XVID
|
|
|
|
{"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
|
|
|
|
#endif
|
2001-11-02 02:25:13 +01:00
|
|
|
|
2001-11-10 00:46:06 +01:00
|
|
|
#define MAIN_CONF
|
2001-11-02 02:25:13 +01:00
|
|
|
#include "cfg-common.h"
|
2001-11-10 00:46:06 +01:00
|
|
|
#undef MAIN_CONF
|
2001-11-02 02:25:13 +01:00
|
|
|
|
2002-01-15 00:54:31 +01:00
|
|
|
// {"quiet", &quiet, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
2002-01-15 00:55:51 +01:00
|
|
|
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 100, NULL},
|
|
|
|
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL},
|
2002-01-15 00:54:31 +01:00
|
|
|
// {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
// {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
// {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
|
|
|
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
2001-11-02 02:25:13 +01:00
|
|
|
};
|