go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Wrong response on DESCRIBE (301 Moved Permanently is not followed)

Open CapedBaldy opened this issue 1 year ago • 2 comments

I have a setup where if a camera is offline a 301 response is provided as a fallback, but it seems go2rtc has trouble following the redirect. The version is 1.9.4, these are the logs of the issue:

`

21:26:44,348 trace [api] GET /api/log 192.168.1.26:58126
21:26:45,396 trace undefined error=websocket: close 1000 (normal) caller=github.com/AlexxIT/go2rtc/internal/api/ws/ws.go:124
21:26:46,346 trace [api] GET /api/ws?src=rtsp://localhost:8664/dahua_camera_andrea_sd [::1]:34276
21:26:46,350 trace [api] ws msg type=mse
21:26:46,350 trace [mp4] new WS/MSE consumer codecs=avc1.640029,avc1.64002A,avc1.640033,mp4a.40.2,mp4a.40.5,flac,opus
21:26:46,350 trace [streams] check cons=0 media=video, sendonly, H264
21:26:46,352 trace [rtsp] client request:DESCRIBE rtsp://localhost:8664/dahua_camera_andrea_sd RTSP/1.0 Accept: application/sdp Require: www.onvif.org/ver20/backchannel User-Agent: go2rtc/1.9.4 CSeq: 1
21:26:46,353 trace [rtsp] client response:RTSP/1.0 301 Moved Permanently Cseq: 1 Location: rtsp://localhost:8664/blankstream Server: gortsplib
21:26:46,353 trace [rtsp] describe (backchannel=true) err: wrong response on DESCRIBE
21:26:46,356 trace [rtsp] client request:DESCRIBE rtsp://localhost:8664/dahua_camera_andrea_sd RTSP/1.0 Accept: application/sdp User-Agent: go2rtc/1.9.4 CSeq: 1
21:26:46,357 trace [rtsp] client response:RTSP/1.0 301 Moved Permanently Cseq: 1 Location: rtsp://localhost:8664/blankstream Server: gortsplib
21:26:46,357 trace [streams] dial cons=0 prod=0 error=wrong response on DESCRIBE
21:26:46,357 trace [streams] check cons=0 media=audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, PCML, OPUS
21:26:46,357 trace [streams] skip cons=0 prod=0
21:26:46,358 trace [streams] skip stop none producer
21:26:46,358 debug [mp4] add consumer error=streams: wrong response on DESCRIBE
`

CapedBaldy avatar Nov 26 '24 20:11 CapedBaldy

I found a similar issue (https://github.com/AlexxIT/go2rtc/issues/565) but it was fixed in 1.7.0.

CapedBaldy avatar Nov 26 '24 20:11 CapedBaldy

I have this issue with a Tapo TC70 as well. HD stream is sometimes unavailable, and doesn't fall back to the non-HD one. I'm using version 1.9.7 on HA.

timothe avatar Dec 07 '24 09:12 timothe

Issue is still here with 1.9.8

timothe avatar Jan 20 '25 08:01 timothe