gortsplib
gortsplib copied to clipboard
Support server-side requests
When I connect the camera, every 30 seconds, send OPTIONS request to keep alive, however, the camera will send response: RTSP/1.0 200 OK......
but camera also send a request: OPTIONS*RTSP/1.0.........
An error occurred while parsing this request in the code pkg\base\response.go line144
proto := string(byts[:len(byts)-1]) // this proto value is "OPTIONS"
if proto != rtspProtocol10 {
return fmt.Errorf("expected '%s', got '%s'", rtspProtocol10, proto)
}
logs: c->s OPTIONS rtsp://192.168.35.108/media.sdp/ RTSP/1.0 CSeq: 6 Session: 0 User-Agent: gortsplib
s>c RTSP/1.0 0
c->s TEARDOWN rtsp://192.168.35.108/media.sdp/ RTSP/1.0 CSeq: 7 Session: 0 User-Agent: gortsplib
s>c RTSP/1.0 0
I am using ffplay to play this camera stream and it is no problem, ffplay responds to this request:
Hello, this is related to #56 - at the moment the client library doesn't support cameras or servers that send requests back. It may in the future.
fixed by #378
added in MediaMTX v1.0.1
This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.