Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOM issue with FFmpegFrameRecorder #1394

Closed
xiaos opened this issue Mar 31, 2020 · 7 comments
Closed

OOM issue with FFmpegFrameRecorder #1394

xiaos opened this issue Mar 31, 2020 · 7 comments

Comments

@xiaos
Copy link

xiaos commented Mar 31, 2020

Hi i encounter many issues like this, any suggestion?

java.lang.OutOfMemoryError:

at org.bytedeco.javacpp.Pointer.deallocator (Pointer.java:29)

at org.bytedeco.javacpp.Pointer.init (Pointer.java:5)

at org.bytedeco.ffmpeg.avformat.Write_packet_Pointer_BytePointer_int.allocate (Native Method)

at org.bytedeco.ffmpeg.avformat.Write_packet_Pointer_BytePointer_int. (Write_packet_Pointer_BytePointer_int.java:2)

at org.bytedeco.javacv.FFmpegFrameRecorder$WriteCallback. (FFmpegFrameRecorder.java:1)

at org.bytedeco.javacv.FFmpegFrameRecorder. (FFmpegFrameRecorder.java:6)

@saudet
Copy link
Member

saudet commented Mar 31, 2020 via email

@xiaos
Copy link
Author

xiaos commented Apr 1, 2020

Thanks @saudet i think i release all resource immediately after use. e.g For ffmpegGraber, i release it, for IplImage, i release also.

when i grab image in loop, i don't need release the image each time right?

@saudet
Copy link
Member

saudet commented Apr 1, 2020

We can use a PointerScope to make sure to catch everything, see issue #1383. If you have more questions about that, please add them to issue #1383.

@saudet
Copy link
Member

saudet commented Apr 1, 2020

Duplicate of #1383

@saudet
Copy link
Member

saudet commented Jun 18, 2020

BTW, I think I've fixed all the memory leaks occurring in FFmpegFrameGrabber and FFmpegFrameRecorder.
Please give it a try with the snapshots: http://bytedeco.org/builds/

@LiuChao96
Copy link

BTW, I think I've fixed all the memory leaks occurring in FFmpegFrameGrabber and FFmpegFrameRecorder.
Please give it a try with the snapshots: http://bytedeco.org/builds/

Excuse me,Why can't I download 1.5.4-snapshot

@saudet
Copy link
Member

saudet commented Jul 15, 2020

We can download as explained here: http://bytedeco.org/builds/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants