changeset 12489:4a8748f99375

more lame options
author rfelker
date Wed, 19 May 2004 04:33:00 +0000
parents 3305ae82dae3
children 09c30d0d0d55
files cfg-mencoder.h mencoder.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mencoder.h	Tue May 18 21:19:36 2004 +0000
+++ b/cfg-mencoder.h	Wed May 19 04:33:00 2004 +0000
@@ -35,6 +35,10 @@
 	{"vol", &lame_param_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10, NULL},
 	{"lowpassfreq",&lame_param_lowpassfreq, CONF_TYPE_INT, CONF_RANGE, -1, 48000,0},
 	{"highpassfreq",&lame_param_highpassfreq, CONF_TYPE_INT, CONF_RANGE, -1, 48000,0},
+	{"nofree", &lame_param_free_format, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+	{"free", &lame_param_free_format, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{"br_min", &lame_param_br_min, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL},
+	{"br_max", &lame_param_br_max, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL},
 #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},
--- a/mencoder.c	Tue May 18 21:19:36 2004 +0000
+++ b/mencoder.c	Wed May 19 04:33:00 2004 +0000
@@ -224,6 +224,9 @@
 float lame_param_scale=-1; // unset
 int lame_param_lowpassfreq = 0; //auto
 int lame_param_highpassfreq = 0; //auto
+int lame_param_free_format = 0; //disabled
+int lame_param_br_min = 0; //not specified
+int lame_param_br_max = 0; //not specified
 
 #if HAVE_MP3LAME >= 392
 int lame_param_fast=0; // unset
@@ -1007,10 +1010,13 @@
 lame_set_num_channels(lame,mux_a->wf->nChannels);
 lame_set_out_samplerate(lame,mux_a->wf->nSamplesPerSec);
 lame_set_quality(lame,lame_param_algqual); // 0 = best q
+if(lame_param_free_format) lame_set_free_format(lame,1);
 if(lame_param_vbr){  // VBR:
     lame_set_VBR(lame,lame_param_vbr); // vbr mode
     lame_set_VBR_q(lame,lame_param_quality); // 0 = best vbr q  5=~128k
     if(lame_param_br>0) lame_set_VBR_mean_bitrate_kbps(lame,lame_param_br);
+    if(lame_param_br_min>0) lame_set_VBR_min_bitrate_kbps(lame,lame_param_br_min);
+    if(lame_param_br_max>0) lame_set_VBR_max_bitrate_kbps(lame,lame_param_br_max);
 } else {    // CBR:
     if(lame_param_br>0) lame_set_brate(lame,lame_param_br);
 }