-
Notifications
You must be signed in to change notification settings - Fork 59
Control port API
--control-port Defines control port socket to be opened, if you append :1 parameter (eg. --control-port 8000:1), it connects to previously opened socket as a client.
--start-paused Starts UltraGrid sender paused.
For reflector usage, please see here.
Note: In new UltraGrid there can be also identifier in format : instead of numerical IDs.
and have indices 0 and 1. Therefore, if you want to change target from to X, you would use following message:
port 0 receiver X
Reflector works in 2 modes - packet reflector and transcoder. Here, for it acts like packet reflector and simply forwards incoming packets to it. For hostB it transcodes incoming stream and uses libavcodec (MJPEG) compression.
To transit from one mode to another (first is for packet reflector), use following commands:
port[0] sock
and
port[0] recompress
Thereafter, if you change first port to a transcoder, you can change compression by message:
port 0 compress JPEG
You can also add and remove hosts to reflector by commands:
root delete-port
root create-port
:
<tx_port>
root create-port
:
<tx_port>
- First command removes port with index . Keep in mind that after that, ports' indices of +1 and higher are decremented by one.
- Second command appends new output port to the list. By default it is in transcoding mode with compression (can be "none").
- The third command creates new output port that retransmits incoming packets to (aka packet reflector).
Note: In older UltraGrid versions, the delimiter between and <tx_port> was a space instead of the colon.
stats on
Toggles statistics on while
stats off
toggles them off.
Default state is off.
SSRC reset of RTP stream can be done with following command:
reset-ssrc
or
port
reset-ssrc
for transcoding reflector's port
First command resets SSRC both for audio and video stream of the producent (this is not true for distributor by now since it does not support audio yet).
FEC can be changed by following command:
fec video
<new_fec_config_string>
Format of <new_fec_config_string> is exactly the same as passed to -f commandline argument.
Note: To disable FEC, simply use FEC none.
You can increase/decrease volume of the received audio stream with following commands:
volume up
and
volume down
You can also use
mute
to toggle output audio off and on.
Note: These commands work on receiver only.
UltraGrid can be started in a mode when multiple inputs are connected and UltraGrid is run with a switcher metacapture as described here. Then, control command is this:
capture.data 0
to select first input (indexed from zero)
UltraGrid can change video postprocessor on fly with following command:
postprocss
<new_video_postprocess>
eg.
postprocess border:width=10:color=#ff0000
to border.the video with 10 px red border.
When you do not want to use any video postprocessor, use following command
postprocess flush
Following commands will work on sender only and should not be send to receiver or combined sender/receiver:
sender-port
|
:
|
:
:
:
Sets requested destination port (optionally specifying source port and ports for audio).
receiver
receiver-port
|
:
Sets source port for received video (audio).
Statistics are not reported by default. To enable statistics reporting, use command:
stats on
and
stats off
to disable it.
Statistics are reported per frame and cumulatively.
Format (sender):
stats SEND
<port_id> bufferId
droppedFrames
nanoPerFrameActual
nanoPerFrameExpected
sendBytesTotal
timestamp
<millis_since_unix_epoch> compressMillis
where <port_id> is identifier of output port - default for UltraGrid, : for every output port of transcoding reflector.
Format (receiver):
stats RECV bufferId
expectedPackets
receivedPackets
expectedBytes
receivedBytes
isCorrupted
isDisplayed
timestamp
<millis_since_unix_epoch> nanoPerFrameDecompress
nanoPerFrameExpected
reportedFrames
Statistics are reported in 5 second interval.
Format
stats FWD receivedBytes
receivedPackets
timestamp
<millis_since_unix_epoch>[ portList
<port_list>]
where <port_list> is a comma separated list of output ports in format :, eg. h1.example.org:5004,h2.example.com:8000. If <port_list> is empty (no active output ports), the keyword portList is omitted from the line.
If you have any technical or non-technical question or suggestion please feel free to contact us at