-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
4.0 release: When using ffprobe to pull the same rtmp stream from edge twice in a row, the second ffprobe command freezes and does not return. #2628
Comments
After taking a look, there is only a rough reproduction method. Could you please write down the simplest steps to reproduce the issue?
|
Steps to reproduce:
|
Please provide two example configuration files for SRS. Thank you.
|
I have also encountered it. Our transcoding system uses ffprobe first, then ffmpeg. The transcoding speed of ffmpeg is only 0.003 times, and then it times out. Removing ffprobe solves the issue. Only pulling once, pulling the stream twice in a short period of time will cause the second stream to freeze.
|
Directly use edge.conf and origin.conf under trunk/conf.
The configuration files are directly used from trunk/conf, namely edge.conf and origin.conf. Please refer to the compressed file below.
|
Reproduction path: #2594 (comment) Thank you @retamia I closed this issue, dup to #2594
|
Printed some information,
Found that when the second ffprobe command successfully connected to RTMP,
After the new coroutine finished executing "SrsLiveSource::create_consumer",
The original coroutine, which was interrupted by the new connection and then awakened, continued to execute the "SrsPlayEdge::on_all_client_stop()" method,
Resulting in the edge state being set to "init",
I speculate that at this point, the edge does not pull the stream from the master node, which causes the second ffprobe command to freeze because it did not receive the RTMP stream.
The log information is as follows:
Made some attempts to modify:
lock
instance fromSrsLiveSourceManager
toSrsLiveSource
when creating a newSrsLiveSource
object.SrsLocker( lock )
at the beginning of theSrsLiveSource::on_consumer_destroy
method.The problem has been resolved, but the second time it still takes 3-4 seconds for the return of the ffprobe command (the first ffprobe command returns instantly).
I don't have a deep understanding of SRS, so I'm not sure if there are any issues with this modification or if there is a better way to handle it.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: