0

当我使用 FFmpegFrameRecorder 录制视频时,它显示了这个错误

   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)    

. 谁能帮我解决这个物理内存问题?

4

2 回答 2

1

您可能希望在清单中添加大堆标签:

android:largeHeap="true"

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

于 2021-02-16T21:55:26.867 回答
0

此后存在内存泄漏问题: https ://github.com/bytedeco/javacv/issues/1068

于 2018-12-24T09:40:28.997 回答