-
Notifications
You must be signed in to change notification settings - Fork 220
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Out of memory issue with large files #7
Comments
Can you specify your device model and android version you have? |
Hi, I was using OnePlus 2 and file size was more than 150 mb. Later I took On Sep 6, 2016 3:10 PM, "Keval Patel" notifications@github.com wrote: Can you specify your device model and android version you have? — |
@Sateesh2 could you please propose a PR with those changes? they are really interesting |
@dogo I just created PR with above-mentioned changes. Sorry for the late reply |
i have same issue please give solution. |
Hi, Ashish, the reason for the out of memory issue is the latest mp4parser changes. So I took the current project and rolled back mp4parser to "com.googlecode.mp4parser:isoparser:1.1.7". You may need to update one or two lines in TrimVideoUtils class. Let me know if you are stuck. |
@Sateesh2 Hi I am facing the same problem. So can you please give me a code? I have changed my dependency from "com.googlecode.mp4parser:isoparser:1.1.20" to "com.googlecode.mp4parser:isoparser:1.1.7". |
In TrimVideoUtils.java file go to genVideoUsingMp4Parser() method, in the first line of this method change FileDataSourceViaHeapImpl to FileDataSourceImpl. |
Changing FileDataSourceViaHeapImpl to FileDataSourceImpl is not helping. Crash issue still persists. |
When I select a large file to trim, on clicking save app crashes with below log
FATAL EXCEPTION: pool-1-thread-1 Process: life.knowledge4.videocroppersample, PID: 32469 java.lang.OutOfMemoryError: Failed to allocate a 440786855 byte allocation with 11418026 free bytes and 239MB 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$1.hasNext(LazyList.java:55) at com.coremedia.iso.IsoFile.getMovieBox(IsoFile.java:102) at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:51) at life.knowledge4.videotrimmer.utils.TrimVideoUtils.genVideoUsingMp4Parser(TrimVideoUtils.java:71) at life.knowledge4.videotrimmer.utils.TrimVideoUtils.startTrim(TrimVideoUtils.java:65) at life.knowledge4.videotrimmer.K4LVideoTrimmer$12.execute(K4LVideoTrimmer.java:362) at life.knowledge4.videotrimmer.utils.BackgroundExecutor$Task.run(BackgroundExecutor.java:212) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered: