1

I try to load a low res, high frequency video into and extract and edit some frames and save them as a gif. checking the length of the loaded video gives me "inf" which can not be true, can it?

filename = 'eye0.mp4'
vid = imageio.get_reader(filename, 'ffmpeg')

If I try to display any of the frames with

pylab.imshow(vid.get_data(range(80,120))

all images not matter which index look the same.

reason might be that the nframes is read out wrong.

vid.get_meta_data()

Output:

{'plugin': 'ffmpeg',
 'nframes': inf,
 'ffmpeg_version': '4.1 built with gcc 8.2.1 (GCC) 20181017',
 'codec': 'mpeg4',
 'pix_fmt': 'yuv420p',
 'fps': 65535.0,
 'source_size': (192, 192),
 'size': (192, 192),
 'duration': 34.42}

Could it be that this ffmpeg_version format is not supported? If someone could help, much appreciated.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Peter
  • 51
  • 5
  • what version of imageio are you using? have you tried just using imageio.get_reader(filename)? It may be an unsupported format I guess but we need more info to be sure. – Mr K. Oct 07 '19 at 01:23
  • Hi, thanks for the comment. Version 2.5.0 I just downloaded it. Somehow it can not read the 'fps' of about 120, instead it reads 65535.0. that might cause some trouble. It was an exported movie from pupil labs eye-tracking software. The original worked. Not sure why the edited version did not. I could open the edited version with opencv without problem though. Thanks again – Peter Oct 10 '19 at 08:17
  • The API changed in the version 2.5.0 check this question to see more about it: https://stackoverflow.com/questions/54800652/float-object-cannot-be-interpreted-as-an-integer-while-reading-the-frame/54820534#54820534 – Mr K. Nov 08 '19 at 07:22

0 Answers0