deepch / RTSPtoWeb

RTSP Stream to WebBrowser
MIT License
1.31k stars 308 forks source link

RTSP stream not working #286

Open Nisthar opened 1 year ago

Nisthar commented 1 year ago

Hi,

I have a rtsp stream, which I can play successfully with VLC media player. Unfortunately it does not work with RTSPToWeb, here is my log, please let me know if you need additional information:

D:\go_projects\RTSPtoWeb>go run .
time="2023-02-01T19:55:05+05:30" level=info msg="Server CORE start" func=main module=main
time="2023-02-01T19:55:05+05:30" level=info msg="Server HTTP start" call=Start func=RTSPServer module=http_server
time="2023-02-01T19:55:05+05:30" level=info msg="Server RTSP start" call=Start func=RTSPServer module=rtsp_server
time="2023-02-01T19:55:05+05:30" level=info msg="Server start success a wait signals" func=main module=main
time="2023-02-01T19:55:21+05:30" level=info msg="Run stream" call=Run channel=0 func=StreamServerRunStreamDo module=core stream=83f3c71b-5ab4-44be-9716-094e8518019f
2023/02/01 19:55:21 http: panic serving [::1]:8397: runtime error: invalid memory address or nil pointer dereference
goroutine 74 [running]:
net/http.(*conn).serve.func1()
        D:/Program Files/Go/src/net/http/server.go:1802 +0xb9
panic({0x165ad00, 0x1d18820})
        D:/Program Files/Go/src/runtime/panic.go:1047 +0x266
main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff)
        D:/go_projects/RTSPtoWeb/hlsMuxer.go:158 +0x27
main.(*StorageST).HLSMuxerM3U8(0xc000002780, {0xc00059a1ec, 0x24}, {0xc00059a219, 0x1}, 0xc0005ec030, 0x1721852)
        D:/go_projects/RTSPtoWeb/storageStreamChannel.go:375 +0x1b6
main.HTTPAPIServerStreamHLSLLM3U8(0xc0005a4100)
        D:/go_projects/RTSPtoWeb/apiHTTPHLSLL.go:83 +0x496
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
main.CrossOrigin.func1(0xc0005a4100)
        D:/go_projects/RTSPtoWeb/apiHTTPRouter.go:296 +0x2f9
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000504340, 0xc0005a4100)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616 +0x671
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000504340, {0x1847ef0, 0xc0002b2380}, 0xc0004d6600)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572 +0x1dd
net/http.serverHandler.ServeHTTP({0xc0005ec840}, {0x1847ef0, 0xc0002b2380}, 0xc0004d6600)
        D:/Program Files/Go/src/net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc000238000, {0x184eca0, 0xc0005185d0})
        D:/Program Files/Go/src/net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
        D:/Program Files/Go/src/net/http/server.go:3034 +0x4e8
2023/02/01 19:55:21 http: panic serving [::1]:8399: runtime error: invalid memory address or nil pointer dereference
goroutine 54 [running]:
net/http.(*conn).serve.func1()
        D:/Program Files/Go/src/net/http/server.go:1802 +0xb9
panic({0x165ad00, 0x1d18820})
        D:/Program Files/Go/src/runtime/panic.go:1047 +0x266
main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff)
        D:/go_projects/RTSPtoWeb/hlsMuxer.go:158 +0x27
main.(*StorageST).HLSMuxerM3U8(0xc000002780, {0xc00059a30c, 0x24}, {0xc00059a339, 0x1}, 0xc0005ec030, 0x1721852)
        D:/go_projects/RTSPtoWeb/storageStreamChannel.go:375 +0x1b6
main.HTTPAPIServerStreamHLSLLM3U8(0xc0005a4300)
        D:/go_projects/RTSPtoWeb/apiHTTPHLSLL.go:83 +0x496
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
main.CrossOrigin.func1(0xc0005a4300)
        D:/go_projects/RTSPtoWeb/apiHTTPRouter.go:296 +0x2f9
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000504340, 0xc0005a4300)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616 +0x671
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000504340, {0x1847ef0, 0xc0002b2540}, 0xc00058c500)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572 +0x1dd
net/http.serverHandler.ServeHTTP({0xc0004ff6e0}, {0x1847ef0, 0xc0002b2540}, 0xc00058c500)
        D:/Program Files/Go/src/net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc000412780, {0x184eca0, 0xc0005185d0})
        D:/Program Files/Go/src/net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
        D:/Program Files/Go/src/net/http/server.go:3034 +0x4e8
