Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support server-side requests #93

Closed
BenLocal opened this issue Jan 18, 2022 · 4 comments
Closed

Support server-side requests #93

BenLocal opened this issue Jan 18, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@BenLocal
Copy link
Contributor

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

@aler9
Copy link
Member

aler9 commented Jan 27, 2022

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 aler9 added the enhancement New feature or request label Jan 27, 2022
@aler9 aler9 changed the title Connected camera automatically disconnects after 30 seconds Support server-side requests Jan 27, 2022
@aler9
Copy link
Member

aler9 commented Aug 25, 2023

fixed by #378

@aler9 aler9 closed this as completed Aug 25, 2023
@aler9
Copy link
Member

aler9 commented Aug 30, 2023

added in MediaMTX v1.0.1

Copy link

github-actions bot commented Mar 3, 2024

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 github-actions bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants