AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
7.48k stars 540 forks source link

MSE Stream Getting Stuck in the web #1291

Open techsupportsardonyx opened 4 months ago

techsupportsardonyx commented 4 months ago

System info:

  1. OS version : Windows 11 pro - 64 bit
  2. Processer : Intel(R) Core (TM) i7-8809G CPU @ 3.10 GHZ (8 CPUs)
  3. Ram : 32 RAM
streams:
        test: rtsp://admin:admin123@172.25.10.34:554/cam/realmonitor?channel=1&subtype=0

Browser streams tried http://172.25.10.28:1984/stream.html?src=test&mode=mse

The stream is freezing in Chrome on Windows, which is the main reason for using go2rtc. However, refreshing the page or performing a "Save & Restart" works fine, suggesting that the issue might be related to the stream.html player rather than the stream itself.

Since I am running it in Golang, I don't see a way to change the stream.html page to add JavaScript for automatically refreshing the page after a set number of minutes. Is it possible to add this functionality to the configuration?

Note: The WebRTC stream does not freeze in Chrome on Windows; the freezing occurs only with the MSE (Media Source Extensions) stream.

AlexxIT commented 4 months ago

Issue related to broken stream. WebRTC can handle gaps in the stream. MSE can't. Latest stream.html has functionality to restart broken stream. But you can add any changes you want to your version.

techsupportsardonyx commented 4 months ago
DOMException: Failed to execute 'appendBuffer' on 'SourceBuffer': The SourceBuffer is full, and cannot free space to append additional buffers.
    at VideoStream.ondata (http://172.25.10.28:1984/video-rtc.js:477:28)
    at WebSocket.<anonymous> (http://172.25.10.28:1984/video-rtc.js:347:22)

how to resolve this issue. Could you provide the solution

techsupportsardonyx commented 4 months ago

AlexxIT, Could you check the bug ? May i know the status of the bug

AlexxIT commented 4 months ago

This is the first time I've seen the problem "The SourceBuffer is full". Don't have any ideas yet.

techsupportsardonyx commented 4 months ago

Actually WebRTC Player working fine without any Issues. but it can play only H264 codec streams only. I need to play the H265 codec streams also. so MSE can play both H264 and H265 streams. MSE Player initially working fine. After the sometime , I minimize the browser window and then I after some time I maximize the browser window ,Its some slow from live action. slow Issue continues and then Player get pauses automatically. but background stream data receiving continuously. After refreshing the browser only , It gets working. Note: Above Issue is based on browser side or server code side ? could you refer this link for similar issue [( https://github.com/AlexxIT/go2rtc/issues/644)]

AlexxIT commented 4 months ago

This is client JavaScript issue.

techsupportsardonyx commented 4 months ago

Can I use any other MSE player ? could you refer any other MSE player ? May I except the fix of this issue ?

AlexxIT commented 4 months ago

MSE doesn't have communication standards

techsupportsardonyx commented 4 months ago

I need to play the H265 video stream could you refer any solution ?

AlexxIT commented 4 months ago

If there are some unknown issues with your H265 that you can't solve - you should try transcoding to H264.

techsupportsardonyx commented 4 months ago

My problem is solved when I change the stream.html file to set video.background = false. The default background value was true.

techsupportsardonyx commented 3 months ago

AlexxIT, Could you check the bug ? May i know the status of the bug

AlexxIT commented 3 months ago

Don't expect a quick fix. If I can't reproduce a bug, I can't fix it either.

techsupportsardonyx commented 2 months ago

AlexxIT, Could you check the bug ? May i know the status of the bug

AlexxIT commented 2 months ago

Status - haven't checked yet. I have more than 50 issues to check. And more than 200 issues waiting for some response.