Setup two new servers, wss connection is failed

Max

Administrator
Staff member
Hello

Keeping user experience in mind - the best dimensions to upload your Instagram video to your feed is 1080 pixels x 1350 pixels.
As you can see, Intsagram says that best aspect ratio is 4:5
Therefore if you stream from Canvas you have to ensure source resolution in this aspect ratio.
This means the resolution of published stream must be 1080 x 1350 or other 4:5 content.

You can't just stream 1280x720 and then /push/startup as 720x1280 because its aspect ratio is 16:9 or 9:16 and does not fit instagram requirements. Moreover it will cause server-side transcoding to 2276x1280 to preserve aspect ratio 16:9.

Therefore you have two options

1. Publish 4:5 aspect ratio and do not set resolution on /push/startup to avoid any transcoding

or

2. Crop your picture from 16:9 to 4:5 in the Mixer


Please note. Mixer is CPU intensive server-side application. It would require at least 2 physical CPU core for mixing and cropping operations only.

>Can we publish the two different canvas stream to different flashphoner instance ?
You can try to open two Websocket sessions using Flashphoner.createSession();

Code:
var session1 = Flashphoner.createSession({urlServer:server1});
session1.createStream().publish();
var session2 = Flashphoner.createSession({urlServer:server2});
session2.createStream().publish();
If it does not work, you can publish both streams to server1 then re-stream second stream to server2 using the REST API.
 

Max

Administrator
Staff member
HTTP port:
Code:
http.port=8081
HTTPS port:
Code:
https.port=8444
Both ports are used for REST API, web admin interface, statistics page
Thre are also hardcoded ports setup for old versions (5.0, 5.1) compatibility: 9091/http, 8888/https
 
Hi,

WSS player sample page, can it be used in react application , so that i can use it for canvas streaming.

Currently i am able to pull the stream between wcs server , but the problem i see blank video on instagram after /push/startup on ec2 server

The above scenario works on localhost
 

Max

Administrator
Staff member
Hello

WSS player
What do you mean?

Please check out this page. The list of all available playback options.

1. WSS + WebRTC

2. WSS + MSE

3. WSS + Canvas (Websocket player)

Player (3) is out of date and designed for too old iOS Safari browsers with limitations like 640x480 resolution max.

So the best options are (1) and (2). And yes you can embed it into your react application.

Currently i am able to pull the stream between wcs server , but the problem i see blank video on instagram after /push/startup on ec2 server
Could you please reproduce this issue with single ec2 server and default publishing pages like Two Way Streaming or Media Devices
? Please post screenshots step by step how to reproduce this issue.

Could you please reproduce issue with two ec2 servers and default publishing pages like Two Way Streaming or Media Devices?
Please post screenshots step by step how to reproduce this issue.

Please note. If two servers mean localhost(in the LAN) and ec2-server outside of the LAN, the localhost server must be in DMZ zone. This means all UDP packets sent towards the NAT should be redirected to the localhost. If you don't know how to setup DMZ zone or how to pass through the local NAT, you have to use secondary EC2 server in the same LAN as your first EC2 server.

Once you submit your screenshots-report you can send us SSH access details for first and second server plus Instagram endpoint. Then we will be able to check.
 
Hi,

The steps are as follows

1. Initiaite wss://server1.com , publish to server1 using canvas streaming.
2. Pull the stream from server2, using the rest api https://server2.com:8444/rest-api/pull/pull (this is done on the backend server)
data: {
"uri": "wss://server1.com:8443/websocket",
"localStreamName": streamName,
"remoteStreamName": streamName
}

3. On server2 , once the stream is pulled , using the rest api https://server2.com:8444/rest-api/push/startup ((this is done on the backend server)
data: {
instartmpUrl,
streamName,
"rtmpTransponderFullUrl": "true",
}
4. On instagram livefeed is shown but blank video
 

Max

Administrator
Staff member
1. Initiaite wss://server1.com , publish to server1 using canvas streaming.
Please check if the stream can be played in the Player example from server1: https://server1.com:8444/client2/examples/demo/streaming/player/player.html
If not, this seems like canvas streaming issue in latest Chromium. Please read this post for recommendations.
2. Pull the stream from server2, using the rest api https://server2.com:8444/rest-api/pull/pull (this is done on the backend server)
data: {
"uri": "wss://server1.com:8443/websocket",
"localStreamName": streamName,
"remoteStreamName": streamName
}
Please check if secure connection signaling between the server is enabled
Code:
wcs_agent_ssl=true
This parameter must be set on both servers.
3. On server2 , once the stream is pulled , using the rest api https://server2.com:8444/rest-api/push/startup ((this is done on the backend server)
data: {
instartmpUrl,
streamName,
"rtmpTransponderFullUrl": "true",
}
Please check if the stream can be played in the Player example from server2 before pushing it: https://server2.com:8444/client2/examples/demo/streaming/player/player.html
Also please check if stream published directly to server2 can be republished to Instagram successfully.
If nothing helps, please provide SSH access details for first and second server plus Instagram endpoint. Then we will be able to check.
 
Top