Re: Record sound from Sound Card using OGG

From: Andy Baxter (news4_at_earthsong.null.free-online.co.uk)
Date: 05/25/04


Date: Tue, 25 May 2004 21:33:18 +0100

tuffu said:

> On 25 May 2004 15:13:07 GMT,
> Kevin Cosgrove <Kevin@nowhere.gov> wrote:
>> tuffu <spam@SPAM.spa> wrote:
>>> I need to record audio from my sound card input/inline
>>> to ogg format. What is the best method to do this in linux?
>>> I Hope I can do this from the command line.
>>
>> If you like command line, then certainly use SoX. It should be
>> on your distribution CD(s) and at sourceforge.net
>>
>> G'luck...
>>
>
> Well how do I grab the input from the sound card line in
> and save it to the file? There are plenty of examples
> on who to convert files, but not how to grab the raw data
> and save it to a file.
>
> Thanks.

I use brec, which in debian is in the 'bplay' package.

$ brec -S -s 44100 -b 16 -w file.wav

will record a file from line in at CD stereo quality in wav format, which
you can convert to ogg later using sox or oggenc. (oggenc is probably
better).

I've been recording vinyl albums like this, and the wav file for two sides
works out around 500 Mbytes. Once I've recorded it on the audio machine
in the living room, I move it to my workstation upstairs, then split the
tracks using rezound, then burn it to CD.

If you want to store recorded wav tracks with no loss of quality (compared
to ogg or mpg123 which are lossy formats), have a look at flac. (only
about 50% compression though).

Or if you have alsa installed, try arecord (another command line program).

If you want a gui program, rezound is a nice audio editor which lets you
record from line in with a level indicator to adjust the volume. It will
also start recording automatically when the level goes above a threshold.

-- 
http://www.niftybits.ukfsn.org/
remove 'n-u-l-l' to email me. html mail or attachments will go in the spam
bin unless notified with [html] or [attachment] in the subject line. 


Relevant Pages

  • How to calculate a value for mencoder -af volume
    ... from the mixing desk, so the audio is better quality, but it's much ... This filter has a second feature: ... wav and analysed it in sox. ...
    (uk.comp.os.linux)
  • Re: Linux Applications for OS X
    ... Why did you bring up command lines? ... I do know that to install software on Ubuntu the advice I was repeatedly ... How would you install mpg123, mpg321, and sox on the newest Ubuntu? ...
    (comp.sys.mac.advocacy)
  • Re: Linux Applications for OS X
    ... Why did you bring up command lines? ... I do know that to install software on Ubuntu the advice I was ... mpg321, and sox). ...
    (comp.sys.mac.advocacy)
  • [ GLSA 200407-23 ] SoX: Multiple buffer overflows
    ... SoX contains two buffer overflow vulnerabilities in the WAV header ... commands when handling WAV files with specially crafted header fields. ... Security is a primary focus of Gentoo Linux and ensuring the ...
    (Bugtraq)
  • [Full-Disclosure] [ GLSA 200407-23 ] SoX: Multiple buffer overflows
    ... SoX contains two buffer overflow vulnerabilities in the WAV header ... commands when handling WAV files with specially crafted header fields. ... Security is a primary focus of Gentoo Linux and ensuring the ...
    (Full-Disclosure)