deepch / RTSPtoWSMP4f

RTSP Stream to WebBrowser MSE over WebSocket based MP4f segments
240 stars 64 forks source link

Rewind stream? #49

Open nguyentrongnhat4869 opened 2 years ago

nguyentrongnhat4869 commented 2 years ago

I have run the demo with my ip camera stream. I want to rewind the running stream, but I can only rewind about 3 minutes, if I rewind more, the stream will go back to the current time. Is there any way I can extend this rewind time. Thank you!

deepch commented 2 years ago

hi send log's

nguyentrongnhat4869 commented 2 years ago

[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

2022/08/22 14:29:09 Server Start Awaiting Signal [GIN-debug] Loaded HTML Templates (2):

    - index.tmpl

[GIN-debug] GET / --> main.serveHTTP.func1 (3 handlers) [GIN-debug] GET /player/:suuid --> main.serveHTTP.func2 (3 handlers) [GIN-debug] GET /ws/:suuid --> main.serveHTTP.func3 (3 handlers) [GIN-debug] GET /static/filepath --> github.com/gin-gonic/gin.(RouterGroup).createStaticHandler.func1 (3 handlers) [GIN-debug] HEAD /static/filepath --> github.com/gin-gonic/gin.(RouterGroup).createStaticHandler.func1 (3 handlers) [GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value. Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details. [GIN-debug] Listening and serving HTTP on :8083 [GIN] 2022/08/22 - 14:29:19 | 200 | 1.190564ms | 192.168.21.3 | GET "/player/H264_AAC" [GIN] 2022/08/22 - 14:29:19 | 200 | 6.498333ms | 192.168.21.3 | GET "/static/js/app.js?ver=2022-08-22%2014%3a29%3a19.812873094%20%2b0700%20%2b07%20m%3d%2b10.658878478" 2022/08/22 14:29:20 Request H264_AAC 2022/08/22 14:29:20 H264_AAC Stream Try Connect

Here is my console log. No matter what happens, but when I rewind a lot the stream will stop and then go back to the current time like the video: https://drive.google.com/file/d/12hr9495AZC2G3bejjCPia-9BFPq2lJBH/view?usp=sharing

As far as I understand this problem is caused by the source buffer in the media source extension. It seems that the buffer size is only enough to store a short video, how can I increase the size of this source buffer to be able to rewind it longer?

nguyentrongnhat4869 commented 2 years ago

Looking forward to your help. Thank! @deepch