2023/02/01 19:55:21 http: panic serving [::1]:8395: runtime error: invalid memory address or nil pointer dereference
goroutine 53 [running]:
net/http.(*conn).serve.func1()
        D:/Program Files/Go/src/net/http/server.go:1802 +0xb9
panic({0x165ad00, 0x1d18820})
        D:/Program Files/Go/src/runtime/panic.go:1047 +0x266
main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff)
        D:/go_projects/RTSPtoWeb/hlsMuxer.go:158 +0x27
main.(*StorageST).HLSMuxerM3U8(0xc000002780, {0xc00007e12c, 0x24}, {0xc00007e159, 0x1}, 0x0, 0x0)
        D:/go_projects/RTSPtoWeb/storageStreamChannel.go:375 +0x1b6
main.HTTPAPIServerStreamHLSLLM3U8(0xc0004d6200)
        D:/go_projects/RTSPtoWeb/apiHTTPHLSLL.go:83 +0x496
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
main.CrossOrigin.func1(0xc0004d6200)
        D:/go_projects/RTSPtoWeb/apiHTTPRouter.go:296 +0x2f9
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000504340, 0xc0004d6200)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616 +0x671
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000504340, {0x1847ef0, 0xc0003d42a0}, 0xc00058c400)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572 +0x1dd
net/http.serverHandler.ServeHTTP({0xc000518630}, {0x1847ef0, 0xc0003d42a0}, 0xc00058c400)
        D:/Program Files/Go/src/net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc000412640, {0x184eca0, 0xc0005185d0})
        D:/Program Files/Go/src/net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
        D:/Program Files/Go/src/net/http/server.go:3034 +0x4e8
2023/02/01 19:55:21 http: panic serving [::1]:8404: runtime error: invalid memory address or nil pointer dereference
goroutine 115 [running]:
net/http.(*conn).serve.func1()
        D:/Program Files/Go/src/net/http/server.go:1802 +0xb9
panic({0x165ad00, 0x1d18820})
        D:/Program Files/Go/src/runtime/panic.go:1047 +0x266
main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff)
        D:/go_projects/RTSPtoWeb/hlsMuxer.go:158 +0x27
main.(*StorageST).HLSMuxerM3U8(0xc000002780, {0xc00052a0cc, 0x24}, {0xc00052a0f9, 0x1}, 0x0, 0x0)
        D:/go_projects/RTSPtoWeb/storageStreamChannel.go:375 +0x1b6
main.HTTPAPIServerStreamHLSLLM3U8(0xc0005d6100)
        D:/go_projects/RTSPtoWeb/apiHTTPHLSLL.go:83 +0x496
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
main.CrossOrigin.func1(0xc0005d6100)
        D:/go_projects/RTSPtoWeb/apiHTTPRouter.go:296 +0x2f9
github.com/gin-gonic/gin.(*Context).Next(...)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/context.go:173
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000504340, 0xc0005d6100)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:616 +0x671
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000504340, {0x1847ef0, 0xc000696380}, 0xc0005d6600)
        C:/Users/nisth/go/pkg/mod/github.com/gin-gonic/gin@v1.8.2/gin.go:572 +0x1dd
net/http.serverHandler.ServeHTTP({0xc0003fcb70}, {0x1847ef0, 0xc000696380}, 0xc0005d6600)
        D:/Program Files/Go/src/net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc000108d20, {0x184eca0, 0xc0005185d0})
        D:/Program Files/Go/src/net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
        D:/Program Files/Go/src/net/http/server.go:3034 +0x4e8
