-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fail With JavaCV not Responding RTSP in frameGrabber.start() #648
Comments
So, it sounds like a problem with FFmpeg. Could you report that upstream?
|
I find the solution. It is necessary you define one timeout. streamGrabber.setOption("timeout" , "3"); The default value for this parameter is '-1' (infinite). "Timeout A value of -1 means infinite (default). This option implies the rtsp_flags set to ‘listen’." |
👍Thank you ! |
Why it's not working for me? I can't even start grabber when uses
Returns error:
Without this options it works but there is no timeout. JDK 1.8.0 x32 |
That flag is only valid for listening connections:
I don't think this is the flag you want. There is another flag is isn't for listening connections though. |
FYI, it looks like the "stimeout" option works for RTSP streams: |
It turns out that we need to set the "stimeout" option for the RTSP protocol. Thanks to @d-a-gerashenko we now have working sample code for this: |
I have one program to get one video in protocol rtsp using JavaCV:
My program is like this:
If I use one correct link rtsp my program return and I can deal with he.
But if the link are incorrect or the ipcam are desconnected the program not return in the command frameGrabber.start();
The program crash, not return error and not do more nothing.
I've already tried use try catch but didn't have sucess, the program not return.
Edit:
I did tests with other protocols like http, and it does not occur this problem, the program return one message that can not open the link, to http are ok, but when using rtsp not return.
The text was updated successfully, but these errors were encountered: