Open ayoullf opened 1 year ago
Some codecs are not thread safe. Try with another codec.
thank you!if rtspSream is different,will this problem occur?
I don't think there's any problems relating to multithreading with the socket API, so if some problems occur there, it might be issues with your network.
javacv version:1.5.8; system:windows10 my code is `public void run() { LOG.info("####the {} rtsp stream:{},is running", count, rtspStream); System.setProperty("org.bytedeco.javacpp.logger", "slf4j"); System.setProperty("org.bytedeco.javacpp.logger.debug", "true"); FFmpegLogCallback.set(); try { grabber = new FFmpegFrameGrabber(rtspStream); grabber.setOption("rtsp_transport", "tcp"); grabber.setOption("stimeout", "2000000"); grabber.setFormat("rtsp");//rtsp FFmpegLogCallback.set(); grabber.start();
// bufferedImage=rotateClockwise90(bufferedImage); return bufferedImage; }` the "rtspStream" is the same,I run with 2 thread is normal,More than 2 threads will report an error. Whether more than two rtsp streams can not be opened at the same time