Skip to end of metadata
Go to start of metadata

stream find-all

Shows all the streams list on the server

Example:

stream find-all

stream find

Find stream on the server by criteria

Parameters:
[--msId | --mediaSessionId] media session identifier
[-n | --name] stream name
[-p | --published] is the stream published
[-s | --status] stream state

Example:

stream find --name test --published true

stream record-start

Start the stream recording

Parameters:
<mediaSessionId> media session identifier (mandatory)
[--template] stream recording file name template
[--rotation] stream rotation rule

Example:

stream record-start --template {streamName}-{startTime} --rotation 30 f46c2dc0-43ea-11ea-9ddf-8324a20161a0

stream record-stop

Stop the stream recording

Parameters:
<mediaSessionId> media session identifier (mandatory)

Example:

stream record-stop f46c2dc0-43ea-11ea-9ddf-8324a20161a0

stream record-metrics-start

Start the stream metrics recording

Parameters:
<mediaSessionId> media session identifier (mandatory)
[--rate] metrics recording rate in milliseconds, 1000 ms by default

Example:

stream record-metrics-start --rate 1000 df95f5d0-64fa-11ea-92bc-0325350b2bc7

Stream metrics will be recorded to /usr/local/FlashphonerWebCallServer/metrics/<mediaSessionId>.csv file

TS, VIDEO_RATE, VIDEO_SYNC, VIDEO_FPS, VIDEO_NACK, VIDEO_PLI, AUDIO_RATE, AUDIO_SYNC
1584084359107, 821280, 3793073159638, 30, 0, 0,31152, 3793073159596
1584084360114, 690296, 3793073160638, 30, 0, 0,31968, 3793073160616
1584084361117, 729528, 3793073161605, 29, 0, 0,32160, 3793073161616
1584084362120, 755688, 3793073162638, 31, 0, 0,32840, 3793073162616
1584084363128, 684040, 3793073163637, 30, 0, 0,32120, 3793073163636
1584084364136, 796296, 3793073164661, 30, 0, 0,31888, 3793073164636
...

stream record-metrics-stop

Stop the stream metrics recording

Parameters:
<mediaSessionId> media session identifier (mandatory)

Example:

stream record-metrics-stop df95f5d0-64fa-11ea-92bc-0325350b2bc7

stream show-metrics

Show metrics of the stream

Parameters:

[--mediaSessionId | --msid] media session identifier

[--streamName | --name | --sn] stream name

Example:

stream show-metrics --mediaSessionId 5518ffa1-5597-4af2-a06d-2f13b6bcad81

stream terminate

Stop stream playback or publishing on this server

Parameters:

<mediaSessionId> media session identifier (mandatory)

Example:

stream terminate 19be2809-6f2a-48fc-b67e-48acd3d578c8

Packet dumping for published stream

For debugging purposes, published stream packets dump recording can be launched from CLI. Stream packets are dumped before depacketizing them. Dumpa are recorded to the folder defined by the following parameter

depacketizer_dump_dir=/usr/local/FlashphonerWebCallServer/depacketizer_dump_dir

WebRTC H264, RTSP, VOD stream dumps are recorded to files with h264 extension, WebRTC VP8 streams with vp8 extension, RTMP streams with avc extension.

stream dump-start

Start published stream packets dump recording.

Parameters:
<mediaSessionId> media session identifier (mandatory)

Example:

stream dump-start a9fc6ae4-71ee-4c2c-8a5b-e5dd94819203

The same REST API query

curl -s -H "Content-Type: application/json" -X POST http://localhost:8081/rest-api/stream/dumper/startup -d '{"mediaSessionId":"a9fc6ae4-71ee-4c2c-8a5b-e5dd94819203"}'

stream dump-stop

Stop published stream packets dump recording.

Parameters:
<mediaSessionId> media session identifier (mandatory)

Example:

stream dump-stop a9fc6ae4-71ee-4c2c-8a5b-e5dd94819203

The same REST API query

curl -s -H "Content-Type: application/json" -X POST http://localhost:8081/rest-api/stream/dumper/terminate -d '{"mediaSessionId":"a9fc6ae4-71ee-4c2c-8a5b-e5dd94819203"}'