grabber = FFmpegFrameGrabber.createDefault(this.listener.getVideoUrlOrPath());
grabber.setTimeout(Math.abs((int) GlobalHandler.configMnger.getConnectionTimeout() / 1000));
grabber.setOption("fflags", "nobuffer");
grabber.setOption("nobuffer", "1");
grabber.setOption("max_delay", "0");
grabber.setOption("hwaccel", "auto");
grabber.setOption("vsync", "0");
grabber.setOption("r", "4");
grabber.setOption("preset", "ultrafast");
grabber.setOption("tune", "zerolatency");
grabber.setOption("analyzeduration", "0");
grabber.setOption("fflags", "flush_packets");
grabber.setOption("fflags", "nofillin");
grabber.setOption("fflags", "noparse");
grabber.setOption("flags", "low_delay");
grabber.setOption("framedrop", "1");
grabber.setOption("fflags", "discardcorrupt");
grabber.setOption("framerate", "4");
grabber.setFrameRate(4);
grabber.setVideoCodec(avcodec.AV_CODEC_ID_H264);
grabber.start();
Frame image;
while((image=grabber.grabImage())!=null){
Please Note that remove all options gives identical results, where the only working option i have here is timout that is set using the setTimeout function above.
Any help please?. Thanks!!
The options we can use should all be documented on these pages:
https://ffmpeg.org/ffmpeg-protocols.html
https://ffmpeg.org/ffmpeg-formats.html
https://ffmpeg.org/ffmpeg-codecs.html