I want realtime streaming from rtmp link.. 0 latency video

Discussion in 'General Discussion' started by remo, Nov 30, 2019 at 11:41 AM.

  1. remo

    remo New Member

    hello dear.
    what i need to changes in server properties file to make realtime streaming from rtmp link ?
  2. Max

    Max Administrator Staff Member

    Good day.
    RTMP gives delay between the broadcast source (e.g. camera) and streaming server (WCS). How many seconds is your delay?
    Additionally, test on our demo page: try to publish stream from RTMP source to WCS demo.flashphoner.com, then play it in the Player example.
    Code:
    https://demo.flashphoner.com/client2/examples/demo/streaming/player/player.html
    Is delay on our demo server the same as on your server?
    Last edited: Dec 2, 2019 at 12:19 PM
  3. Max

    Max Administrator Staff Member

    You don't need to change server-side settings if you just want to publish RTMP stream.
    Just publish a stream to server. Example:
    Code:
    rtmp://wcs-host:1935/live/stream1
    Docs how to publish using RTMP: https://docs.flashphoner.com/display/WCS52EN/Using RTMP encoder
    How to play using WebRTC: https://docs.flashphoner.com/display/WCS52EN/In a browser via WebRTC
    How to play using RTMP: https://docs.flashphoner.com/display/WCS52EN/In a player via RTMP

    Please note. RTMP may have few seconds latency. So you should use better WebRTC for zero-latency playback and publish.
  4. remo

    remo New Member

    i have rtmp link from encoder and its still going delay.
    from encoder side it was realtime but when its come in flashphoner player it was going to delay.
    any region matter in it ? i have installed WCS in indian server.
    and what is configuration need for approx 50 clients running for watch streaming ? now i have Ubuntu 18.04 LTS, Linode 8GB: 4 CPU, 160GB Storage, 8GB RAM server.
    So what is extra configuration in flashphoner for realtime rtmp streaming regarding my server configuration ?
  5. remo

    remo New Member

    hii max,
    RtpVideoConfig - pool-163-thread-2 Codec not found; pt - 119; current pt - 95.

    i have issue regarding this error im server log.
    so what is the solution of it ??
  6. Max

    Max Administrator Staff Member

    Please check the channel bandwidth between publisher and server, then between subscriber and server using iperf for example as described here. Note that channel bandwidth should be enough for stream bitrate: if publisher bitrate is 2000 kbps for example, and channel upload bandwidth is just 1000 kbps, publisher bitrate should be decreased.
    In last builds, there is also channel quality control ability for WebRTC publishing and playback.
    So consider to decrease picture resolution and bitrate, then check if playback delay persists.
    In theory, it should be enough for 50 viewers without transcoding (changing picture resolution and bitrate or changing video codec for viewers)
    You should place the file flash_handler_publish.sdp to /usr/local/FlashphonerWebCallServer/conf folder with the following content:
    Code:
    v=0
    o=- 1988962254 1988962254 IN IP4 0.0.0.0
    c=IN IP4 0.0.0.0
    t=0 0
    a=sdplang:en
    m=video 0 RTP/AVP 95 127
    a=rtpmap:95 H264/90000
    a=fmtp:95 profile-level-id=42e01f;packetization-mode=1
    a=rtpmap:127 FLV/90000
    a=sendonly
    m=audio 0 RTP/AVP 97 8 0 102 103 104 105 106 107 108 109 110
    a=rtpmap:97 SPEEX/16000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:102 mpeg4-generic/48000/1
    a=rtpmap:103 mpeg4-generic/44100/1
    a=rtpmap:104 mpeg4-generic/32000/1
    a=rtpmap:105 mpeg4-generic/24000/1
    a=rtpmap:106 mpeg4-generic/22050/1
    a=rtpmap:107 mpeg4-generic/16000/1
    a=rtpmap:108 mpeg4-generic/12000/1
    a=rtpmap:109 mpeg4-generic/11025/1
    a=rtpmap:110 mpeg4-generic/8000/1
    a=sendonly
    
    then restart WCS. By default, payload type for RTMP H264 video packets is set to 119, in your case they are published with payload type 95, so the SDP setting above will correct it

Share This Page