From 57186ae7db4905b7c9dcad2fd6cfa42e211f933d Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 10 Dec 2003 22:20:19 +0000 Subject: [PATCH] vbitrate calculator --- br_calc.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 br_calc.c diff --git a/br_calc.c b/br_calc.c new file mode 100644 index 0000000..68fbed4 --- /dev/null +++ b/br_calc.c @@ -0,0 +1,29 @@ +#include +#include + +#define CD (700*1024*8) + +int main(int argc, char **argv) { + + int time; + int cds; + int abitrate; + + if (argc!=4) { + puts("usage: %s <#cd's> "); + return -1; + } + + time=atoi(argv[2]); + cds=atoi(argv[1]); + abitrate=atoi(argv[3]); + + /* time in seconds */ + time*=60; + + printf("use %d kb/s as vbitrate when encoding with %d kb/s of audiodata!\n", + ((cds*CD)/time)-abitrate, + abitrate); + + return 1; +} -- 2.39.2