bytedeco/javacv

FFmpegFrameGrabber works only for few seconds.

Open

#696 opened on May 12, 2017

View on GitHub
 (19 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I'm having some trouble with FFmpegFrameGrabber.grabImage() method, it only works for about 180 frames or so. I'm using Tenvis TH-671 cameras rtsp link which works just fine in VLC player, also when I use same code for other camera with rtsp link it works just fine. To clarify program gets stuck in grabImage() and cant get new frame (also tried grab instead grabImage), not sure what the problem is, here's sample code:


frameGrabber = new FFmpegFrameGrabber("rtsp://ip/11");
frameGrabber.start();
Frame frame;
BufferedImage img;
for(int i=0;i<1000;i++){
	Main.frameGrabber.flush();
	frame = Main.frameGrabber.grab();
	img = new Java2DFrameConverter().convert(frame);
}

Only message in console that I get, that I don't get with other camera, is:

[swscaler @ 0x60e00030] No accelerated colorspace conversion found from yuv420p to bgr24.

Contributor guide