Local RTSP stream to WebRTC

Discussion in 'Web Call Server 5' started by jman, Apr 13, 2017.

  1. jman

    jman New Member

    Hello,
    I'm having issues locally converting a RTSP stream to WebRTC using the Player in the Flashphoner Dashboad on the server

    The local Flashphoner server:
    wss://192.168.0.25:8443
    has no problem converting a public RTSP:
    rtsp://mpv.cdn3.bigCDN.com:554/bigCDN/definst/mp4:bigbuckbunnyiphone_400.mp4

    However it simply fails when using a local RTSP stream
    rtsp://192.168.0.11:8554/test.sdp

    VLC has no problem viewing the stream on both computers. I've also disabled the firewall on both computers.

    Any suggestions?
  2. Max

    Max Administrator Staff Member

    Hello,
    1. Please check stream codecs in VLC: Tools - Codec information
    codec.jpg
    Supported codecs:
    MPEG AAC for audio
    H264 for video
    2. Try to switch to none-interleave mode in flashphoner.properties
    Code:
    rtsp_interleaved_mode=false
    This setting requires WCS restart
    Code:
    service webcallserver restart
  3. jman

    jman New Member

    1.
    upload_2017-4-13_5-14-39.png
    Here is my Codec information. Is there any way to disable Audio stream support in Flashphoner?

    2.
    Added "rtsp_interleaved_mode=false" to flashphoner.properties. It has no effect, and still fails to convert.
  4. Max

    Max Administrator Staff Member

    MPEG Audio (mpga) is not supported.
    Audio should be MPEG AAC Audio (mpeg4a).
    It can be root cause of issue.

    You can disable audio on browser end.
    Edit file
    Code:
    /usr/local/FlashphonerWebCallServer/client2/examples/demo/streaming/player/player.js
    and add option
    Code:
    constraints: {audio:false}
    as described below:
    Code:
    function playStream(session) {
        var streamName = $('#streamName').val();
        var options = {
            name: streamName,
            display: remoteVideo,
            constraints: {audio:false}
        };
    ..
    }
    It will play with video only.
    Make sure
    1. You reverted interleaved mode to enabled state
    rtsp_interleaved_mode=true
    2. Your old player.js was not cached in browser.
  5. jman

    jman New Member

    1. Done

    2. Also done. Public RTSP now plays without audio. My other RTSP stream still fails however. Here is the log:

    06:34:41,659 INFO agerRemoteRmiService - RMI TCP Connection(6)-127.0.0.1 RECEIVED REST OBJECT <==
    URL:http://localhost:9091/EchoApp/StreamStatusEvent
    OBJECT:
    {
    "nodeId" : "omolA9gxIF5cvauTdERRo0Tpzh159OEx@192.168.0.25",
    "appKey" : "defaultApp",
    "sessionId" : "/192.168.0.25:35442/192.168.0.25:8080",
    "mediaSessionId" : "ecb5d680-204d-11e7-a508-45e7b31513b5",
    "name" : "rtsp://192.168.0.11:8554/test.sdp",
    "published" : false,
    "hasVideo" : true,
    "hasAudio" : true,
    "status" : "FAILED",
    "sdp" : "v=0\r\no=mozilla...THIS_IS_SDPARTA-52.0.2 6163890537457594847 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 0E:E7:08:D3:9F:DA:CB:56:ED:B9:ED:61:C8:41:60:C4:64:0B:A2:D0:AB:74:4A:4B:82:38:14:24:16:45:D6:21\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=video 9 UDP/TLS/RTP/SAVPF 120 121 126 97\r\nc=IN IP4 0.0.0.0\r\na=recvonly\r\na=fmtp:120 max-fs=12288;max-fr=60\r\na=fmtp:121 max-fs=12288;max-fr=60\r\na=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1\r\na=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1\r\na=ice-pwd:e3c64d6c3a4b67cda32c35badb54e036\r\na=ice-ufrag:38a781af\r\na=mid:sdparta_0\r\na=rtcp-fb:120 nack\r\na=rtcp-fb:120 nack pli\r\na=rtcp-fb:120 ccm fir\r\na=rtcp-fb:120 goog-remb\r\na=rtcp-fb:121 nack\r\na=rtcp-fb:121 nack pli\r\na=rtcp-fb:121 ccm fir\r\na=rtcp-fb:121 goog-remb\r\na=rtcp-fb:126 nack\r\na=rtcp-fb:126 nack pli\r\na=rtcp-fb:126 ccm fir\r\na=rtcp-fb:126 goog-remb\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 ccm fir\r\na=rtcp-fb:97 goog-remb\r\na=rtcp-mux\r\na=rtpmap:120 VP8/90000\r\na=rtpmap:121 VP9/90000\r\na=rtpmap:126 H264/90000\r\na=rtpmap:97 H264/90000\r\na=setup:actpass\r\na=ssrc:1057082996 cname:{f4a7b956-8aec-41b5-840e-0e9f11b82def}\r\n",
    "info" : "Failed to connect to rtsp stream",
    "record" : false,
    "width" : 0,
    "height" : 0,
    "bitrate" : 0,
    "quality" : 0,
    "mediaProvider" : "WebRTC"
    }

    In VLC it sometimes takes over 8 secs for the stream to appear. Is there any way to adjust the timeout period?
  6. Max

    Max Administrator Staff Member

    Could you share your cam to external network?
    Then we will able to test it.
    You can send RTSP url to logs@flashphoner.com for security purpose
  7. jman

    jman New Member

    Sorry I cannot share my IP camera to the external network.

    I've actually tried 2 different tests. One with an IP camera stream and one with a Webcam-to-RTSP stream using VLC. Can you try to convert your own stream using a Webcam and VLC? Here are some screenshots of the VLC setup for reference.

    upload_2017-4-13_13-4-9.png
    upload_2017-4-13_13-6-22.png
    upload_2017-4-13_13-6-50.png
    upload_2017-4-13_13-7-30.png
    upload_2017-4-13_13-8-24.png

    Let me know if Flashphoner supports this configuration.
    Thanks

    Attached Files:

  8. Max

    Max Administrator Staff Member

    Try to select codecs VP8+Vorbis on fourth step instead of H.264+MP3

Share This Page