Ant-Media-Server
Ant-Media-Server copied to clipboard
WebRTC playback stops after some hours after upgrading the server.
- One of the users has an issue where the stream stops to play after 12 to 24 hours.
- The publish and play protocol used is WebRTC.
- The stream doesn't play on Origin as well as Edge.
- The issue happens after upgrading the server to version 2.8.2.
- When rolled back to the previous version 2.6.x, the issue is not happening.
Sample logs
2024-04-16 18:26:56,911 [DecodingQueue - 383684] INFO i.a.e.adaptive.WebRTCVideoForwarder - Dropping video frame for stream:ctc_bugmv. Video/audio enabled:true/true videoTimeMS: 55191303 audio duration:-61986493 total frame drop count:132020 dropVideoFrameUntilKeyFrame:true 2024-04-16 18:26:56,949 [DecodingQueue - 383105] INFO i.a.e.adaptive.WebRTCVideoForwarder - Dropping video frame for stream:ctc_bitfiremv1. Video/audio enabled:true/true videoTimeMS: 23353903 audio duration:-66124786 total frame drop count:42260 dropVideoFrameUntilKeyFrame:true 2024-04-16 18:26:57,245 [DecodingQueue - 383684] INFO i.a.e.adaptive.WebRTCVideoForwarder - Dropping video frame for stream:ctc_bugmv. Video/audio enabled:true/true videoTimeMS: 55191636 audio duration:-61986173 total frame drop count:132040 dropVideoFrameUntilKeyFrame:true 2024-04-16 18:26:57,281 [DecodingQueue - 383105] INFO i.a.e.adaptive.WebRTCVideoForwarder - Dropping video frame for stream:ctc_bitfiremv1. Video/audio enabled:true/true videoTimeMS: 23354236 audio duration:-66124466 total frame drop count:42280 dropVideoFrameUntilKeyFrame:true
- We have access to the environment.
Possibly also relevant:
All WebRTC traffic routes through a TURN server
Audio bitrate is raised up from the default upon publish: `var audioBitrate = 256000;
function setAudioBitrate() {
var state = webRTCAdaptor.signallingState(streamId);
if (state != null && state != "closed") {
var iceState = webRTCAdaptor.iceConnectionState(streamId);
if (iceState != null && iceState != "failed" && iceState != "disconnected") {
var params = webRTCAdaptor.remotePeerConnection[streamId].getSenders()[0].getParameters();
params.encodings[0].maxBitrate=audioBitrate;
webRTCAdaptor.remotePeerConnection[streamId].getSenders()[0].setParameters(params);
}
}
console.warn("Changing outbound audio bitrate to "+(audioBitrate/1000)+"kbps");
}
`
Everything else is pretty standard from the default configuration.
More context: Just tried it, and I do not see a change in behavior in 2.9.0. Same issue.
Looks like ı Fixed this. Will test more. Pr soon
https://gitlab.com/Ant-Media/Ant-Media-Enterprise/-/merge_requests/682
This is the updated PR: https://gitlab.com/Ant-Media/Ant-Media-Enterprise/-/merge_requests/683