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

Getting " InvalidResponseCodeException" and "IllegalArgumentException" on MP4 playback! #5162

Closed
robindanielk opened this issue Nov 28, 2018 · 8 comments
Assignees

Comments

@robindanielk
Copy link

Hi, recently have been experiencing issues while playing MP4 files from server.
Below are the exceptions being thrown :

`E/LoadTask: Unexpected exception loading stream
    java.lang.IllegalArgumentException
        at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
        at com.google.android.exoplayer2.extractor.mp4.AtomParsers.parseStbl(AtomParsers.java:279)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.processMoovAtom(Mp4Extractor.java:408)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.processAtomEnded(Mp4Extractor.java:364)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readAtomPayload(Mp4Extractor.java:355)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:186)
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:856)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320)
        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:761)
2015-01-04 05:41:14.952 11036-11036/com.example.ridsys_001.AsterTest E/EventLogger: internalError [0.87, 4270.00, window=0, period=0, loadError]
    com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalArgumentException: null
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:342)
        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:761)
     Caused by: java.lang.IllegalArgumentException
        at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
        at com.google.android.exoplayer2.extractor.mp4.AtomParsers.parseStbl(AtomParsers.java:279)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.processMoovAtom(Mp4Extractor.java:408)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.processAtomEnded(Mp4Extractor.java:364)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readAtomPayload(Mp4Extractor.java:355)
        at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:186)
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:856)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320)
        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:761) 

 com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 416
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:211)
        at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:147)
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:844)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320)
        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:761)
     Caused by: com.google.android.exoplayer2.upstream.DataSourceException
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:214)
        at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:147) 
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:844) 
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320) 
        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:761) 
2015-01-04 05:41:16.103 11036-11036/com.example.ridsys_001.AsterTest E/EventLogger: internalError [2.02, 4270.00, window=0, period=0, loadError]
    com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 416
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:211)
        at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:147)
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:844)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320)
        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:761)
     Caused by: com.google.android.exoplayer2.upstream.DataSourceException
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:214)
        at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:147) 
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:844) 
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320) 
        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:761) 
`

I have attached the medinfo for the file and atom information.
movieInfo.txt
mediaInfo2.txt

Would be really helpfuly if u guys could help with this!!!

@andrewlewis andrewlewis self-assigned this Nov 28, 2018
@andrewlewis
Copy link
Collaborator

The IllegalArgumentException in AtomParsers.parseStbl indicates that the MP4 header data is not in the expected format. InvalidResponseCodeException: Response code: 416 suggests that the player is requesting an invalid byte range from the server.

The media could be invalid, or at last not supported by ExoPlayer's MP4 extractor. To know for sure we'd need to have a copy of the MP4. If you provide that we can verify and reopen the issue if needed.

@robindanielk
Copy link
Author

Hi..i ve added the mp4dump as well....not able to figure out where the content is bad

mp4dump.txt

Hope this helps!!

@andrewlewis
Copy link
Collaborator

We really need to see the MP4 or at least the whole moov box. You can attach it here or send it to dev.exoplayer@gmail.com with subject line "Issue #5162".

@robindanielk
Copy link
Author

@andrewlewis Hi..i ve mailed the mp4 file to dev.exoplayer@gmail.com with subject line "Issue #5162".

@andrewlewis
Copy link
Collaborator

andrewlewis commented Nov 28, 2018

The video track sample table contains more CTTS entry than we expect, which is causing the assertion failure. Do you know what specific program (and version number) was used to encode the file?

The file plays correctly after removing this assertion, so we might replace it with a logged warning.

@robindanielk
Copy link
Author

@andrewlewis .thanks for the information..but the content happens to be downloaded from internet so the specifics are unknown!!..could you tell how the CTTS entry was extracted and removed?
..because that would be helpful in clearing from our side..!!

@andrewlewis
Copy link
Collaborator

We'll push a change shortly that changes the assertion into a warning. This issue will be updated automatically to reference the commit.

@andrewlewis
Copy link
Collaborator

One other thing to note about this issue: the IllegalArgumentException in parseStbl will be addressed by the commit once it gets pushed, but I'm not sure why the HTTP 416 error was appearing. If we were retrying parsing the stream after throwing, the range request should be valid. I also can't reproduce that part of this issue (I just see the exception parsing stbl then a playback failure after retrying and getting the same exception). The range request error may be caused by a player bug or possibly server misconfiguration, so if you can reproduce it again please file a new issue. Thanks!

andrewlewis added a commit that referenced this issue Nov 29, 2018
Issue: #5162
PiperOrigin-RevId: 223193019
ojw28 pushed a commit that referenced this issue Nov 30, 2018
Issue: #5162
PiperOrigin-RevId: 223193019
@google google locked and limited conversation to collaborators May 16, 2019
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