From: kramm Date: Sun, 30 Nov 2003 08:11:32 +0000 (+0000) Subject: added --mp3-bitrate parameter. X-Git-Tag: release-0-5-0~138 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=5a7d40053ad2e9ba256076ef36b18b557b8033a1 added --mp3-bitrate parameter. --- diff --git a/avi2swf/avi2swf.cc b/avi2swf/avi2swf.cc index c63df79..be11eba 100644 --- a/avi2swf/avi2swf.cc +++ b/avi2swf/avi2swf.cc @@ -71,6 +71,7 @@ static int flashversion = 6; static int keyframe_interval = -1; static int skip = 0; static float audio_adjust = 0; +static int mp3_bitrate = 32; struct options_t options[] = { @@ -78,6 +79,7 @@ struct options_t options[] = {"A","adjust"}, {"o","output"}, {"p","flip"}, + {"m","mp3-bitrate"}, {"q","quality"}, {"s","scale"}, {"S","skip"}, @@ -125,6 +127,10 @@ int args_callback_option(char*name,char*val) expensive = 1; return 0; } + else if(!strcmp(name, "m")) { + mp3_bitrate = atoi(val); + return 0; + } else if(!strcmp(name, "S")) { skip = atoi(val); return 1; @@ -151,6 +157,7 @@ void args_callback_usage(char*name) printf("\t-o , --output filename\t Specify output filename\n"); printf("\t-A , --adjust seconds\t Audio adjust: Shift sound -seconds to the future or +seconds into the past.\n"); printf("\t-n , --num frames\t Number of frames to encode\n"); + printf("\t-m , --mp3-bitrate \t Set the mp3 bitrate to encode audio with\n"); printf("\t-d , --scale \t Scale down to factor . (in %, e.g. 100 = original size)\n"); printf("\t-p , --flip\t\t Turn movie upside down\n"); printf("\t-q , --quality \t Set the quality to . (0-100, 0=worst, 100=best, default:80)\n"); @@ -509,7 +516,7 @@ int main (int argc,char ** argv) v2swf_setparameter(&v2swf, "quality", itoa(quality)); v2swf_setparameter(&v2swf, "blockdiff", "0"); v2swf_setparameter(&v2swf, "blockdiff_mode", "exact"); - v2swf_setparameter(&v2swf, "mp3_bitrate", "32"); + v2swf_setparameter(&v2swf, "mp3_bitrate", itoa(mp3_bitrate)); //v2swf_setparameter(&v2swf, "fixheader", "1"); //v2swf_setparameter(&v2swf, "framerate", "15"); v2swf_setparameter(&v2swf, "scale", ftoa(scale));