Flashphoner High CPU and high bitrate

Stanley

Member
We are suffering Flashphoner high CPU usage and stop responding until WebCallServer service restarted. We have 18 x live stream RTMP ingest to Flashphoner and user playback with WSPlayer websocket. Before we publish the server to public we have tested it’s was running fine. Concurrent users approximately 50.

Here is our server specification
2 x Intel Xeon E-2450 v2 @ 2.50GHz (32 logical cores)
32GB RAM
300GB SAS 15K RPM
Ubuntu 16.04 LTS
Flashphoner 5.0.3006

I’ve tried to include -Xms2048M and-Xmx8192M doesn’t seems to help.

We also noticed that the bitrate is 2 times higher than RTMP video.

Anyone can help?

Thanks.
 

Max

Administrator
Staff member
Hello

If it is hanging again, you can make a thread dump
Code:
jstack 33333 >> 33333.txt
Here
jstack is Java SDK utility located in JAVA_HOME/bin/jstack
33333 is Linux process ID (PID)
You can print WCS processes using command:
Code:
ps aux | grep Flashphoner
You can also print all Linux threads using command:
Code:
top
then press Shift +H
So you can find most CPU utilizing thread and match thread ID to jstack dump 33333.txt
For example thread ID using 'top' is decimal 6303. Then thread ID in jstack is 0x189F
Please match and send us jstack log to logs@flashphoner.com for analyzing.

As an option you can try latest version 5.1
https://flashphoner.com/downloads/builds/WCS/5.1/FlashphonerWebCallServer-5.1.3012.tar.gz
Here we fixed some loop issues with AAC codec

You can also send SSH access to logs@flashphoner.com
Our engineers will check logs. Please point to a server-time of incident to be able to check related logs.
 

Stanley

Member
After updating to 5.1.3012 our wss doesn't seems to work anymore. I also unable to see any incoming RTMP streams in Monitor > Streaming > Real time. Playback with RTMP is working properly. But WSplayer, MSE and WebRTC are not working in Demo Embed player. I received "Can't established a connection to the server at wss://xxxx.domain.com.
 

Max

Administrator
Staff member
Specify full path to wss.keystore.file in WCS_HOME/conf/flashphoner.properties, e.g.
Code:
wss.keystore.file=/usr/local/FlashphonerWebCallServer/conf/wss.jks
Restart WCS to apply the change.
 
Last edited:

Stanley

Member
Specify full path to wss.keystore.file in WCS_HOME/conf/flashphoner.properties, e.g.
Code:
wss.keystore.file=/usr/local/FlashphonerWebCallServer/conf/wss.jks
Noted. Will try on this. What about the monitoring incoming stream? Its empty even there are streams coming in. I can only see my streams in ?action=stat
 

Max

Administrator
Staff member
monitoring incoming stream
Saving statistics to database is disabled by default.
To enable, add to WCS_HOME/conf/wcs-manager.properties
Code:
-Dstream_stat_persist_data=true
Restart WCS to apply the change.
 

Stanley

Member
Saving statistics to database is disabled by default.
To enable, add to WCS_HOME/conf/wcs-manager.properties
Code:
-Dstream_stat_persist_data=true
Restart WCS to apply the change.
Hi Max,
After including /usr/local/FlashphonerWebCallServer/conf/wss.jks its working properly now. I also able to see my incoming RTMP streams.
One question here, is there any way to force constant bitrate for WSPlayer & MSE stream? I notice the bitrate is quite high compare to my RTMP video streams.

Thank you.
 

Max

Administrator
Staff member
is there any way to force constant bitrate for WSPlayer & MSE stream?
No. Constant bitrate is not currently supported for WSPlayer.
You can reduce video resolution to reduce bitrate.
The bitrate is really higher than RTMP because RTMP stream is encoded in H.264 (high compression), but WSPlayer stream is encoded as MPEG (low compression and high bitrate).
So the high bitrate is a codec 'feature' and the bitrate can be slightly decreased only using lower quality or lower video resolution.
MSE stream?
MSE works on H.264 streams. Therefore bitrate MSE should not be noticeably exceed the source RTMP bitrate.
 

Stanley

Member
No. Constant bitrate is not currently supported for WSPlayer.
You can reduce video resolution to reduce bitrate.
The bitrate is really higher than RTMP because RTMP stream is encoded in H.264 (high compression), but WSPlayer stream is encoded as MPEG (low compression and high bitrate).
So the high bitrate is a codec 'feature' and the bitrate can be slightly decreased only using lower quality or lower video resolution.

MSE works on H.264 streams. Therefore bitrate MSE should not be noticeably exceed the source RTMP bitrate.
Hi Max,
Thanks for your reply. I managed to reduce MPEG quality by adding mpeg1.qmax and mpeg1.qmin in flashphoner.properties.
Thanks again. Appreciate your help!
 
Top