Ant-Media-Server icon indicating copy to clipboard operation
Ant-Media-Server copied to clipboard

WebRTC playback stops after some hours after upgrading the server.

Open Mohit-3196 opened this issue 10 months ago • 4 comments

  • 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.

Mohit-3196 avatar Apr 23 '24 09:04 Mohit-3196

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.

ncsu1 avatar Apr 23 '24 16:04 ncsu1

More context: Just tried it, and I do not see a change in behavior in 2.9.0. Same issue.

ncsu1 avatar Apr 25 '24 13:04 ncsu1

Looks like ı Fixed this. Will test more. Pr soon

lastpeony avatar Apr 28 '24 13:04 lastpeony

https://gitlab.com/Ant-Media/Ant-Media-Enterprise/-/merge_requests/682

lastpeony avatar Apr 29 '24 09:04 lastpeony

This is the updated PR: https://gitlab.com/Ant-Media/Ant-Media-Enterprise/-/merge_requests/683

burak-58 avatar May 20 '24 10:05 burak-58