Skip to content
New issue

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

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

Already on GitHub? # to your account

Second PLAY request causes stream to close. #128

Closed
bahaynes opened this issue Nov 18, 2020 · 3 comments
Closed

Second PLAY request causes stream to close. #128

bahaynes opened this issue Nov 18, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@bahaynes
Copy link

Which version are you using?

v0.12.1

Which operating system are you using?

Windows

Describe the problem

While tuning a single stream published via ffmpeg's rtsp method, the client sends the proper setup messages (OPTIONS -> DESCRIBE -> SETUP), but sends 2 sequential PLAY messages. The second is rejected by the simple-rtsp-server with a client error code (400), and this causes the client to fail to stream the media. The error log from the server is:

2020/11/18 22:13:07 [2/1/0] [client 172.24.52.198:64120] connected
2020/11/18 22:13:07 [2/1/0] [client 172.24.52.198:64120] OPTIONS
2020/11/18 22:13:07 [2/1/0] [client 172.24.52.198:64120] DESCRIBE
2020/11/18 22:13:07 [2/1/0] [client 172.24.52.198:64120] SETUP
2020/11/18 22:13:07 [2/1/0] [client 172.24.52.198:64120] PLAY
2020/11/18 22:13:07 [2/1/1] [client 172.24.52.198:64120] is reading from path 'stream', 1 track with udp
2020/11/18 22:13:07 [2/1/1] [client 172.24.52.198:64120] PLAY
2020/11/18 22:13:07 [2/1/1] [client 172.24.52.198:64120] ERR: client must be in state [PrePlay], while is in state Play
2020/11/18 22:13:07 [1/1/0] [client 172.24.52.198:64120] disconnected

The command we are using to publish the stream to the server is:

ffmpeg.exe -re -stream_loop -1 -i udp://127.0.0.1:2222?overrun_nonfatal=1'&'fifo_size=50000000 -vcodec copy -f rtsp rtsp://localhost:8554/stream

Where the udp stream on localhost is coming from the camera. My understanding of the RFC is that additional PLAY messages may be sent by clients while in a Play state, and that the client is just expecting a OK response since the stream is already playing at the requested position. The client itself is a QT application, and I believe it is using the qmediaplayer library, but I don't have the ability to change its behavior.

Did you attach a network dump?

yes
networkdump.zip

aler9 added a commit that referenced this issue Nov 24, 2020
@aler9
Copy link
Member

aler9 commented Nov 24, 2020

Hello, thanks for reporting the bug, calling PLAY multiple times is now supported in master and will be supported in the next release.

@aler9 aler9 added the bug Something isn't working label Nov 24, 2020
aler9 added a commit that referenced this issue Nov 24, 2020
@aler9
Copy link
Member

aler9 commented Nov 25, 2020

added in v0.12.2

@aler9 aler9 closed this as completed Nov 25, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2023

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 Jan 1, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants