RTSP autostart

Corrado Steri

New Member
Hello, i am using the embedded player on one of my website pages, would it be possible to start the player when the page is opened and don't have to press the play button?
Also, i have enabled rtsp record on webcallserver config files and it does work but even if i press stop button it keeps on recording, it looks like the player can't stop the recording once the servers hooks up the rtsp stream.
One last question, RTSP takes up to 7-8 seconds to start after i press play button, is there an option to start a bit faster?
I have latest flashphone installed, downloaded it and configured yestewrday on centos7.

regards,

Corrado
 
Last edited:

Max

Administrator
Staff member
Good day.
Hello, i am using the embedded player on one of my website pages, would it be possible to start the player when the page is opened and don't have to press the play button?
You can add autoplay=true option to Embed Player call, for example
Code:
https://wcs:8888/embed_player?urlServer=wss://wcs:8443&streamName=rtsp://server:554/stream/live.sdp&mediaProviders=WebRTC&autoplay=true
Also, i have enabled rtsp record on webcallserver config files and it does work but even if i press stop button it keeps on recording, it looks like the player can't stop the recording once the servers hooks up the rtsp stream.
RTSP stream still exists on server after the last subscriber (player) swithes off until timeout (60 seconds by default) expires. So, RTSP stream recording continues during this timeout.
You can stop RTSP stream using /rtsp/terminate REST API query after all viewers are disconnected:
Code:
POST /rest-api/rtsp/terminate HTTP/1.1
Host: wcs:8081
Content-Type: application/json
 
{
    "uri":"rtsp://server:554/stream/live.sdp"
}
One last question, RTSP takes up to 7-8 seconds to start after i press play button, is there an option to start a bit faster?
This depends on RTSP source keyframe sending interval. Please add the following parameter to flashphoner.properties file:
Code:
periodic_fir_request=true[/ICODE]
By default, server will try to send PLI request to make RSTP source send a keyframe every 5 seconds. You can reduce this interval to 2 seconds:
[CODE]periodic_fir_request_interval=2000[/ICODE]
 
Top