no default oac/ovc (it just confuses users), more detailed -oac/-ovc help

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6924 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-08-05 13:41:32 +00:00
parent 5c90181715
commit f429ecfeba
2 changed files with 26 additions and 23 deletions

View File

@ -55,18 +55,21 @@ struct config ovc_conf[]={
{"rawrgb", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAWRGB, NULL},
{"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
{"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
{"help", "\nAvailable codecs:\n copy\n frameno\n rawrgb\n"
{"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"
#ifdef HAVE_DIVX4ENCORE
" divx4\n"
" divx4 - using divx4linux/divx5linux or xvid (depends on configuration)\n"
#endif
#ifdef USE_LIBAVCODEC
" lavc\n"
" lavc - using libavcodec codecs - best quality!\n"
#endif
#ifdef USE_WIN32DLL
" vfw\n"
" vfw - using VfW DLLs, currently only AVID is supported\n"
#endif
#ifdef HAVE_LIBDV095
" libdv\n"
" libdv - DV encoding using libdv v0.9.5\n"
#endif
"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
@ -77,11 +80,16 @@ struct config oac_conf[]={
{"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
#ifdef HAVE_MP3LAME
{"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
{"help", "\nAvailable codecs:\n copy\n pcm\n mp3lame\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
#else
{"mp3lame", "MPlayer was compiled without libmp3lame support!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{"help", "\nAvailable codecs:\n copy\n pcm\n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
#endif
{"help", "\nAvailable codecs:\n"
" copy - frame copy, without re-encoding (usefull for AC3)\n"
" 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},
{NULL, NULL, 0, 0, 0, 0, NULL}
};

View File

@ -101,22 +101,8 @@ extern int softzoom;
extern int flip;
#ifdef HAVE_MP3LAME
int out_audio_codec=ACODEC_VBRMP3;
#else
int out_audio_codec=ACODEC_PCM;
#endif
int out_video_codec=
#ifdef USE_LIBAVCODEC
VCODEC_LIBAVCODEC;
#else
#ifdef HAVE_DIVX4ENCORE
VCODEC_DIVX4;
#else
VCODEC_COPY;
#endif
#endif
int out_audio_codec=-1;
int out_video_codec=-1;
// audio stream skip/resync functions requires only for seeking.
// (they should be implemented in the audio codec layer)
@ -481,6 +467,15 @@ sh_video=d_video->sh;
sh_video->fps,sh_video->frametime
);
if(sh_audio && out_audio_codec<0){
mp_msg(MSGT_MENCODER,MSGL_FATAL,"\nNo audio encoder (-oac) selected! Select one or use -nosound. Use -oac help !\n");
mencoder_exit(1,NULL);
}
if(sh_video && out_video_codec<0){
mp_msg(MSGT_MENCODER,MSGL_FATAL,"\nNo video encoder (-ovc) selected! Select one, use -ovc help !\n");
mencoder_exit(1,NULL);
}
if(sh_audio && (out_audio_codec || seek_to_sec || !sh_audio->wf)){
// Go through the codec.conf and find the best codec...
sh_audio->codec=NULL;