mp4parser
mp4parser copied to clipboard
A cast to int has gone wrong. Please contact the mp4parser discussion group (2332179761)
Hi, I got this error trying to combine MP4s that had just been recorded by the MediaRecorder.
This worked fine on my galaxy S5 (Android 6) and also on nexus 4 (Android 5.1),
But using phone Motorola X (XT1053) with Android 5.1 I get this exception every time. Any ideas what might be the issue?
Using latest version 1.1.21.
07-14 15:12:45.112 10854-10894/? W/System.err: java.lang.RuntimeException: A cast to int has gone wrong. Please contact the mp4parser discussion group (3878608261)
07-14 15:12:45.120 10854-10867/? W/art: Suspending all threads took: 6.012ms
07-14 15:12:45.125 10854-10894/? W/System.err: at com.googlecode.mp4parser.util.CastUtils.l2i(CastUtils.java:30)
07-14 15:12:45.125 10854-10894/? W/System.err: at com.googlecode.mp4parser.AbstractBox.parse(AbstractBox.java:110)
07-14 15:12:45.125 10854-10894/? W/System.err: at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:107)
07-14 15:12:45.125 10854-10894/? W/System.err: at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:185)
07-14 15:12:45.125 10854-10894/? W/System.err: at com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:161)
07-14 15:12:45.131 10854-10894/? W/System.err: at com.googlecode.mp4parser.util.LazyList.blowup(LazyList.java:30)
07-14 15:12:45.132 10854-10894/? W/System.err: at com.googlecode.mp4parser.util.LazyList.size(LazyList.java:77)
07-14 15:12:45.132 10854-10894/? W/System.err: at com.googlecode.mp4parser.BasicContainer.getBoxes(BasicContainer.java:80)
07-14 15:12:45.132 10854-10894/? W/System.err: at com.googlecode.mp4parser.authoring.samples.DefaultMp4SampleList.
same
This happens when I try to parse a file > 2GB. The "cast to int" is the clue, if the file size is larger than what a signed 32-bit int can hold. Perhaps wherever this happens, should use long
instead?
same issue with me but file size is less the 10 MB
I have found this issue in two phones Moto g5 plus and Moto z2 play, other devices are fine. The crash occurs in
Movie m = MovieCreator.build(video);
where video
is the path to the video file in internal memory.
Error log
E/UncaughtException: java.lang.RuntimeException: A cast to int has gone wrong. Please contact the mp4parser discussion group (2982292332)
Hello, I have exactly the same exception sometimes with short videos. Do you have any solutions to this ?
Well, for someone who have the same error (I'm on Xamarin Android but it's the same on Android):
I use the 1.1.8 version that seems to fix the Cast to int error. Then, I check if a file exists at the same path used in the MovieCreator.build(path) and if it exists, I delete it. This resolves the OOM exception.
See => https://github.com/sannies/mp4parser/issues/139#issuecomment-240029219
I'm experiencing this error in a test trying to parse a container I just wrote. Here's my StackOverflow question and a public GitHub project I made specifically to reproduce this issue.
Is there a new update for this issue?
Any updates?