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

Unable to process mp4 files recorded on Nexus 5x with Android 6.0.1 #213

Open
ogrebgr opened this issue Jul 12, 2016 · 3 comments
Open

Unable to process mp4 files recorded on Nexus 5x with Android 6.0.1 #213

ogrebgr opened this issue Jul 12, 2016 · 3 comments

Comments

@ogrebgr
Copy link

ogrebgr commented Jul 12, 2016

Mp4Parser version: 1.9.27
When trying to process file recorded on Nexus 5x with Android 6.0.1 there is an error:

SEVERE: UnknownBox{type= } might have been truncated by file end. bytesRead=2371435 contentSize=1751411818

This happens on all videos recorded on Marshmallow devices and probably is due the fact that they changed the encoder in Marshmallow.

Sample video can be downloaded from here: http://ogre.ikratko.com/wp-content/uploads/2016/07/VID_20160712_085937.mp4

Full stacktrace:

java.util.NoSuchElementException
    at java.util.LinkedList$ListItr.next(LinkedList.java:890)
    at org.mp4parser.muxer.builder.DefaultMp4Builder.getTimescale(DefaultMp4Builder.java:617)
    at org.mp4parser.muxer.builder.DefaultMp4Builder.createMovieBox(DefaultMp4Builder.java:176)
    at org.mp4parser.muxer.builder.DefaultMp4Builder.build(DefaultMp4Builder.java:107)
    at bg.mvr.antidzhigit.units.sessions.VideoManipulatorImpl.cut(VideoManipulatorImpl.java:141)
    at bg.mvr.antidzhigit.units.sessions.VideoManipulatorImpl.cutKeepLeft(VideoManipulatorImpl.java:61)
    at bg.mvr.antidzhigit.units.sessions.VideoCutterImplTest.testCutKeepLeft(VideoCutterImplTest.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

@elotti
Copy link

elotti commented Sep 7, 2016

I have got exactly the same issue with Android 6.0.1 generated mp4-files.
As I need a trim-function for mp4-files, I tried to use the old (before moving to github) version from google. See https://code.google.com/archive/p/mp4parser/ and http://repo1.maven.org/maven2/com/googlecode/mp4parser/isoparser/.
Version 1.1.9 works for me. I didn't check the differences between google 1.1.9 and github 1.9.27 and therefore I didn't get the cause of this issue but i've got a workaround.

@ogrebgr
Copy link
Author

ogrebgr commented Sep 8, 2016

@elotti I did exactly the same thing but the older version had other problems so I ended up using ffmpeg (which added 15MB to the APK size :-( )

@thomasdemoor
Copy link

+1, both on v1.1.22 and v1.9.37 on Android 7.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants