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?

Sarath Kn
  • 2,680
  • 19
  • 24
Rudra
  • 171
  • 10

2 Answers2

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

ggrana
  • 2,335
  • 2
  • 21
  • 31
0

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

Samuel Audet
  • 4,964
  • 1
  • 26
  • 33