Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2. Open the Two Way Streaming application. Click Connect, then Publish. Copy the identifier of the stream:

Image RemovedImage Added

3. Run VLC, select the "Media - open URLOpen network stream" menu. Enter the URL of the WCS server and enter the identifier of the stream, in this exampe:
rtsp://demo.flashphoner.com/528efc6a:

Image RemovedImage Added

4. Click the "Play" button. The player starts playing the stream:

Image RemovedImage Added

Call flow

Below is the call flow when playing a stream via RTSP in a software player.

...

  1. The software player establishes a connection to the WCS server via RTSP.
  2. The software player receives the media stream from WCS.

RTSP playback authentication via REST hook

RTSP playback authentication via REST hook acn be set up if necessary. To do this, the following parameter should be set in flashphoner.properties file:

Code Block
languagebash
themeRDark
rtsp_server_auth_enabled=true

When RTSP connection is established, /playRTSP query will be sent to backend server

Code Block
languagejs
themeRDark
URL:http://localhost:8081/apps/EchoApp/playRTSP
OBJECT:
{
  "nodeId" : "NTk1tLorQ00llGbPJuFexrKceubGCR0k@192.168.1.5",
  "appKey" : "defaultApp",
  "sessionId" : "/192.168.1.100:59711/192.168.1.5:554",
  "mediaSessionId" : "29868390-73ee-4f49-ba92-78d717c53070-test-RTSP",
  "name" : "rtsp://p11.flashphoner.com:554/test",
  "mediaProvider" : "RTSP",
  "userAgent" : "LibVLC/3.0.4 (LIVE555 Streaming Media v2016.11.28)"
}

Such query will be sent on using every RTSP method excepting OPTIONS. If backend server responds 200 OK, WCS server allows to execute RTSP method and to play RTSP stream. If backend server returns 403 Forbidden, WCS server breaks the connection with RTSP client.

Thus, RTSP client can be authenticated by RTSP stream URL, User-Agent, client and server IP address and port.

Adjusting RTSP playback parameters

To adjust RTSP playback parameters, for example, to change audio or video codec, SDP setting file rtsp_server.sdp should be used. Note that this file should contain WCS server IP address.

Known issues

1. Frame loss and picture artefacts can occur when HD stream is played via RTSP 

Symptoms: some artefacts are observed, and player log contains lost frame reports when HD stream is played via RTSP.

Solution: switch player to RTSP interleaved mode, for example, in VLC settings tab Input/Codecs set radiobutton Live 555 stream transport to RTP over RTSP (TCP)

2. Freezes can occur when WebRTC stream is played via RTSP, if player recieves no key frame

Symptoms: freezes when WebRTC stream is played as RTSP in VLC player

Solution: enable the following setting in flashphoner.properties file

Code Block
themeRDark
periodic_fir_request=true

3. When stream is played as RTSP in VLC on Windows, audio samplerate and bitrate can be displayed incorrectly due to VLC known bug.