changeset 6923:60374fa581fc

no default oac/ovc (it just confuses users), more detailed -oac/-ovc help
author arpi
date Mon, 05 Aug 2002 13:41:32 +0000
parents adaa83002b22
children 765d3da45d57
files cfg-mencoder.h mencoder.c
diffstat 2 files changed, 26 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mencoder.h	Mon Aug 05 13:04:54 2002 +0000
+++ b/cfg-mencoder.h	Mon Aug 05 13:41:32 2002 +0000
@@ -55,18 +55,21 @@
 	{"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 @@
 	{"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}
 };
 
--- a/mencoder.c	Mon Aug 05 13:04:54 2002 +0000
+++ b/mencoder.c	Mon Aug 05 13:41:32 2002 +0000
@@ -101,22 +101,8 @@
 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->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;