bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.45k stars 1.57k forks source link

what is the method that can make the grabImage() method return null at the expected time in the event of a sudden network outage? #2032

Open wxz1211 opened 1 year ago

wxz1211 commented 1 year ago

hi, I use FFmpegGrabber to pull the rtsp stream, with parameters timeout and stimeout set to 5 seconds. If the network is connected at the beginning, the program can obtain the decoded video frames And when the network suddenly disconnects while it is already running, is the timeout and stimeout above effective? Because the return value of the grabImage() method is null, but sometimes the running time of this method exceeds one minute before returning null, what is the method that can make the grabImage() method return null at the expected time in the event of a sudden network outage? thx!

wxz1211 commented 1 year ago

@saudet Is this the reason why it takes a long time for grabImage() to return null when the network is down? Sometimes grabImage() waits for more than 10 minutes before returning null? image

saudet commented 1 year ago

Probably not...

wxz1211 commented 1 year ago

Probably not...

Is there any way?

saudet commented 1 year ago

Using UDP instead of TCP would give us more control over that...