Posted March 26, 2009
© 2003-2017 Tom Clegg.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
There is no warranty. If you need a warranty, you cannot use this software. Sorry!
$ mp3cat [options] - - < infile.mp3 > outfile.mp3 $ mp3cat [options] - outdir < infile.mp3 $ mp3cat [options] indir - > outfile.mp3 $ mp3cat [options] indir outdir
mkdir -p /usr/local/src cd /usr/local/src git clone https://github.com/tomclegg/mp3cat cd mp3cat make install
Filtering mp3 files
$ mp3cat - - < infile.mp3 > outfile.mp3
Writing to an mp3dir
Instead of standard output,
$ mkdir /var/log/mp3files $ mp3cat - /var/log/mp3files < some-large-file.mp3 $ ls /var/log/mp3files current.mp3 t1033516598.mp3 t1033516599.mp3
Control the size of mp3 segments with the
$ mp3cat --size 14745600 - /var/log/mp3files < some-large-file.mp3
You can make an audio logger by reading from your sound card and writing to an mp3dir. Scripts to set this up are included. If svscan is running in /service, you can set up a logging service like this:
# set up logging and cleaning services: cd /var/service pw useradd mp3log -d /nonexistent -s /usr/bin/true pw useradd mp3logl -d /nonexistent -s /usr/bin/true mp3log-conf mp3log mp3logl /var/service/mp3log /var/log/mp3log /dev/dsp 32 # start the services chown root:mp3log /dev/dsp chmod 660 /dev/dsp ln -s /var/service/mp3log /service/ ln -s /var/service/mp3log-clean /service/
Reading from an mp3dir
Instead of standard input,
You can turn your audio logger into an MP3 radio station by reading
from the logger's mp3dir and writing to a network client. Here is a
guide to using
OptionsThe following options are accepted before indir and outdir arguments.
This software was written for Kootenay Cooperative Radio, an FM station in Nelson, British Columbia. You can listen to KCR's MP3 stream at cjly.net/live. You can download segments from earlier this week at recent.cjly.org.
If you try
See also: dsprec for recording raw audio in FreeBSD and Linux.