shithub: patch

ref: 3f08c89e1ed7134c6ab952e78455fd764ad99e3f
dir: /man1audio-opus/

View raw version
diff -r b14fe5260932 sys/man/1/audio
--- a/sys/man/1/audio	Mon Jan 11 16:58:04 2021 +0100
+++ b/sys/man/1/audio	Tue Jan 12 00:22:23 2021 +0100
@@ -29,6 +29,13 @@
 ]
 .br
 .B audio/sundec
+.br
+.B audio/opusdec
+[
+.B -h
+] [
+.I options
+]
 .PP
 .B audio/oggenc
 .br
@@ -76,6 +83,13 @@
 .B -T
 .I field=value
 ]
+.br
+.B audio/opusenc
+[
+.B -h
+] [
+.I options
+]
 .PP
 .B audio/pcmconv
 [
@@ -128,11 +142,12 @@
 The encoders read PCM on standard input and produce compressed audio
 on standard output.
 .PP
-.I Flacenc,
-.I oggenc
+.IR Flacenc ,
+.IR oggenc ,
+.IR opusenc ,
 and
 .I mp3enc
-produce FLAC, OGG Vorbis and MP3 audio. For
+produce FLAC, OGG Vorbis, OGG Opus and MP3 audio. For
 .I mp3enc,
 the MP3 file will use `constant bit-rate' (CBR) encoding by default, 
 but that can be changed via
@@ -141,8 +156,11 @@
 or
 .BR -v
 (variable bitrate, VBR).
+.I Opusenc
+uses VBR by default.
 .PP
-.I Flacenc
+.IR Flacenc ,
+.I opusenc
 and
 .I oggenc
 accept raw PCM in the same byte order as
@@ -275,6 +293,20 @@
 .B --voice
 experimental voice mode
 .SS
+Like
+.IR mp3enc ,
+opusenc accepts a number of long options to configure encoding parameters,
+input options and metadata.
+By default, it assumes raw PCM in the same byte order as
+.B /dev/audio
+with a 44.1KHz sampling rate and two channels.
+Similarly,
+.I opusdec
+will output that same format by default.
+Known knobs for both programs can be displayed with the
+.B -h
+option.
+.SS
 .I Pcmconv
 is a helper program used to convert various PCM sample formats. The
 .B -i
@@ -387,6 +419,12 @@
 .EX
 dd -conv swab | audio/mp3enc -a -r -m m --resample 16 -b 24
 .EE
+.LP
+Transcoding a FLAC file to Ogg Opus with slightly higher quality settings than default:
+.IP
+.EX
+audio/flacdec <foo.flac | audio/opusenc --music --downmix-stereo --bitrate 128 >foo.opus
+.EE
 .SH SOURCE
 .B /sys/src/cmd/audio
 .SH "SEE ALSO"