A cast to int has gone wrong

473 views
Skip to first unread message

Matthew Nourse

unread,
Aug 21, 2013, 7:20:45 AM8/21/13
to mp4parser-...@googlegroups.com
Hi all, I'm using isoparser-1.0-RC-15 and I'm getting this error on a customer's customer's video:

java.lang.RuntimeException: A cast to int has gone wrong. Please contact the mp4parser discussion group (4294967287)
        at com.googlecode.mp4parser.util.CastUtils.l2i(CastUtils.java:30) [isoparser-1.0-RC-15.jar:]
        at com.coremedia.iso.ChannelHelper.readFully(ChannelHelper.java:37) [isoparser-1.0-RC-15.jar:]
        at com.googlecode.mp4parser.AbstractBox.parse(AbstractBox.java:113) [isoparser-1.0-RC-15.jar:]
        at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:118) [isoparser-1.0-RC-15.jar:]
        at com.coremedia.iso.boxes.sampleentry.SampleEntry._parseChildBoxes(SampleEntry.java:123) [isoparser-1.0-RC-15.jar:]
        at com.googlecode.mp4parser.boxes.apple.TimeCodeBox._parseDetails(TimeCodeBox.java:45) [isoparser-1.0-RC-15.jar:]
        at com.googlecode.mp4parser.AbstractBox.parseDetails(AbstractBox.java:146) [isoparser-1.0-RC-15.jar:]
        at com.googlecode.mp4parser.RequiresParseDetailAspect.before(RequiresParseDetailAspect.java:53) [isoparser-1.0-RC-15.jar:]
        at com.coremedia.iso.boxes.sampleentry.SampleEntry.getBoxes(SampleEntry.java:83) [isoparser-1.0-RC-15.jar:]
[my code from here down]

...so here I am, contacting the discussion group :).

I noticed that 1.0-RC-15 is reasonably old but it's the version that http://code.google.com/p/mp4parser/ recommends.  Is upgrading my best option, and if so, is it possible for a later version to be published to Maven Central?

Thanks for mp4parser!

Matt
www.rseventeen.com

Sebastian Annies

unread,
Aug 30, 2013, 5:19:49 AM8/30/13
to mp4parser-...@googlegroups.com

Hi,

 

Could you please try a later build? I know that the repositories are no longer available and I will release a new version to central soon but you can easily compile for example RC-25 on your own by checking out ‘http://mp4parser.googlecode.com/svn/tags/mp4parser-project-1.0-RC-25/’ and executing ‘mvn install’.

If the error persists there might be something odd with the file itself. Can you share the file or is it somehow confidential?

 

Best Regards,

Sebastian

Matthew Nourse

unread,
Sep 1, 2013, 9:55:11 PM9/1/13
to mp4parser-...@googlegroups.com
Thanks Sebastian for your helpful response.

I did try RC-23 (the latest version I could find in SonaType).  It threw this exception with a null stack trace:
java.lang.RuntimeException: java.io.IOException: Trying to read more data than available. The file might be corrupt

...and wrote out this error...
WARNING: Something's wrong with the sizes. There are dead bytes in a container box.

If I pass the file through ffmpeg and make any modification to it the problem goes away.  It seems to me that this particular video file is not standards-compliant but unfortunately for us the company that made the video is popular in the industry and several of their videos have the problem.

On the up side, I only really need the metadata so this workaround works well for me:

List<Box> children;
try {
    children = containerBox.getBoxes();
} catch (Exception e) {
    logWarn("Exception while getting child boxes.", e);
    children = new LinkedList<Box>();
}

Even though the video itself is completely innocuous, unfortunately I can't share the video in the group.  It's ok for me to email you the link directly to you though, I will do that in a few moments.

Thanks again!
Matt
Reply all
Reply to author
Forward
0 new messages