gortsplib icon indicating copy to clipboard operation
gortsplib copied to clipboard

Support server-side requests

Open BenLocal opened this issue 3 years ago • 1 comments

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

image image

I am using ffplay to play this camera stream and it is no problem, ffplay responds to this request: image image

BenLocal avatar Jan 18 '22 12:01 BenLocal

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.

aler9 avatar Jan 27 '22 22:01 aler9

fixed by #378

aler9 avatar Aug 25 '23 14:08 aler9

added in MediaMTX v1.0.1

aler9 avatar Aug 30 '23 12:08 aler9

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.

github-actions[bot] avatar Mar 03 '24 15:03 github-actions[bot]