Hello everybody,
I have this code, that's works fine:
public void CapturaFotoAutomatic(final String nombre, final String ip, final
String descripcion) {
try {
FrameGrabber grabber = new FFmpegFrameGrabber("rtp://" + ip + ":1234");
IplImage img;
grabber.setTimeout(1000);
grabber.start();
img = grabber.grab();
String imagenAuto = "../camaras/" + nombre + ".png";//Modificación para
obtener de rtp
try {
byte[] b;
b = mergeImageAndText(img.getBufferedImage(), descripcion);
FileOutputStream fos = new FileOutputStream("../camaras/" + nombre + ".png");
fos.write(b);
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
grabber.stop();
}catch (Exception e) {
e.printStackTrace();
}
}
But when the video is not broadcasting, the program waits in the
grabber.start() instructuion.
How I can finish or kill this instrucction?
How I can detect that the video is not working?
version: javacv_0.7 under windows and linux.
Thanks,
Original issue reported on code.google.com by
javier.d...@gmail.comon 21 Jan 2014 at 12:11