0

When I record video using FFmpegFrameRecorder it shows me this error

   E/AndroidRuntime: FATAL EXCEPTION: Thread-36
    java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes (1100M) > maxPhysicalBytes (1024M)
    at org.bytedeco.javacpp.Pointer.deallocator(Pointer.java:588)
    at org.bytedeco.javacpp.Pointer.init(Pointer.java:124)
    at org.bytedeco.javacpp.avcodec$AVPacket.allocate(Native Method)
    at org.bytedeco.javacpp.avcodec$AVPacket.<init>(avcodec.java:1516)
    at java.lang.Thread.run(Thread.java:784)    

. Can anyone please help me to solve this Physical memory issue?

3
  • 1
    solve this Physical memory issue - Buy more memory Commented Sep 27, 2018 at 5:25
  • @ScaryWombat i have already added "org.gradle.jvmargs=-Xmx8192m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError" this line in gradle.properties file. Commented Sep 27, 2018 at 5:34
  • Use less memory. Very likely you have a leak. Use the profiler to find it. Commented Sep 27, 2018 at 5:47

2 Answers 2

1

You probably want to add the large heap tag in your manifest:

android:largeHeap="true"

https://developer.android.com/guide/topics/manifest/application-element

Sign up to request clarification or add additional context in comments.

Comments

0

There was a memory leak that has since been fixed: https://github.com/bytedeco/javacv/issues/1068

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.