Continuous Streams Broadcasting
Opened this issue · 5 comments
Short description
We need to Continuously Broadcast the streams, and play live Streams, and need HLS recording.
The Streams will stop after few minutes, and we can play it in again in Ant Media management console, nor in our frontend with Web Player, and the HLS recording will also be stopped.
Environment
- Operating System: Ubuntu 24.04 LTS
- Java version: openjdk 17.0.13 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11-Ubuntu-2ubuntu124.04)
OpenJDK 64-Bit Server VM (build 17.0.13+11-Ubuntu-2ubuntu124.04, mixed mode, sharing) - Ant Media Server version: Enterprise Edition 2.11.3 20240906_0602
- Browser name and version: Version 131.0.2903.51 (Official build) (64-bit)
Steps to reproduce
- Add new live stream, stream source with RTSP
{
"streamId": "streamid",
"name": "streamname",
"streamUrl": "rtsp://admin:admin123@192.168.100.185:554/cam/realmonitor?channel=1&subtype=0",
"type": "streamSource",
"mp4Enabled": 0,
"playlistLoopEnabled": False,
"autoStartStopEnabled": False,
"plannedStartDate": 0,
"playListItemList": [],
"hlsViewerCount": 0,
"dashViewerCount": 0,
"webRTCViewerCount": 0,
"rtmpViewerCount": 0,
"hlsViewerLimit": 20,
"webRTCViewerLimit": 20,
"status": "broadcasting"
}
- started the broadcast by
curl -X POST "https://<ams_url>:5443/<appname>/rest/v2/broadcasts/<stream_id>/start" -H "accept: application/json" -H "Content-Type: application/json" -d "{}"
- It will play for some time and stops, the stream status will still shows "status": "broadcasting".
GET' 'http://localhost:5080/<app>/rest/v2/broadcasts/<stream>' has "status": "broadcasting" but "anyoneWatching": "false"
- Broadcasting 50+ streams via API spikes CPU to 100% and crashes the server.
Expected behavior
It needs to Continuously broadcast, and play live streams continuous and generate ts and update m3u8 file continuously, even with not viewers, since "autoStartStopEnabled" is False, but the stream will stop playing and generating ts, m3u8 file.
- We narrowed down the issues:
- When we start broadcasting via API requests, the stream stops at random intervals even though RAM usage is below 70%. The broadcast shows as active but neither plays live nor generates
.ts
segments. - Broadcasting 35+ streams, all at once via API causes CPU usage to spike to 100%, crashing the server.
- When broadcasting 35+ cameras in batches while monitoring RAM usage, the RAM gradually increases and exceeds 70%, causing WebRTC WebSocket disconnections and stream will stop and the server crashes.
@burak-58 @lastpeony any update on this?
This should not occur, probably spesific to server. Requested server/web panel credentials to take a closer look.
Shared the credentials in the email thread please download.