On Sat, 18 Apr 2020 12:48:31 +0200 Gerhard Zintel wrote:
John,
On 18/04/2020 10:50, John Murphy wrote:
I use a program which plays regions of various
.wav files. Its
output pipes into aplay like: '| aplay -f FLOAT_LE -c 2 -r 48000'
To where can I pipe its output, instead, to make a new .wav file,
or make a compressed file? Preferably faster than the region(s)
take to play.
Or, if not, make aplay write to a file instead of playing?
You can pipe into lame or oggenc as a possibility and yes, they have to create a header.
You have to advice them to get raw data and give
the header information using the flags.
man lame and man oggenc are your friends.
Tried it, thank you. It makes a file, but I presume I have the options
wrong (or I need a compile without 'libsndfile') because the result sounds
awful.
| lame -r -s 48 --little-endian - lame-test.mp3
WARNING: libsndfile may ignore -r and perform fseek's on the input.
Compile without libsndfile if this is a problem.
Assuming raw pcm input file
LAME 3.100 64bits (
http://lame.sf.net)
Using polyphase lowpass filter, transition band: 16452 Hz - 17032 Hz
Encoding <stdin> to lame-test.mp3
Encoding as 48 kHz j-stereo MPEG-1 Layer III (12x) 128 kbps qval=3
--
John.