mp4parser icon indicating copy to clipboard operation
mp4parser copied to clipboard

OutOfMemoryError creating a Movie

Open ghost opened this issue 7 years ago • 6 comments

Hello,

I'm using mp4parser 1.1.2.1, and I'm having a problem creating a movie. Movie movie = MovieCreator.build(new FileDataSourceImpl(video.getPath()));

this is the log: java.lang.OutOfMemoryError: Failed to allocate a 271631603 byte allocation with 16777216 free bytes and 69MB until OOM at java.nio.ByteBuffer.allocate(ByteBuffer.java:56) at com.googlecode.mp4parser.AbstractBox.parse(AbstractBox.java:110) at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:107) at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:185) at com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:161) at com.googlecode.mp4parser.util.LazyList.blowup(LazyList.java:30) at com.googlecode.mp4parser.util.LazyList.size(LazyList.java:77) at com.googlecode.mp4parser.BasicContainer.getBoxes(BasicContainer.java:80) at com.googlecode.mp4parser.authoring.samples.DefaultMp4SampleList.<init>(DefaultMp4SampleList.java:36) at com.coremedia.iso.boxes.mdat.SampleList.<init>(SampleList.java:33) at com.googlecode.mp4parser.authoring.Mp4TrackImpl.<init>(Mp4TrackImpl.java:64) at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:57) at com.android.df.ContinuousCaptureActivity.trimVideo(ContinuousCaptureActivity.java:915) at com.android.df.ContinuousCaptureActivity.fileSaveComplete(ContinuousCaptureActivity.java:568) at com.android.df.ContinuousCaptureActivity.access$100(ContinuousCaptureActivity.java:97) at com.android.df.ContinuousCaptureActivity$MainHandler.handleMessage(ContinuousCaptureActivity.java:200) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5461) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) If you need more information I would appreciate It. Thank you.

ghost avatar Dec 29 '16 17:12 ghost

Same for me. version 1.1.21 the latest one. Had to went back to 1.1.7 this version does not throw that exception.

whiteLT avatar Jan 19 '17 15:01 whiteLT

Same for version 1.9.27. Did you solved this @OrangeDynamic?

guilpejon avatar May 29 '17 02:05 guilpejon

Same for me. Asus Zenfone 2 Laser (android 5.0.2)

e16din avatar Jun 29 '17 08:06 e16din

Looks like the same issue I have with IsoFile https://github.com/sannies/mp4parser/issues/284

alexeyvasilyev avatar Oct 13 '17 14:10 alexeyvasilyev

went back to 1.1.7 version solved this error. seems a bug.

ChadCSong avatar Feb 19 '19 07:02 ChadCSong

@ChadCSong can you please confirm that reverting back to 1.1.7 resolved this issue?

HBiSoft avatar May 08 '19 14:05 HBiSoft