aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README200
-rw-r--r--toolame.c6
2 files changed, 108 insertions, 98 deletions
diff --git a/README b/README
index cd977f1..4acc34d 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ ODR-DabMux compatible ZeroMQ output and JACK input
Copyright (C) 2002, 2003 Michael Cheng [mikecheng at NOT planckenergy.com] remove the NOT
http://www.planckenergy.com/
-Copyright (C) 2014 Matthias P. Braendli [matthias@mpb.li]
+Copyright (C) 2014, 2015 Matthias P. Braendli [matthias@mpb.li]
http://opendigitalradio.org/
All changes to the ISO source are licensed under the LGPL
@@ -54,115 +54,123 @@ USAGE
./toolame [options] <input> <output>
Input
- tooLAME parses AIFF and WAV files for file info
- raw PCM is assumed if no header is found
- for stdin use a -
- for JACK input, use -j option, and specify the name
- of the JACK port with <input>
+ tooLAME parses AIFF and WAV files for file info
+ raw PCM is assumed if no header is found
+ for stdin use a -
+ for JACK input, use -j option, and specify the name
+ of the JACK port with <input>
+ for the libvlc based input, use -V, and specify the URL
+ with <input>
Output
- file is automatically renamed from *.* to *.mp2
- for stdout use a -
+ file is automatically renamed from *.* to *.mp2
+ for stdout use a -
for zeromq use tcp://<hostname>:<port> pointing to
a ODR-DabMux
Input Options
- -s [int]
- if inputting raw PCM sound, you must specify the sample rate
- default sample rate is 44.1khz.
+ -s [int]
+ if inputting raw PCM sound, you must specify the sample rate
+ default sample rate is 44.1khz.
- -a
- downmix from stereo to mono
- if the incoming file is stereo, combine the audio into
- a single channel
+ -a
+ downmix from stereo to mono
+ if the incoming file is stereo, combine the audio into
+ a single channel
- -x
- force byte-swapping of the input. (current endian detection is dodgy,
- so if toolame produces only noise, use -x )
+ -x
+ force byte-swapping of the input. (current endian detection is dodgy,
+ so if toolame produces only noise, use -x )
- -g
- swap the LR channels of a stereo file
+ -g
+ swap the LR channels of a stereo file
Output Options
- -m [char]
- the encoding mode (default 'j')
- 's' stereo
- 'd' dual channel
- 'j' joint stereo
- 'm' mono
-
- -p [int]
- which psy model to use (default '1')
- Different models for the psychoacoustics
- Models: -1 to 4
-
- -b [int]
- the total bitrate
- For 48/44.1/32kHz default = 192
- For 24/22.05/16kHz default = 96
-
- -v [int]
- Switch on VBR mode.
- The higher the number the better the quality.
- Useful range -10 to 10.
- See README.VBR for details.
- Don't use that for DAB encoding.
+ -m [char]
+ the encoding mode (default 'j')
+ 's' stereo
+ 'd' dual channel
+ 'j' joint stereo
+ 'm' mono
+
+ -p [int]
+ which psy model to use (default '1')
+ Different models for the psychoacoustics
+ Models: -1 to 4
+
+ -b [int]
+ the total bitrate
+ For 48/44.1/32kHz default = 192
+ For 24/22.05/16kHz default = 96
+
+ -v [int]
+ Switch on VBR mode.
+ The higher the number the better the quality.
+ Useful range -10 to 10.
+ See README.VBR for details.
+ Don't use that for DAB encoding.
Operation
- -f
- fast mode turns off calculation of the psychoacoustic model.
- Instead a set of default values are assumed
+ -f
+ fast mode turns off calculation of the psychoacoustic model.
+ Instead a set of default values are assumed
- -q [int]
- quick mode calculates the psy model every 'num' frames.
+ -q [int]
+ quick mode calculates the psy model every 'num' frames.
Misc
- -d emp
- de-emphasis (default 'n')
- -c
- mark as copyright
- -o
- mark as original
- -e
- add error protection
- -r
- force padding bits off
- -D
- add DAB extensions
- -t [int]
- 'talkativity' setting. 0 = no message. 3 = too much information
+ -d emp
+ de-emphasis (default 'n')
+ -c
+ mark as copyright
+ -o
+ mark as original
+ -e
+ add error protection
+ -r
+ force padding bits off
+ -D
+ add DAB extensions
+ -t [int]
+ 'talkativity' setting. 0 = no message. 3 = too much information
*********************
EXAMPLES
*********************
1.
- toolame sound.wav
+ toolame sound.wav
- This will encode sound.wav to sound.mp2 using the default bitrate of 192 kbps
- and using the default psychoacoustic model (model 1)
+ This will encode sound.wav to sound.mp2 using the default bitrate of 192 kbps
+ and using the default psychoacoustic model (model 1)
2.
- toolame -p 2 -v 5 sound.wav newfile.mp2
+ toolame -p 2 -v 5 sound.wav newfile.mp2
- Encode sound.wav to newfile.mp2 using psychoacoustic model 2 and encoding
- with variable bitrate. The high value of the "-v" argument means that
- the encoding will tend to favour higher bitrates.
+ Encode sound.wav to newfile.mp2 using psychoacoustic model 2 and encoding
+ with variable bitrate. The high value of the "-v" argument means that
+ the encoding will tend to favour higher bitrates.
3.
- toolame -p 2 -v -5 sound.wav newfile.mp2
+ toolame -p 2 -v -5 sound.wav newfile.mp2
- Same as example above, except that the negative value of the "-v" argument
- means that the lower bitrates will be favoured over the higher ones.
+ Same as example above, except that the negative value of the "-v" argument
+ means that the lower bitrates will be favoured over the higher ones.
4.
- cat sound.pcm | toolame -s 22050 -f -b 96 - newfile.mp2
+ cat sound.pcm | toolame -s 22050 -f -b 96 - newfile.mp2
- Toolame is encoding from stdin at a bitrate of 96kbps and is using the
- 'fast' mode which means that no psychoacoustic modelling is done.The
+ Toolame is encoding from stdin at a bitrate of 96kbps and is using the
+ 'fast' mode which means that no psychoacoustic modelling is done.The
input file is raw pcm so the sample rate needs to be specified (22050Hz)
+5.
+ toolame -V -s 48 -L -b 128 http://your_stream_url tcp://localhost:9002
+
+ Use libvlc to read and decode the stream at the given url, and encode it at
+ 48000Hz sample rate to the ZeroMQ input of ODR-DabMux running on localhost:9002
+
*********************
CONTRIBUTORS
@@ -170,48 +178,48 @@ CONTRIBUTORS
Dist10 code writers
LAME specific contributions
- fht routines from Ron Mayer <mayer at acuson.com>
- fht tweaking by Mathew Hendry <math at vissci.com>
- window_subband & filter_subband from LAME circa v3.30
- (multiple LAME authors)
- (before Takehiro's window/filter/mdct combination)
+ fht routines from Ron Mayer <mayer at acuson.com>
+ fht tweaking by Mathew Hendry <math at vissci.com>
+ window_subband & filter_subband from LAME circa v3.30
+ (multiple LAME authors)
+ (before Takehiro's window/filter/mdct combination)
Oliver Lietz <lietz at nanocosmos.de>
- Tables now included in the exe! (yay! :)
+ Tables now included in the exe! (yay! :)
Patrick de Smet <pds at telin.rug.ac.be>
- scale_factor calc speedup.
- subband_quantization speedup
+ scale_factor calc speedup.
+ subband_quantization speedup
Federico Grau <grauf at rfa.org>
Bill Eldridge <bill at hk.rfa.org>
- option for "no padding"
+ option for "no padding"
Nick Burch <gagravarr at SoftHome.net>
- WAV file reading
- os/2 Makefile mods.
+ WAV file reading
+ os/2 Makefile mods.
Phillipe Jouguet <philippe.jouguet at vdldiffusion.com>
- DAB extensions
- spelling, LSF using psyII, WAVE reading
+ DAB extensions
+ spelling, LSF using psyII, WAVE reading
Henrik Herranen - leopold at vlsi.fi
- (WAVE reading)
+ (WAVE reading)
Andreas Neukoetter - anti at webhome.de
- (verbosity patch '-t' switch for transcode plugin)
+ (verbosity patch '-t' switch for transcode plugin)
Sami Sallinen - sami.sallinen at g-cluster.com
- (filter_subband loop unroll
- psycho_i fix for "% 1408" calcs)
+ (filter_subband loop unroll
+ psycho_i fix for "% 1408" calcs)
Mike Cheng <mikecheng at NOT planckenergy.com> (remove the NOT)
- Most of the rest
+ Most of the rest
Matthias P. Braendli <matthias@mpb.li>
- ZeroMQ output for ODR-DabMux
- PAD insertion for DLS and slides
- JACK input
+ ZeroMQ output for ODR-DabMux
+ PAD insertion for DLS and slides
+ JACK and libVLC input
*********************
REFERENCE PAPERS
diff --git a/toolame.c b/toolame.c
index 238197a..8c14117 100644
--- a/toolame.c
+++ b/toolame.c
@@ -668,7 +668,8 @@ void usage (void)
fprintf (stdout, "\t-a downmix from stereo to mono\n");
fprintf (stdout, "\t-x force byte-swapping of input\n");
fprintf (stdout, "\t-g swap channels of input file\n");
- fprintf (stdout, "\t-j enable jack input\n");
+ fprintf (stdout, "\t-j use jack input\n");
+ fprintf (stdout, "\t-V use libvlc input\n");
fprintf (stdout, "\t-L enable audio level display\n");
fprintf (stdout, "Output\n");
fprintf (stdout, "\t-m mode channel mode : s/d/j/m (dflt %4c)\n",
@@ -720,7 +721,7 @@ void short_usage (void)
fprintf (stderr, "tooLAME version %s\n (http://opendigitalradio.org)\n",
toolameversion);
fprintf (stderr, "MPEG Audio Layer II encoder for DAB\n\n");
- fprintf (stderr, "USAGE: %s [options] (<infile>|<jackname>) [outfile]\n\n", programName);
+ fprintf (stderr, "USAGE: %s [options] (<infile>|<jackname>|<libvlc url>) [outfile]\n\n", programName);
fprintf (stderr, "Try \"%s -h\" for more information.\n", programName);
exit (0);
}
@@ -737,6 +738,7 @@ void short_usage (void)
* syntax:
*
* -j turns on JACK input
+ * -V turns on libVLC input
* -L turns on audio level display
* -m is followed by the mode
* -y is followed by the psychoacoustic model number