add audio(1)

This commit is contained in:
cinap_lenrek 2012-02-12 01:52:23 +01:00
parent 4434678e51
commit 0388ad2339
2 changed files with 53 additions and 93 deletions

View file

@ -1,24 +1,18 @@
.TH FLACDEC 1 .TH AUDIO 1
.SH NAME .SH NAME
flacdec \- decode FLAC audio files mp3dec, mp3enc, oggdec, oggenc, flacdec \- decode and encode audio files
.br
mp3dec \- decode MPEG layer 3 audio files
.br
mp3enc \- encode MPEG layer 3 audio files
.br
oggdec \- decode Ogg Vorbis audio files
.br
oggenc \- encode Ogg Vorbis audio files
.SH SYNOPSIS .SH SYNOPSIS
.B audio/flacdec
.br
.B audio/mp3dec .B audio/mp3dec
[ [
.B -d .B -d
] ]
.br .br
.in +0.5i .B audio/oggdec
.ti -0.5i .br
.B audio/flacdec
.PP
.B audio/oggenc
.br
.B audio/mp3enc .B audio/mp3enc
[ [
.B -hprv .B -hprv
@ -42,38 +36,38 @@ q ] [
] [ ] [
.I "long or silly options" .I "long or silly options"
] ]
.in -0.5i
.B audio/oggdec
.br
.B audio/oggenc
.SH DESCRIPTION
.I Flacdec, mp3dec and oggdec
decode audio from standard input,
writing 16-bit stereo linear PCM sample data to
standard output. The
.B -d
option enables debug prints to standard error.
.PP .PP
.I Mp3enc .SH DESCRIPTION
compresses audio on standard input, These programs decode and encode various audio formats from and to
normally PCM-encoded, 16-bit stereo PCM (little endian). The decoders read the compressed
and produces MP3-encoded audio on standard output. audio data from standard input and produce PCM on standard output at
By default, the MP3 file will use `constant bit-rate' (CBR) a sampling frequency of 44.1KHz.
encoding, but that can be changed via .PP
.I Mp3dec
decodes MPEG audio (layer 1, 2 and 3). The
.B -d
option enables debug output to standard error.
.I Oggdec
and
.I flacdec
are like
.I mp3dec
but decode OGG Vorbis and FLAC lossless audio.
.PP
The encoders read PCM on standard input and produce compressed audio
on standard output.
.I Oggenc
and
.I mp3enc
produce OGG Vorbis and MP3 audio. For
.I mp3enc,
the MP3 file will use `constant bit-rate' (CBR) encoding by default,
but that can be changed via
.B --abr .B --abr
(average bitrate desired, ABR) (average bitrate desired, ABR)
or or
.BR -v .BR -v
(variable bitrate, VBR). (variable bitrate, VBR).
.PP
.I Oggenc
reads 44100Hz 16 bit LSB stereo data from standard input, and writes
encoded
.I 128 kbit/s
variable bit rate
.I ogg vorbis
stream to standard output.
.SH MP3ENC OPTIONS
.SS Options .SS Options
.TF "\fB-b \fP" .TF "\fB-b \fP"
.TP .TP
@ -199,84 +193,48 @@ disable VBR histogram display
.BI --voice .BI --voice
experimental voice mode experimental voice mode
. .
.SH EXAMPLES .SH EXAMPLE
Play a Plays back a
.L .flac
file:
.IP
.EX
audio/flacdec < foo.flac >/dev/audio
.EE
.LP
Play an
.L .mp3 .L .mp3
file:
.IP .IP
.EX .EX
games/mp3dec < foo.mp3 >/dev/audio audio/mp3dec <foo.mp3 >/dev/audio
.EE .EE
.LP .LP
Encode a Encode a
.L .wav .L .wav
file as highest-quality MP3: file as highest-quality MP3.
.IP .IP
.EX .EX
games/mp3enc -q 0 -b 320 <foo.wav >foo.mp3 audio/mp3enc -q 0 -b 320
.EE .EE
.LP .LP
Create a fixed 128Kb/s MP3 file from a Create a fixed 128Kb/s MP3 file from a
.L .wav .L .wav
file: file.
.IP .IP
.EX .EX
games/mp3enc -h <foo.wav >foo.mp3 audio/mp3enc -h <foo.wav >foo.mp3
.EE .EE
.LP .LP
Stream from stereo 44.1KHz raw PCM data, encoding mono at 16KHz Streaming from stereo 44.1KHz raw PCM data, encoding mono at 16KHz
(you may not need (you may not need
.IR dd ): .IR dd ):
.IP .IP
.EX .EX
dd -conv swab | games/mp3enc -a -r -m m --resample 16 -b 24 >foo.mp3 dd -conv swab | audio/mp3enc -a -r -m m --resample 16 -b 24
.EE
.LP
Play an
.L .ogg
file:
.IP
.EX
audio/oggdec < foo.ogg > /dev/audio
.EE
.LP
Encode a
.L .wav
file as an
.L .ogg
file:
.IP
.EX
audio/oggenc < foo.wav > foo.ogg
.EE .EE
.SH SOURCE .SH SOURCE
.B /sys/src/cmd/audio/mp3dec .B /sys/src/cmd/audio
.br
.B /sys/src/cmd/audio/mp3enc
.br
.B /sys/src/cmd/audio/oggdec
.br
.B /sys/src/cmd/audio/oggenc
.SH "SEE ALSO" .SH "SEE ALSO"
.IR dd (1), .IR play (1),
.IR audio (3),
.IR cdfs (4),
.IR juke (7), .IR juke (7),
.IR playlistfs (7) .IR playlistfs (7)
.br .br
.B http://www.underbit.com/products/mad/ .B http://www.underbit.com/products/mad/
.br .br
.B http://www.sulaco.org/mp3 .B http://xiph.org/doc/
.br
.B http://flac.sourceforge.net/documentation.html
.SH BUGS .SH BUGS
GNU behemoths, lightly tamed. Quality is much better than encoders It's another GNU behemoth, lightly tamed.
based on the ISO routines, but still not as good as the FhG encoder.
.PP
There are zillions of undocumented options.

View file

@ -45,6 +45,9 @@ Mpeg audio.
.TP .TP
.B ogg .B ogg
Ogg vorbis. Ogg vorbis.
.TP
.B flac
FLAC lossless audio.
.PP .PP
By default, raw audio data is written to By default, raw audio data is written to
.B /dev/audio .B /dev/audio
@ -54,6 +57,5 @@ option.
.SH SOURCE .SH SOURCE
.B /rc/bin/play .B /rc/bin/play
.SH "SEE ALSO" .SH "SEE ALSO"
.IR mp3dec (1), .IR audio (1),
.IR oggdec (1),
.IR hget (1) .IR hget (1)