lintel icon indicating copy to clipboard operation
lintel copied to clipboard

OverflowError: size does not fit in an int

Open shecker opened this issue 7 years ago • 4 comments

Hi Brendan, thanks for this awesome library. I have noticed that I am unable to load videos greater than a certain size using this library. For example I am working with videos around 4GB in size and when I try to load those in via

import lintel
with open( 'a_4GB_video.MP4', 'rb') as f:
    video = f.read()
    decoded_frames, width, height = lintel.loadvid_frame_nums( video, frame_nums=2)

I get:

OverflowError: size does not fit in an int.

Could this be due to some 32bit code? I am able to use this library with smaller videos (~200mb works fine) Thanks a lot. Cheers, Simon

shecker avatar Feb 21 '19 14:02 shecker

Hi Simon,

Interesting, I am a bit puzzled about the Python OverflowError exception here. I will take a look at reproducing tonight.

dukebw avatar Feb 21 '19 15:02 dukebw

Would it be possible to give the big-videos branch a try, please? I made a couple small changes to pass sizes as size_t instead of int.

dukebw avatar Feb 22 '19 03:02 dukebw

Hi Brendan, Sorry for the late reply. I gave your big-videos branch a go but still no luck. I get the following error:

AVERROR: -1094995529, message: Invalid data found when processing input
Stream index not found.
python: lintel/py_ext/lintelmodule.c:244: get_vid_width_height: Assertion `((uint32_t)codec_context->width == *width) && ((uint32_t)codec_context->height == *height)' failed.
Aborted

However, I have adjusted to smaller video chunks of around 1GB which may be more suitable anyway. Therefore will just stick to the master branch that works great on those videos. Thanks a lot for your help. Cheers, Simon

EDIT: if you are interested I have made a 4GB file available to test. It's captured via a GoPro Hero5 and contains some meta tracks embedded within the mp4 container as well. This might also be the cause for the error. You can find it here http://people.ee.ethz.ch/~heckers/Drive360/meta_debug/GP030100.MP4 and just download via wget

shecker avatar Feb 27 '19 08:02 shecker

Hi Simon,

That is great, I'm glad that you found a solution anyway. And thank you for uploading the video -- I will leave this issue open and debug further once I have time.

dukebw avatar Feb 27 '19 13:02 dukebw