Closed yxjavac closed 1 year ago
The following error was encountered on the Centos7 system:
my code is,please help me:
public static void screenshot(String rtspUrl, String fileName) throws IOException { FFmpegFrameGrabber grabber = FFmpegFrameGrabber.createDefault(rtspUrl); grabber.setOption("rtsp_transport", "tcp"); grabber.setImageWidth(1920); grabber.setImageHeight(1080); grabber.setFormat("rtsp"); grabber.start(); File outPut = new File(fileName); while (true) { Frame frame = grabber.grabImage(); if (frame != null) { ImageIO.write(frameToBufferedImage(frame), "jpg", outPut); grabber.stop(); grabber.release(); break; } } }
It should be a system issue. After replacing the server, it ran very well
The following error was encountered on the Centos7 system:
my code is,please help me: