danikula / danikula/AndroidVideoCache
MPEG4Extractor: Video is malformed
- Dominant language
- Java
- Stars
- 5.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I am experiencing a weird issue using this library.
sometimes, while streaming some video, i get the following exception:
MPEG4Extractor: Video is malformed - offset=943983, srcOffset=4, mNALLengthSize=-1864625292, nalLength=4, size=688
however the data reported in the exception are different every time it occurs, and then the video stops with a media player error (1, -1007)
This is all I was able to find out:
- the issue never occurs when using direct url streaming, but occurs when using a video cache url
- the issue occurs at random times and sometimes doesn't occur at all
- after a video has been played completely, the issue will never occur again unless the cache is cleared
- the issue never occurs with some videos (for example, with the annoying orange videos of the sample app, it never occurs)
- the issue never occurs on some devices, while it frequently occurs on some other
- the issue occurs independently of the % of caching, but very often occurs after the video is 100% cached (this makes me think that something bad happens while saving the stream to disk)
- the issue is not related to the server where the videos are hosted. some videos stored on the same server can be played without problems
- the issue can be reproduced in the sample app by changing one of the urls with this one:
http://www.bravepotions.com/streaming/ninja.mp4
this video has the following specs:
mp4 using H.264 video codec and AAC audio codec
resolution 1280 x 720
fixed framerate 24fps
the video was encoded using HandBrake on mac and can be played just fine
i can try to encode my videos using some other software, but i am afraid that many other people will experience something similar
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.