record_rotation=60
Yes, if you publish RTMP stream and play it as WebRTC, it should add some delay.- then can we force the player to play using webrtc but using the source stream from RTMP.
- Would that add few seconds delay?
Yes, it should work.- Would the above can work if we host another WCS server and stream to RTMP of that server and than based on user subscription play from one or the other?
session.createStream({
name: streamId,
display: document.getElementById('media-publisher'),
record: false,
constraints: constraints,
rtmpUrl: YTRTMPURL
})....
If it means that the WebRTC stream is republished as RTMP, then there are two different streams with different names. So, which stream will be played would depend on the name specified for playback.We stream over WebRTC and also to WCS rtmp URL (same server)
rtmp_transponder_stream_name_prefix =rtmp_
rtmp_transponder_full_url=true
On demo.flashphoner.com, the default settings are used:So my question is, any reason why its different on how it works on demo and our server?
rtmp_transponder_stream_name_prefix =rtmp_
rtmp_transponder_full_url=false
rtmp_transponder_full_url=true
, the stream name is taken from publishing URL as is. That's the difference.If you're streaming audio only (that's your case, right?), you can try to publish RTMP stream from OBS Studio or another streaming application that can add delay to audio.Should I not expect some delay playing rtmp using webrtc? In all the examples where it worked, there was no delay.
We implemented playoutDelayHint support in WebSDK build 0.5.28.2753.142 which shipped with WCS build 5.2.708. Please see the doc here.Have you got any plans to support playoutDelayHint
We'll think about it.Would you be able to choose from client side to add delay to the stream based on user subscription?..That would be ideal.
This can be reached with republishing a stream to localhost as RTMPIdeal would have been to have this working with single stream as upload speeds are limited and streaming twice affects the general performance of both streams.
Or have an option to auto republish on the server level with buffer
POST /rest-api/push/startup HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json
{
"streamName": "original_stream",
"rtmpUrl":"rtmp://localhost:1935/live"
}
rtmp_original_stream
with buffering via WebRTC.rtmp_out_buffer_enabled=true
rtmp_out_buffer_start_size=5000
rtmp_out_buffer_initial_size=5000
rtmp_transponder_full_url=true
rtmp_out_buffer_enabled=true
rtmp_out_buffer_start_size=5000
rtmp_out_buffer_initial_size=5000
[CODE]
and republish the strea with a given name, for example
[CODE]
POST /rest-api/push/startup HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json
{
"streamName": "paid_stream",
"rtmpUrl":"rtmp://localhost:1935/live/free_stream"
}
free_stream
for free customers via WebRTC with 10 seconds latency, and paid_stream
for paid customers without latency