javacv icon indicating copy to clipboard operation
javacv copied to clipboard

1.5.7 grabImage hanging 1min

Open syschen opened this issue 1 year ago • 6 comments

hi @saudet

I'm grabbing images from a live streaming, But the data tracker shows the GAP between keyframes and also happens in other frames,

Any ideas why?

CODE: while ((frame = grabber.grabImage()) != null) { if (!frame.keyFrame) { logEvent("FrameTypeCount", "NonKeyFrame"); continue; } logEvent("FrameTypeCount", "KeyFrame"); }

KeyFrame Tracker:
image

NonKeyFrame Tracker: image

early version 1.5.4 shows like this: image image

syschen avatar Jun 01 '23 03:06 syschen

Please make sure that FFmpegLogCallback.set() has been called and check for any warning messages.

saudet avatar Jun 01 '23 04:06 saudet

image

Just Normal messages.

Tricky is this problem only happens in prod,In dev everything is just fine(both 1.5.4 and 1.5.7 , same os CentOS 7.6.1810).

And In prod we rollback our app to 1.5.4 the gap can dispear.

image

syschen avatar Jun 01 '23 06:06 syschen

Sounds like something that might be related to garbage collection. Make sure it's not causing any signification latency.

saudet avatar Jun 01 '23 06:06 saudet

Sounds like something that might be related to garbage collection. Make sure it's not causing any signification latency.

Metric system shows no fullgc or CPU usage or IO lag problems. -_-!

syschen avatar Jun 01 '23 07:06 syschen

Can you try again with JavaCV 1.5.9?

saudet avatar Jun 11 '23 12:06 saudet

Please try again with the snapshots: http://bytedeco.org/builds/

saudet avatar Jun 12 '23 00:06 saudet