GazeML icon indicating copy to clipboard operation
GazeML copied to clipboard

Stuck with --from_video option

Open elvis-kture opened this issue 4 years ago • 3 comments

I am trying to use this script with --from_video option and my video, but script stucks after "Video [MY_VIDEO_URL] closed."

Does anyone have the same? Where a problem could be? Thanks!

elvis-kture avatar Dec 28 '20 15:12 elvis-kture

Hi!

I was having the same issue and for me it solved as follows.

I had a video 200x200 (widthxheight) at 1 fps and the program always stopped at "video closed" . Then I changed the video to 720x480 at 20 fps and now the elg_demo.py --from_video argument works. I hope it helps you. This is the VideoWriter object with the codec:

out = cv2.VideoWriter('webcam_video.avi', cv2.VideoWriter_fourcc(*'DIVX'), 20.0, (720, 480))

I think there migth be a problem with the video you are using, maybe the resolution or the fps.

MellyGray avatar Jan 03 '21 18:01 MellyGray

@MellyGray Great thanks! yes, it helps. But would be great to understand the root cause of that problem to have the ability to recognize any video with any fps and resolution.

elvis-kture avatar Jan 04 '21 14:01 elvis-kture

you can address to this solution. convert to support format: I converted my mp4 to avi and it works. https://github.com/swook/GazeML/issues/34#issuecomment-516671511

keishatsai avatar Feb 15 '22 09:02 keishatsai