EnglishFrenchSpanish

OnWorks favicon

ossrecord - Online in the Cloud

Run ossrecord in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command ossrecord that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


ossrecord - Open Sound System recording program.

SYNOPSIS


ossrecord [-ORhlv] [-F cntname | ? ] [ -c channels ] [ -d devname ]
[ -f fmtname | ? ] [ -g gain ] [ -i recsource | ? ] [ -m nfiles ]
[ -r command ] [ -s rate ] [ -t maxsecs ] filename | - ...

DESCRIPTION


The ossrecord program records audio in Microsoft RIFF (wav) format. It will record from
any input that's currently set as the recording source by the ossxmix/ossmix mixer
programs. With the -l option, you also get a level meter that will display VU levels in a
character mode.

The filename parameter is name of the (.wav) file to be produced. Output can be sent to
stdout by giving - as the file name.

OPTIONS


-s<rate>
Select the recording rate for raw PCM audio (eg -s48000).

-c<channels>
Select the number of channels 1=mono 2=stereo, 4, 6, 8, etc.

-d<devname>
Select <devname> as the device (eg -d/dev/dsp2).

-f<fmt>
Select the input sample format (eg -fS32_LE or -fMU_LAW)

-f? Prints the list of supported format names.

-F<cnt>
Select the container format (eg WAV or AU). Default is WAV.

-F? Prints the list of supported container formats.

-R Open audio device in raw mode to disable virtual mixing and sample rate/format
conversions. Can be used when recording from a digital source (S/PDIF input).

-v Verbose output.

-l Display level meters (character based).

-i<recsrc|?>
Select the recording source or display available recording sources if '?' is
supplied. e.g. ossrecord -i? may display: vol line (currently selected) mic cd
aux1 phone mono video

-m<nfiles>
Repeat the recording operation <nfiles> times. The filename argument must have %d
(or %02d) somewhere in the file to guarantee unique filenames. If no %d is given
then subsequent recordings will overwrite the previous one(s). This option is
useful only with loopback audio devices or if the -t option is used.

-r<command>
This option launches the <command> in background after recording the file has
completed. The name of the recorded file will be given as the (only) command line
argument. When the -m option is used the script will run in parallel while
recording the next file. See the COMMAND SCRIPT section (below) for more info.

-g<gain>
Amplify recorded samples by percentage given as argument. 100 (default) means
normal signal level, 200 means double level. Only supported in 16 and 32 bit
modes.

-t<maxsecs>
Do not record more than <maxsecs> seconds in a single recording operation.

-L<level>
Set the recording level to <level>.

-O Do not allow ossrecord to overwrite the output file.

-h Display usage instructions.

COMMAND SCRIPT


The -r command line argument makes it possible to execute a script or program after
recording of the wave file is finished. Below is a simple scell script that does MP3
encoding using lame.

#!/bin/sh

WAVENAME=$1

MP3NAME=$1.mp3

lame -m s -h --preset studio $WAVENAME $MP3NAME

exit 0

Another example script for ossrecord is a simple CGI script for live MP3 streaming
(from /dev/dsp).

#!/bin/sh

echo Content-Type: audio/mp3

echo

ossrecord -S -b16 -s48 - | lame -m j - -

exit 0

NOTES


The ossrecord executable is the same as the ossplay executable. Behaviour is decided by
the name used to invoke the program.

Some file formats allocate only 32 bits to record the file length, which may prevent some
programs from reading a too large file properly. If a recording may pass the 4GB limit (a
bit more then 6 hours and 10 minutes of sound assuming [48Khz/16bit/stereo] quality), it's
best to have ossrecord use the AU or RAW containers (via -F switch) which do not have this
restriction.

Use ossrecord online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • 2
    usm
    usm
    Usm is a unified slackware package
    manager that handles automatic
    dependency resolution. It unifies
    various package repositories including
    slackware, slacky, p...
    Download usm
  • 3
    Chart.js
    Chart.js
    Chart.js is a Javascript library that
    allows designers and developers to draw
    all kinds of charts using the HTML5
    canvas element. Chart js offers a great
    array ...
    Download Chart.js
  • 4
    iReport-Designer for JasperReports
    iReport-Designer for JasperReports
    NOTE: iReport/Jaspersoft Studio Support
    Announcement: As of version 5.5.0,
    Jaspersoft Studio will be the official
    design client for JasperReports. iReport
    will...
    Download iReport-Designer for JasperReports
  • 5
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 6
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • More »

Linux commands

Ad