-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
StartFrameReaderAsync can't be stopped when rtsp is offline #9
Comments
In the meantime, have you found a solution to the problem? |
No, but the code keeps hanging at I read this old ticket from FFMPEG (https://trac.ffmpeg.org/ticket/2294), which seems to suggest that parameter |
why it might be hanging forever ? https://ffmpeg.org/ffmpeg-protocols.html
how people fixed it? https://stackoverflow.com/questions/71095477/ffmpeg-timeout-with-rtsp
https://stackoverflow.com/questions/35123267/how-to-set-rtsp-connection-timeout-in-ffmpeg |
I'm using Nager.VideoStream for getting frames from a security camera on a Windows 10 PC with a .NET framework 4.8 application.
When the source is offline/not reachable, it is not possible to stop StartFrameReaderAsync.
Even when you cancel the provided CancellationToken, StartFrameReaderAsync won't stop.
The only way to then stop it, is by closing my entire application.
I reproduced this issue in the Nager.VideoStream.TestConsole by only changing:
var inputSource = new StreamInputSource("my_secret_rtsp_url");
var client = new VideoStreamClient(@"my_secret_folder\ffmpeg.exe");
The console application clearly cancels the cancellation token:
But this console writeline is never executed:
In my application I need to call StartFrameReaderAsync quite frequently.
That means without proper cancellation, multiple StartFrameReaderAsync threads will be active at the same time.
This is a major performance issue for my application when the camera is offline/not reachable.
The text was updated successfully, but these errors were encountered: