You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
video = mydia.Videos().read(video_path)
File ".../python3.6/site-packages/mydia/mydia.py", line 234, in read
video_tensor = np.vstack(map(self._read_video, paths_iterator))
File "<__array_function__ internals>", line 6, in vstack
File ".../python3.6/site-packages/numpy/core/shape_base.py", line 280, in vstack
arrs = atleast_2d(*tup)
File ".../python3.6/site-packages/mydia/mydia.py", line 286, in _read_video
fps, total_frames = self._probe(path)
File ".../python3.6/site-packages/mydia/mydia.py", line 365, in _probe
total_frames = int(video_stream["nb_frames"])
KeyError: 'nb_frames'
To reproduce:
Locate a video file which works
Convert it to .mkv as follows: ffmpeg -i working.mp4 -vc copy test.mkv
Try to read mkv file
I printed the video_stream data in _probe(), here was the result:
Right now, it'll be difficult for me to test (and possibly fix) the issue. So, I would recommend using .mp4 for now. Let me know if even then you face a similar problem.
I'll update here as soon as I get time to look into this.
Also, is there any particular reason why you're converting videos to .mkv?
I tried reading a
.mkv
file and it crashed.To reproduce:
ffmpeg -i working.mp4 -vc copy test.mkv
I printed the
video_stream
data in_probe()
, here was the result:Do .mp4 files work reliably? If so, converting input to .mp4 should work as a workaround.
The text was updated successfully, but these errors were encountered: