Skip to content

Commit

Permalink
[cli] gh-688: Update latency options in tools
Browse files Browse the repository at this point in the history
- update help messages
- update man pages
- add missing options to roc-send
- use "auto" instead of "default" for CLI options
- cleanup options order
  • Loading branch information
gavv committed Jul 31, 2024
1 parent b4137af commit b4231db
Show file tree
Hide file tree
Showing 17 changed files with 414 additions and 303 deletions.
83 changes: 48 additions & 35 deletions docs/man/roc-recv.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ Print version and exit
.B \-v\fP,\fB \-\-verbose
Increase verbosity level (may be used multiple times)
.TP
.BI \-\-color\fB= ENUM
Set colored logging mode for stderr output (possible values=\(dqauto\(dq, \(dqalways\(dq, \(dqnever\(dq default=\(gaauto\(aq)
.TP
.B \-L\fP,\fB \-\-list\-supported
list supported schemes and formats
List supported schemes and formats
.TP
.BI \-o\fP,\fB \-\-output\fB= IO_URI
Output file or device URI
Expand All @@ -63,6 +66,9 @@ Backup file or device URI (if set, used when there are no sessions)
.BI \-\-backup\-format\fB= FILE_FORMAT
Force backup file format
.TP
.B \-1\fP,\fB \-\-oneshot
Exit when last connected client disconnects (default=off)
.TP
.BI \-s\fP,\fB \-\-source\fB= ENDPOINT_URI
Local source endpoint
.TP
Expand All @@ -76,70 +82,64 @@ Local control endpoint
IPv4 or IPv6 address of the network interface on which to join the multicast group
.TP
.B \-\-reuseaddr
enable SO_REUSEADDR when binding sockets
Enable SO_REUSEADDR when binding sockets
.TP
.BI \-\-io\-latency\fB= STRING
Playback target latency, TIME units
Playback device latency, TIME units
.TP
.BI \-\-target\-latency\fB= STRING
Target latency, TIME units
Target latency, TIME units or \(aqauto\(aq for adaptive mode (default=\(gaauto\(aq)
.TP
.BI \-\-latency\-tolerance\fB= STRING
Maximum deviation from target latency, TIME units
.TP
.BI \-\-start\-latency\fB= STRING
Start latency, target\-latency must be \(aqauto\(aq or unset, TIME units
Starting target latency in adaptive mode, TIME units
.TP
.BI \-\-min\-latency\fB= STRING
Minimum allowed latency, target\-latency and latency\-tolerance must be 0 or unset, TIME units
Minimum target latency in adaptive mode, TIME units
.TP
.BI \-\-max\-latency\fB= STRING
Maximum allowed latency, target\-latency and latency\-tolerance must be 0 or unset, TIME units
Maximum target latency in adaptive mode, TIME units
.TP
.BI \-\-no\-play\-timeout\fB= STRING
No playback timeout, TIME units
No\-playback timeout, TIME units
.TP
.BI \-\-choppy\-play\-timeout\fB= STRING
Choppy playback timeout, TIME units
.TP
.BI \-\-frame\-len\fB= TIME
Duration of the internal frames, TIME units
.TP
.BI \-\-max\-packet\-size\fB= SIZE
Maximum packet size, in SIZE units
.TP
.BI \-\-max\-frame\-size\fB= SIZE
Maximum internal frame size, in SIZE units
.TP
.BI \-\-rate\fB= INT
Override output sample rate, Hz
.TP
.BI \-\-latency\-backend\fB= ENUM
Which latency to use in latency tuner (possible values=\(dqniq\(dq default=\(ganiq\(aq)
.TP
.BI \-\-latency\-profile\fB= ENUM
Latency tuning profile (possible values=\(dqdefault\(dq, \(dqresponsive\(dq, \(dqgradual\(dq, \(dqintact\(dq default=\(gadefault\(aq)
Latency tuning profile (possible values=\(dqauto\(dq, \(dqresponsive\(dq, \(dqgradual\(dq, \(dqintact\(dq default=\(gaauto\(aq)
.TP
.BI \-\-resampler\-backend\fB= ENUM
Resampler backend (possible values=\(dqdefault\(dq, \(dqbuiltin\(dq, \(dqspeex\(dq, \(dqspeexdec\(dq default=\(gadefault\(aq)
Resampler backend (possible values=\(dqauto\(dq, \(dqbuiltin\(dq, \(dqspeex\(dq, \(dqspeexdec\(dq default=\(gaauto\(aq)
.TP
.BI \-\-resampler\-profile\fB= ENUM
Resampler profile (possible values=\(dqlow\(dq, \(dqmedium\(dq, \(dqhigh\(dq default=\(gamedium\(aq)
.TP
.BI \-\-plc\fB= ENUM
Which PLC algorithm to use (possible values=\(dqnone\(dq, \(dqbeep\(dq default=\(ganone\(aq)
.TP
.B \-1\fP,\fB \-\-oneshot
Exit when last connected client disconnects (default=off)
.BI \-\-rate\fB= INT
Override output device sample rate, Hz
.TP
.BI \-\-frame\-len\fB= TIME
Duration of the I/O frames, TIME units
.TP
.BI \-\-max\-packet\-size\fB= SIZE
Maximum packet size, in SIZE units
.TP
.BI \-\-max\-frame\-size\fB= SIZE
Maximum internal frame size, in SIZE units
.TP
.B \-\-profile
Enable self\-profiling (default=off)
.TP
.BI \-\-dump\fB= STRING
.BI \-\-dump\fB= PATH
Path for a CSV file where to dump run\-time metrics
.TP
.BI \-\-color\fB= ENUM
Set colored logging mode for stderr output (possible values=\(dqauto\(dq, \(dqalways\(dq, \(dqnever\(dq default=\(gaauto\(aq)
.UNINDENT
.SS Endpoint URI
.sp
Expand Down Expand Up @@ -486,7 +486,7 @@ $ roc\-recv \-vv \-s rtp+ldpc://0.0.0.0:10001 \-r ldpc://0.0.0.0:10002 \e
.UNINDENT
.UNINDENT
.sp
Select lower session latency:
Select fixed streaming latency instead of adaptive latency:
.INDENT 0.0
.INDENT 3.5
.sp
Expand All @@ -498,7 +498,7 @@ $ roc\-recv \-vv \-s rtp://0.0.0.0:10001 \-\-target\-latency=50ms
.UNINDENT
.UNINDENT
.sp
Select lower I/O latency and frame length:
Select I/O latency and frame length:
.INDENT 0.0
.INDENT 3.5
.sp
Expand All @@ -511,28 +511,28 @@ $ roc\-recv \-vv \-s rtp://0.0.0.0:10001 \e
.UNINDENT
.UNINDENT
.sp
Manually specify thresholds and timeouts:
Manually specify thresholds for adaptive latency:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ roc\-recv \-vv \-s rtp://0.0.0.0:10001 \e
\-\-target\-latency=50ms \-\-min\-latency=40ms \-\-max\-latency 60ms \e
\-\-no\-play\-timeout=200ms \-\-choppy\-play\-timeout=500ms
\-\-target\-latency=auto \e
\-\-start\-latency=300ms \-\-min\-latency=100ms \-\-max\-latency 500ms
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Manually specify resampling parameters:
Manually specify timeouts:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ roc\-recv \-vv \-s rtp://0.0.0.0:10001 \e
\-\-resampler\-backend=speex \-\-resampler\-profile=high
\-\-no\-play\-timeout=200ms \-\-choppy\-play\-timeout=500ms
.ft P
.fi
.UNINDENT
Expand All @@ -550,6 +550,19 @@ $ roc\-recv \-vv \-s rtp://0.0.0.0:10001 \e
.fi
.UNINDENT
.UNINDENT
.sp
Manually specify resampling parameters:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ roc\-recv \-vv \-s rtp://0.0.0.0:10001 \e
\-\-resampler\-backend=speex \-\-resampler\-profile=high
.ft P
.fi
.UNINDENT
.UNINDENT
.SH ENVIRONMENT VARIABLES
.sp
The following environment variables are supported:
Expand Down
65 changes: 37 additions & 28 deletions docs/man/roc-send.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ Print version and exit
.B \-v\fP,\fB \-\-verbose
Increase verbosity level (may be used multiple times)
.TP
.BI \-\-color\fB= ENUM
Set colored logging mode for stderr output (possible values=\(dqauto\(dq, \(dqalways\(dq, \(dqnever\(dq default=\(gaauto\(aq)
.TP
.B \-L\fP,\fB \-\-list\-supported
list supported schemes and formats
List supported schemes and formats
.TP
.BI \-i\fP,\fB \-\-input\fB= IO_URI
Input file or device URI
Expand All @@ -67,16 +70,40 @@ Remote repair endpoint
Remote control endpoint
.TP
.B \-\-reuseaddr
enable SO_REUSEADDR when binding sockets
Enable SO_REUSEADDR when binding sockets
.TP
.BI \-\-io\-latency\fB= STRING
Recording target latency, TIME units
Recording device latency, TIME units
.TP
.BI \-\-target\-latency\fB= STRING
Target latency, TIME units
Target latency (only for sender\-side tuning), TIME units or \(aqauto\(aq for adaptive mode
.TP
.BI \-\-latency\-tolerance\fB= STRING
Maximum deviation from target latency, TIME units
Maximum deviation from target latency (only for sender\-side tuning), TIME units
.TP
.BI \-\-start\-latency\fB= STRING
Starting target latency in adaptive mode (only for sender\-side tuning), TIME units
.TP
.BI \-\-min\-latency\fB= STRING
Minimum target latency in adaptive mode (only for sender\-side tuning), TIME units
.TP
.BI \-\-max\-latency\fB= STRING
Maximum target latency in adaptive mode (only for sender\-side tuning), TIME units
.TP
.BI \-\-latency\-backend\fB= ENUM
Which latency to use in latency tuner (possible values=\(dqniq\(dq default=\(ganiq\(aq)
.TP
.BI \-\-latency\-profile\fB= ENUM
Latency tuning profile (possible values=\(dqresponsive\(dq, \(dqgradual\(dq, \(dqintact\(dq default=\(gaintact\(aq)
.TP
.BI \-\-resampler\-backend\fB= ENUM
Resampler backend (possible values=\(dqauto\(dq, \(dqbuiltin\(dq, \(dqspeex\(dq, \(dqspeexdec\(dq default=\(gaauto\(aq)
.TP
.BI \-\-resampler\-profile\fB= ENUM
Resampler profile (possible values=\(dqlow\(dq, \(dqmedium\(dq, \(dqhigh\(dq default=\(gamedium\(aq)
.TP
.BI \-\-rate\fB= INT
Override input device sample rate, Hz
.TP
.BI \-\-nbsrc\fB= INT
Number of source packets in FEC block
Expand All @@ -88,37 +115,19 @@ Number of repair packets in FEC block
Outgoing packet length, TIME units
.TP
.BI \-\-frame\-len\fB= TIME
Duration of the internal frames, TIME units
Duration of the I/O frames, TIME units
.TP
.BI \-\-max\-packet\-size\fB= SIZE
Maximum packet size, in SIZE units
.TP
.BI \-\-max\-frame\-size\fB= SIZE
Maximum internal frame size, in SIZE units
.TP
.BI \-\-rate\fB= INT
Override input sample rate, Hz
.TP
.BI \-\-latency\-backend\fB= ENUM
Which latency to use in latency tuner (possible values=\(dqniq\(dq default=\(ganiq\(aq)
.TP
.BI \-\-latency\-profile\fB= ENUM
Latency tuning profile (possible values=\(dqresponsive\(dq, \(dqgradual\(dq, \(dqintact\(dq default=\(gaintact\(aq)
.TP
.BI \-\-resampler\-backend\fB= ENUM
Resampler backend (possible values=\(dqdefault\(dq, \(dqbuiltin\(dq, \(dqspeex\(dq, \(dqspeexdec\(dq default=\(gadefault\(aq)
.TP
.BI \-\-resampler\-profile\fB= ENUM
Resampler profile (possible values=\(dqlow\(dq, \(dqmedium\(dq, \(dqhigh\(dq default=\(gamedium\(aq)
.TP
.B \-\-profile
Enable self\-profiling (default=off)
.TP
.BI \-\-dump\fB= STRING
.BI \-\-dump\fB= PATH
Path for a CSV file where to dump run\-time metrics
.TP
.BI \-\-color\fB= ENUM
Set colored logging mode for stderr output (possible values=\(dqauto\(dq, \(dqalways\(dq, \(dqnever\(dq default=\(gaauto\(aq)
.UNINDENT
.SS Endpoint URI
.sp
Expand Down Expand Up @@ -429,7 +438,7 @@ $ roc\-send \-vv \-i file:./input.wav \-s rtp+ldpc://192.168.0.3:10001 \e
.UNINDENT
.UNINDENT
.sp
Select lower I/O latency and frame length:
Select I/O latency and frame length:
.INDENT 0.0
.INDENT 3.5
.sp
Expand Down Expand Up @@ -463,11 +472,11 @@ Perform latency tuning on sender instead of receiver:
.ft C
$ roc\-recv \-vv \-o pulse://default \-s rtp+rs8m://0.0.0.0:10001 \e
\-r rs8m://0.0.0.0:10002 \-c rtcp://0.0.0.0:10003 \e
\-\-latency\-profile=intact \-\-target\-latency=200ms
\-\-latency\-profile=intact \-\-target\-latency=auto \-\-start\-latency=300ms

$ roc\-send \-vv \-i file:./input.wav \-s rtp+rs8m://192.168.0.3:10001 \e
\-r rs8m://192.168.0.3:10002 \-c rtcp://192.168.0.3:10003 \e
\-\-latency\-profile=gradual \-\-target\-latency=200ms
\-\-latency\-profile=gradual \-\-target\-latency=auto \-\-start\-latency=300ms
.ft P
.fi
.UNINDENT
Expand Down
Loading

0 comments on commit b4231db

Please sign in to comment.