My problem is very long recordings, longer than supported by WAV. I'm talking about continuous recordings of around eight hours in length.
Now, I do most of my recording using sox into FLAC, which makes the most sense, since those are live recordings from an external sound card.
Now, I'd like to encode that into MP3 or into AAC (in an MP4 container).
The only way I managed to do that, is using FFmpeg, but I'd actually rather use an encoder application like lame
, or neroaacenc
.
Now, I was doing that where possible, but I was using WAV as a detour. I was decoding the FLAC into WAV and then encoding the WAV into the end product. But as I said, it doesn't work for recordings over a certain length.
Now, my idea was to use pipes and force decoding into RAW and then encode that into the target format.
I need some help with this. Could someone please supply me with some examples how to decode a FLAC file, and encode that into MP3 using lame
by piping RAW data?
--fore-raw-format
and then lame needs to know how the stream is composed, that's where I have my problems (endian, sample size, etc. I tried a couple of times, but it didn't work). – polemon May 01 '12 at 13:38flac -d --force-raw-format --endian=little --sign=signed <file>.flac -c | lame -r -s 48 - <file>.mp3
. I use mostly default values. The file in this example: Endian: little, Channels: 2, Sample rate: 48kHz, Sign: signed, Bits per sample: 16. – polemon May 05 '12 at 15:36ffmpeg
? it has support forAAC
. – Thor May 17 '12 at 17:51