Skip to content
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

High memory use when playing MP4 files from removable storage. #3214

Closed
MateusZitelli opened this issue Aug 28, 2017 · 3 comments
Closed

High memory use when playing MP4 files from removable storage. #3214

MateusZitelli opened this issue Aug 28, 2017 · 3 comments

Comments

@MateusZitelli
Copy link

Issue description

High memory use when playing MP4 files from removable storage.

Reproduction steps

Add to demo app media.exolist.json the an entry like that:

      {
        "name": "Removable storage playback",
        "playlist": [
          {
            "uri": "/storage/428F-19EF/All 360 Camera Samples/Insta360nano-2880x1440-Long.mp4"
          }
        ]
      },

Then launch the sample in the demo app.

Link to test content

It worked with all videos big enough to fill the RAM.

Version of ExoPlayer being used

r2.5.1

Device(s) and version(s) of Android being used

Tested on:

  • LG G3 (Android 5.0)
  • Protruly D7 (Android 6.0)
  • Samsung Galaxy S8 (Android 7.0)

A full bug report captured from the device

08-28 19:11:36.543 620-620/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [14.40]
com.google.android.exoplayer2.ExoPlaybackException
    at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:389)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:154)
    at android.os.HandlerThread.run(HandlerThread.java:61)
 Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected OutOfMemoryError: Failed to allocate a 65548 byte allocation with 48024 free bytes and 46KB until OOM
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:345)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:762)
 Caused by: java.lang.OutOfMemoryError: Failed to allocate a 65548 byte allocation with 48024 free bytes and 46KB until OOM
    at com.google.android.exoplayer2.upstream.DefaultAllocator.allocate(DefaultAllocator.java:102)
    at com.google.android.exoplayer2.source.SampleQueue.preAppend(SampleQueue.java:592)
    at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:516)
    at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readSample(Mp4Extractor.java:441)
    at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:152)
    at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:704)
    at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at java.lang.Thread.run(Thread.java:762)
@ojw28
Copy link
Contributor

ojw28 commented Aug 29, 2017

I cannot reproduce this issue on an S8. I tried with a ~100MB video and memory usage was capped at ~16MB throughout. Please provide concrete reproduction steps.

@MateusZitelli
Copy link
Author

Ok, here is the clip that triggers the event.

@ojw28
Copy link
Contributor

ojw28 commented Aug 29, 2017

The file isn't interleaved properly (it doesn't contain any audio at all until nearly 2GB into the end of the file (i.e. right at the end). Audio and video should really be interleaved approximately evenly throughout the file.

I don't think we have any particular need or intention to support this type of media. Whatever's producing this type of media should do a better job of it ;).

@ojw28 ojw28 closed this as completed Aug 29, 2017
@google google locked and limited conversation to collaborators Dec 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants