Webrtc as rtmp republishing with different rtmp url and same stream name issue

Hi,

I can publish using webrtc as rtmp republishing successfully. But i cannot publish to two different rtmp url
using the same stream name.
 

Max

Administrator
Staff member
Hello.
You cannot publish one stream to two servers using WebSDK rtmpUrl property. But you can easely push one stream to two RTMP servers using REST query /push/startup.
For example, you publish WebRTC stream named test using Two Way Streaming example. Then, you make two REST queries
Code:
/push/startup
{
"streamName": "test",
"rtmpUrl": "rtmp://localhost:1935/live"
}
and
Code:
/push/startup
{
"streamName": "test",
"rtmpUrl": "rtmp://rtmp.flashphoner.com:1935/live"
}
To check that stream is pushed to servers, make REST query /push/find_all
Code:
[
    {
        "mediaSessionId": "lkv6fko2n1uvk6annh30i49cnk",
        "streamName": "rtmp_test",
        "rtmpUrl": "rtmp://rtmp.flashphoner.com:1935/live",
        "width": 320,
        "height": 240,
        "muted": false,
        "soundEnabled": false
    },
    {
        "mediaSessionId": "l4ljd003unr59633no8anhpuk3",
        "streamName": "rtmp_test",
        "rtmpUrl": "rtmp://localhost:1935/live",
        "width": 320,
        "height": 240,
        "muted": false,
        "soundEnabled": false
    }
]
 
Hi,
We use one rtmp server (wowza) and we are publishing it to that server but the rtmpurl we want to use as
"rtmpUrl": "rtmp://localhost:1935/live1" and
"rtmpUrl": "rtmp://localhost:1935/live2".

So using REST query we can publish it to both the rtmpurl ?
 
Hi,
We have used two way streaming demo example. From client 1 we are using wss://www.xxxx.com:8443 and streamname : livefeed and rest query
as
https://www.xxxxx.com:8888/rest-api/push/startup
{
"streamName": "livefeed",
"rtmpUrl": "rtmp://xxxx.com:1935/test1"
}
This is published successfully.

From client 2 we are using wss://www.xxxx.com:8443 and streamname : livefeed and rest query
as
https://www.xxxxx.com:8888/rest-api/push/startup
{
"streamName": "livefeed",
"rtmpUrl": "rtmp://xxxx.com:1935/test2"
}
This is not published.
We want to publish simultaneously to two rtmpUrl using the same streamName: livefeed but we cannot publish.

 
Last edited:

Max

Administrator
Staff member
Hello.
Please set the following parameter in WCS_HOME/conf/flashphoner.properties
Code:
rtmp_transponder_full_url=true
as described here for your case to work.
 
Hi,
It is working but without authorization
https://docs.flashphoner.com/display/WCS5EN/To another RTMP server#ToanotherRTMPserver-StreamnamepassinginserverURL
myrtmpserver.com:1935/app_name/app_instance/?user=user1&pass=pass1, when i try this method , i can publish but the stream name
is incorrect myrtmpserver.com:1935/app_name/app_instance/?user=user1&pass=pass1.

rtmp_transponder_full_url=true

rtmp - rtmp://user: pass@serverurl:1935/appname/stream
streamname - test

output:

stream - rtmp___user_pass@serverurl_appname_stream.mp4

without auth

rtmp - rtmp://serverurl:1935/appname/stream
streamname - test

output:

stream - stream.mp4
 
Last edited:

Max

Administrator
Staff member
We've reproduced your problem and raised internal ticket (WCS-1803). We'll let you know when fix it.
 

Max

Administrator
Staff member
Hello.
We work on it, but there are some issues with higher priority. Please, be patient.
 
Hi,
Appreciate your reply , now it is working. We are not able to control the audio bitrate even after setting value 32 in flashphoner js file.
 

Max

Administrator
Staff member
Hello.
We are not able to control the audio bitrate even after setting value 32 in flashphoner js file.
Please clarify: how exactly you are trying to control aduio bitrate? Did you doing it as described in this doc, or some other way?
 
Hi,

We were streaming WEBRTC to RTMP, the resolution ratio is 16:9 - (width - 426 , Height- 320)
Frame rate - 30, video Bitrate - 208 kbps

Stream was smooth for initial few minutes but after sometimes becomes blury and then brea
ks into pixels
Please find attached image.
 

Max

Administrator
Staff member
Hello.
Please check if WebRTC stream is smooth. If not, try to adjust the settings (values are shown for example only)
Code:
webrtc_cc_min_bitrate=1000000
webrtc_cc_max_bitrate=1000000
to get smooth picture of stream published.
If WebRTC stream is smooth, but RTMP stream on RTMP server is still blurry, plese collect logs and traffice dumps as described here and send to support@flashphoner.com, we will check.
 
Hi,

We kept width - 426 height - 240 for 16:9 ratio
which breaks into pixel after sometime
when we keep 4:3 ratio -width -320 height -240 it works well

we can not go more than 300 kbps .
 

Max

Administrator
Staff member
which breaks into pixel after sometime
We'll try to reproduce it on our test servers. Please clarify the following:
1. What picture breaks, WebRTC (on WCS), RTMP (on another server), or both?
2. What RTMP server you use (Wowza, anothe WCS instance...)?
Also, please collect logs, traffic dumps and configs as we asked in post above.
 
Top