2023/02/01 19:55:21 [OPTIONS rtsp://119.82.252.166:554/main-stream RTSP/1.0
CSeq: 1
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:21 [OPTIONS rtsp://119.82.252.166:554/main-stream RTSP/1.0
CSeq: 2
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="133141d6293b55ae7103487975042dcd", uri="rtsp://119.82.252.166:554/main-stream", response="4e25ce541aada8b36757ad8f17e95b6f"
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:22 [RTSP/1.0 200 OK
CSeq: 2
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, SET_PARAMETER, GET_PARAMETER, PAUSE

]
2023/02/01 19:55:22 [DESCRIBE rtsp://119.82.252.166:554/main-stream RTSP/1.0
CSeq: 3
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="133141d6293b55ae7103487975042dcd", uri="rtsp://119.82.252.166:554/main-stream", response="ab8be784d26d454b5af3e2d1878e2cbd"
Accept: application/sdp
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:22 [RTSP/1.0 200 OK
CSeq: 3
Cache-control: no-cache
Content-Type: application/sdp
Content-Base: rtsp://172.16.19.22:554/
Content-Length: 375

v=0
o=- 0 0 IN IP4 172.16.19.22
s=LIVE VIEW
c=IN IP4 0.0.0.0
t=0 0
a=control:rtsp://172.16.19.22:554/?main-stream
m=video 0 RTP/AVP 35
a=rtpmap:35 H264/90000
a=rtpmap:102 H265/90000
a=control:rtsp://172.16.19.22:554/?main-stream&stream=video
a=recvonly
a=fmtp:35 packetization-mode=1;profile-level-id=4d402a;sprop-parameter-sets=Z01AKo2NIA8ARPy4C3AQ0BAg,aO44gA==
]
2023/02/01 19:55:22 [SETUP rtsp://172.16.19.22:554/?main-stream&stream=video RTSP/1.0
CSeq: 4
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="133141d6293b55ae7103487975042dcd", uri="rtsp://172.16.19.22:554/?main-stream&stream=video", response="4099dd08397a9fbe3de18954983518dd"
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:22 [RTSP/1.0 200 OK
CSeq: 4
Session: 123463585a76395;timeout=30
Transport: RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=17049110

]
2023/02/01 19:55:22 [PLAY rtsp://172.16.19.22:554/ RTSP/1.0
CSeq: 5
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="133141d6293b55ae7103487975042dcd", uri="rtsp://172.16.19.22:554/", response="98fcce28db9cc9670aa2c7e6a3613b1d"
User-Agent: Lavf58.76.100
Session: 123463585a76395

]
2023/02/01 19:55:22 [RTSP/1.0 200 OK
CSeq: 5
Session: 123463585a76395

]
time="2023-02-01T19:55:22+05:30" level=info msg="Success connection RTSP" call=Start channel=0 func=StreamServerRunStream module=core stream=83f3c71b-5ab4-44be-9716-094e8518019f
2023/02/01 19:55:22 Set ICEServers [stun:stun.l.google.com:19302]
time="2023-02-01T19:55:25+05:30" level=error msg="stream not found" call=HLSMuxerM3U8 channel=0 func=HTTPAPIServerStreamHLSLLM3U8 module=http_hlsll stream=83f3c71b-5ab4-44be-9716-094e8518019f
2023/02/01 19:55:26 [drop packet 38988]
2023/02/01 19:55:26 [drop packet 39245]
2023/02/01 19:55:27 [drop packet 39501]
2023/02/01 19:55:28 [drop packet 39654]
2023/02/01 19:55:28 [drop packet 39805]
2023/02/01 19:55:29 [drop packet 40010]
2023/02/01 19:55:29 [drop packet 40118]
2023/02/01 19:55:30 [drop packet 40222]
2023/02/01 19:55:30 [drop packet 40374]
2023/02/01 19:55:30 [drop packet 40519]
2023/02/01 19:55:31 [drop packet 40622]
2023/02/01 19:55:31 [drop packet 40725]
2023/02/01 19:55:32 [drop packet 40827]
2023/02/01 19:55:32 [drop packet 40929]
time="2023-02-01T19:55:32+05:30" level=error msg="stream no video" call=ErrorStreamNoVideo channel=0 func=HTTPAPIServerStreamMSE module=http_mse stream=83f3c71b-5ab4-44be-9716-094e8518019f
time="2023-02-01T19:55:32+05:30" level=info msg="client exit"
time="2023-02-01T19:55:32+05:30" level=error msg="read tcp [::1]:8083->[::1]:8405: use of closed network connection" call=Receive channel=0 func=HTTPAPIServerStreamMSE module=http_mse stream=83f3c71b-5ab4-44be-9716-094e8518019f
time="2023-02-01T19:55:32+05:30" level=error msg="<nil>" call=Close channel=0 func=HTTPAPIServerStreamMSE module=http_mse stream=83f3c71b-5ab4-44be-9716-094e8518019f
time="2023-02-01T19:55:32+05:30" level=info msg="Client Full Exit"
2023/02/01 19:55:32 [drop packet 41031]
time="2023-02-01T19:55:33+05:30" level=error msg="stream no video" call=ErrorStreamNoVideo channel=0 func=HTTPAPIServerStreamWebRTC module=http_webrtc stream=83f3c71b-5ab4-44be-9716-094e8518019f
2023/02/01 19:55:33 [drop packet 41186]
2023/02/01 19:55:33 [drop packet 41289]
2023/02/01 19:55:34 [drop packet 41393]
2023/02/01 19:55:34 [drop packet 41593]
2023/02/01 19:55:35 [drop packet 41743]
2023/02/01 19:55:36 [drop packet 41947]
2023/02/01 19:55:41 [TEARDOWN rtsp://172.16.19.22:554/ RTSP/1.0
CSeq: 6
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="133141d6293b55ae7103487975042dcd", uri="rtsp://172.16.19.22:554/", response="bc4fbf205a9fe6e7f9dac07b07e66309"
User-Agent: Lavf58.76.100
Session: 123463585a76395

]
2023/02/01 19:55:41 [RTSP Client RTP Read Header read tcp 192.168.1.6:8403->119.82.252.166:554: use of closed network connection]
2023/02/01 19:55:41 [RTSP Client Close <nil>]
time="2023-02-01T19:55:41+05:30" level=error msg="Stream error restart stream stream no video" call=Restart
time="2023-02-01T19:55:43+05:30" level=info msg="Run stream" call=Run channel=0 func=StreamServerRunStreamDo module=core stream=83f3c71b-5ab4-44be-9716-094e8518019f
2023/02/01 19:55:43 [OPTIONS rtsp://119.82.252.166:554/main-stream RTSP/1.0
CSeq: 1
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:43 [OPTIONS rtsp://119.82.252.166:554/main-stream RTSP/1.0
CSeq: 2
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="5bbe532d4fd40cb24e4146594b214872", uri="rtsp://119.82.252.166:554/main-stream", response="e53bfd6656861fc40bf88910b87145ae"
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:44 [RTSP/1.0 200 OK
CSeq: 2
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, SET_PARAMETER, GET_PARAMETER, PAUSE

]
2023/02/01 19:55:44 [DESCRIBE rtsp://119.82.252.166:554/main-stream RTSP/1.0
CSeq: 3
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="5bbe532d4fd40cb24e4146594b214872", uri="rtsp://119.82.252.166:554/main-stream", response="659851ca417fdcb24021336d2e95bb0b"
Accept: application/sdp
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:44 [RTSP/1.0 200 OK
CSeq: 3
Cache-control: no-cache
Content-Type: application/sdp
Content-Base: rtsp://172.16.19.22:554/
Content-Length: 375

v=0
o=- 0 0 IN IP4 172.16.19.22
s=LIVE VIEW
c=IN IP4 0.0.0.0
t=0 0
a=control:rtsp://172.16.19.22:554/?main-stream
m=video 0 RTP/AVP 35
a=rtpmap:35 H264/90000
a=rtpmap:102 H265/90000
a=control:rtsp://172.16.19.22:554/?main-stream&stream=video
a=recvonly
a=fmtp:35 packetization-mode=1;profile-level-id=4d402a;sprop-parameter-sets=Z01AKo2NIA8ARPy4C3AQ0BAg,aO44gA==
]
2023/02/01 19:55:44 [SETUP rtsp://172.16.19.22:554/?main-stream&stream=video RTSP/1.0
CSeq: 4
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="5bbe532d4fd40cb24e4146594b214872", uri="rtsp://172.16.19.22:554/?main-stream&stream=video", response="ed12116a8089dfdc0adc122e97cb6397"
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: Lavf58.76.100

]
2023/02/01 19:55:44 [RTSP/1.0 200 OK
CSeq: 4
Session: 1234163a5a770c4;timeout=30
Transport: RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=18049110

]
2023/02/01 19:55:44 [PLAY rtsp://172.16.19.22:554/ RTSP/1.0
CSeq: 5
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="5bbe532d4fd40cb24e4146594b214872", uri="rtsp://172.16.19.22:554/", response="d02970e30ba223efcedd737fe434689b"
User-Agent: Lavf58.76.100
Session: 1234163a5a770c4

]
2023/02/01 19:55:44 [RTSP/1.0 200 OK
CSeq: 5
Session: 1234163a5a770c4

]
time="2023-02-01T19:55:44+05:30" level=info msg="Success connection RTSP" call=Start channel=0 func=StreamServerRunStream module=core stream=83f3c71b-5ab4-44be-9716-094e8518019f
2023/02/01 19:55:49 [drop packet 43741]
2023/02/01 19:55:49 [drop packet 43988]
2023/02/01 19:55:50 [drop packet 44241]
2023/02/01 19:55:51 [drop packet 44390]
2023/02/01 19:55:51 [drop packet 44594]
2023/02/01 19:55:52 [drop packet 44696]
2023/02/01 19:55:52 [drop packet 44846]
2023/02/01 19:55:53 [drop packet 45000]
2023/02/01 19:55:53 [drop packet 45102]
2023/02/01 19:55:53 [drop packet 45204]
2023/02/01 19:55:54 [drop packet 45306]
2023/02/01 19:55:54 [drop packet 45408]
2023/02/01 19:55:54 [drop packet 45510]
2023/02/01 19:55:55 [drop packet 45608]
2023/02/01 19:55:55 [drop packet 45710]
2023/02/01 19:55:55 [drop packet 45812]
2023/02/01 19:55:56 [drop packet 45963]
2023/02/01 19:55:57 [drop packet 46161]
2023/02/01 19:55:57 [drop packet 46263]
2023/02/01 19:55:58 [drop packet 46416]
2023/02/01 19:55:59 [drop packet 46618]
2023/02/01 19:55:59 [drop packet 46805]
2023/02/01 19:56:00 [drop packet 47051]
2023/02/01 19:56:01 [drop packet 47204]
2023/02/01 19:56:02 [drop packet 47459]
2023/02/01 19:56:03 [TEARDOWN rtsp://172.16.19.22:554/ RTSP/1.0
CSeq: 6
Authorization: Digest username="service", realm="Please log in with a valid username", nonce="5bbe532d4fd40cb24e4146594b214872", uri="rtsp://172.16.19.22:554/", response="b4932734b1c652afc4dcd7f8b72e54c1"
User-Agent: Lavf58.76.100
Session: 1234163a5a770c4

]
2023/02/01 19:56:03 [RTSP Client RTP ReadFull <nil>]
2023/02/01 19:56:03 [RTSP Client Close <nil>]
time="2023-02-01T19:56:03+05:30" level=error msg="Stream error restart stream stream no video" call=Restart
time="2023-02-01T19:56:05+05:30" level=info msg="Run stream" call=Run channel=0 func=StreamServerRunStreamDo module=core stream=83f3c71b-5ab4-44be-9716-094e8518019f
time="2023-02-01T19:56:05+05:30" level=info msg="Stop stream no client" call=ClientHas channel=0 func=StreamServerRunStreamDo module=core stream=83f3c71b-5ab4-44be-9716-094e8518019f
Nisthar commented 1 year ago

can you pls check this? @deepch

ronluna commented 1 year ago

I'm having the same problem... Seems to be related to IPv6... not sure... Any ideas?

github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 main.CrossOrigin.func1(0xc000412d00) /workspace/apiHTTPRouter.go:296 +0x2f9 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0005004e0, 0xc000412d00) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 +0x671 github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0005004e0, {0xd1a098, 0xc0004a81c0}, 0xc000684d00) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 +0x1dd net/http.serverHandler.ServeHTTP({0xc0003dc570}, {0xd1a098, 0xc0004a81c0}, 0xc000684d00) /usr/lib/go/src/net/http/server.go:2879 +0x43b net/http.(*conn).serve(0xc00012f0e0, {0xd20d80, 0xc000366990}) /usr/lib/go/src/net/http/server.go:1930 +0xb08 created by net/http.(*Server).Serve /usr/lib/go/src/net/http/server.go:3034 +0x4e8 2023/03/20 22:14:16 http: panic serving [:IPv6_removed:]:56877: runtime error: invalid memory address or nil pointer dereference goroutine 131 [running]: net/http.(*conn).serve.func1() /usr/lib/go/src/net/http/server.go:1802 +0xb9 panic({0xb35fa0, 0x11e5790}) /usr/lib/go/src/runtime/panic.go:1047 +0x266 main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff) /workspace/hlsMuxer.go:158 +0x27 main.(*StorageST).HLSMuxerM3U8(0xc0004bc000, {0xc00004118c, 0x10}, {0xc0000411a5, 0x1}, 0x5851, 0xd0d3a0) /workspace/storageStreamChannel.go:400 +0x1b6 main.HTTPAPIServerStreamHLSLLM3U8(0xc000412800) /workspace/apiHTTPHLSLL.go:83 +0x496 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 main.CrossOrigin.func1(0xc000412800) /workspace/apiHTTPRouter.go:296 +0x2f9 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0005004e0, 0xc000412800) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 +0x671 github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0005004e0, {0xd1a098, 0xc0003b6460}, 0xc000413000) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 +0x1dd net/http.serverHandler.ServeHTTP({0xc0002bb380}, {0xd1a098, 0xc0003b6460}, 0xc000413000) /usr/lib/go/src/net/http/server.go:2879 +0x43b net/http.(*conn).serve(0xc0003de320, {0xd20d80, 0xc000366990}) /usr/lib/go/src/net/http/server.go:1930 +0xb08 created by net/http.(*Server).Serve /usr/lib/go/src/net/http/server.go:3034 +0x4e8 2023/03/20 22:14:16 http: panic serving [:IPv6_Removed:]:56879: runtime error: invalid memory address or nil pointer dereference goroutine 105 [running]: net/http.(*conn).serve.func1() /usr/lib/go/src/net/http/server.go:1802 +0xb9 panic({0xb35fa0, 0x11e5790}) /usr/lib/go/src/runtime/panic.go:1047 +0x266 main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff) /workspace/hlsMuxer.go:158 +0x27 main.(*StorageST).HLSMuxerM3U8(0xc0004bc000, {0xc00012087c, 0x10}, {0xc000120895, 0x1}, 0x0, 0x0) /workspace/storageStreamChannel.go:400 +0x1b6 main.HTTPAPIServerStreamHLSLLM3U8(0xc000685100) /workspace/apiHTTPHLSLL.go:83 +0x496 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 main.CrossOrigin.func1(0xc000685100) /workspace/apiHTTPRouter.go:296 +0x2f9 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0005004e0, 0xc000685100) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 +0x671 github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0005004e0, {0xd1a098, 0xc000168b60}, 0xc000685000) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 +0x1dd net/http.serverHandler.ServeHTTP({0xc0003dd9b0}, {0xd1a098, 0xc000168b60}, 0xc000685000) /usr/lib/go/src/net/http/server.go:2879 +0x43b net/http.(*conn).serve(0xc00012f220, {0xd20d80, 0xc000366990}) /usr/lib/go/src/net/http/server.go:1930 +0xb08 created by net/http.(*Server).Serve /usr/lib/go/src/net/http/server.go:3034 +0x4e8 2023/03/20 22:14:17 http: panic serving [:IPv6_removed:]:56882: runtime error: invalid memory address or nil pointer dereference goroutine 107 [running]: net/http.(*conn).serve.func1() /usr/lib/go/src/net/http/server.go:1802 +0xb9 panic({0xb35fa0, 0x11e5790}) /usr/lib/go/src/runtime/panic.go:1047 +0x266 main.(*MuxerHLS).GetIndexM3u8(0x0, 0xffffffffffffffff, 0xffffffffffffffff) /workspace/hlsMuxer.go:158 +0x27 main.(*StorageST).HLSMuxerM3U8(0xc0004bc000, {0xc00053423c, 0x10}, {0xc000534255, 0x1}, 0x0, 0x0) /workspace/storageStreamChannel.go:400 +0x1b6 main.HTTPAPIServerStreamHLSLLM3U8(0xc0001dcb00) /workspace/apiHTTPHLSLL.go:83 +0x496 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 main.CrossOrigin.func1(0xc0001dcb00) /workspace/apiHTTPRouter.go:296 +0x2f9 github.com/gin-gonic/gin.(*Context).Next(...) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0005004e0, 0xc0001dcb00) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 +0x671 github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0005004e0, {0xd1a098, 0xc0004a8460}, 0xc000685200) /root/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 +0x1dd net/http.serverHandler.ServeHTTP({0xc0005fc090}, {0xd1a098, 0xc0004a8460}, 0xc000685200) /usr/lib/go/src/net/http/server.go:2879 +0x43b net/http.(*conn).serve(0xc00012f360, {0xd20d80, 0xc000366990}) /usr/lib/go/src/net/http/server.go:1930 +0xb08 created by net/http.(*Server).Serve /usr/lib/go/src/net/http/server.go:3034 +0x4e8

LiangHuangBC commented 1 year ago

same issue here, might be similar with #87

ibandeng commented 1 year ago

invalid memory address or nil pointer dereference