Webrtc video problem

hello sir,
i am working on jetson xavier NX boxes with deepstream-6.0.
i build a webrtc server to transfer deepstream’s rtsp stream for web appllication right now, but it loss frame and died after few seconds only, but my webrtc server play others IP camera it is very well and smoothly. i checked log about deepstream’s rtsp, it shows above:
2024/07/08 11:39:02 [Recovery] 2024/07/08 - 11:39:02 panic recovered:
runtime error: index out of range [0] with length 0
/usr/local/go/src/runtime/panic.go:89 (0x430db)
goPanicIndex: panic(boundsError{x: int64(x), signed: true, y: y, code: boundsIndex})
/go/pkg/mod/github.com/deepch/vdk@v0.0.20/codec/h264parser/parser.go:668 (0x5b9127)
CodecData.SPS: return self.RecordInfo.SPS[0]
/go/src/RTSPtoWebRTC/config.go:186 (0x5b8f84)
(*ConfigST).coGe: if codecVideo.SPS() != nil && codecVideo.PPS() != nil && len(codecVideo.SPS()) > 0 && len(codecVideo.PPS()) > 0 {
/go/src/RTSPtoWebRTC/http.go:74 (0x5ba1bf)
HTTPAPIServerStreamCodec: codecs := Config.coGe(c.Param(“uuid”))
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x5bb127)
(*Context).Next: c.handlersc.index
/go/src/RTSPtoWebRTC/http.go:170 (0x5bb108)
CORSMiddleware.func1: c.Next()
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x5a272f)
(*Context).Next: c.handlersc.index
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/recovery.go:102 (0x5a2710)
CustomRecoveryWithWriter.func1: c.Next()
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x5a19af)
(*Context).Next: c.handlersc.index
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/logger.go:240 (0x5a198c)
LoggerWithConfig.func1: c.Next()
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/context.go:174 (0x5a0ab3)
(*Context).Next: c.handlersc.index
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:620 (0x5a078c)
(*Engine).handleHTTPRequest: c.Next()
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.0/gin.go:576 (0x5a037f)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/local/go/src/net/http/server.go:2916 (0x28dbc7)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1966 (0x2892af)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_arm64.s:1270 (0x75e83)
goexit: MOVD R0, R0 // NOP

so i think problem was caused by SPS and PPS frame, could you pls give me some advice to get it works well?

thank you very much!

Hi,
Some properties in nvv4l2h264enc plugin may be helpful:

  disable-cabac       : Set Entropy Coding Type CAVLC(TRUE) or CABAC(FALSE)
                        flags: readable, writable
                        Boolean. Default: false
  insert-aud          : Insert H.264 Access Unit Delimiter(AUD)
                        flags: readable, writable
                        Boolean. Default: false
  insert-sps-pps      : Insert H.264 SPS, PPS at every IDR frame
                        flags: readable, writable
                        Boolean. Default: false
  insert-vui          : Insert H.264 VUI(Video Usability Information) in SPS
                        flags: readable, writable
                        Boolean. Default: false

Please set the properties with different combinations for a try.

ok get it and i try now in sink bin.

thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.