bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.55k stars 1.58k forks source link

How to use javacv to determine whether the rtsp stream is online #1939

Open wxz1211 opened 1 year ago

wxz1211 commented 1 year ago

hi: My rtsp stream is sometimes disconnected, How to use javacv to determine whether the rtsp stream is online

steeveen commented 1 year ago

En:Use grabber.start() and set timeout. if the frame returned is null. the stream is disconnected. Ch: 我记得grabber有个rw_timeout,这个参数可以设置为0,如果你提供的rtmp流不可用的话,就会直接返回null帧了