-
Notifications
You must be signed in to change notification settings - Fork 37
Description
When going through the compression step using an avi file and background subtraction, I get the following error:
20170522_hisAIB_nohisL_nohisC_adp_naive1.avi kept stack Starting video compression.
ERROR:
AttributeError: 'readVideoCapture' object has no attribute 'frame_max'
Traceback (most recent call last):
File "/home/pkidd/Apps/tierpsy-tracker/tierpsy/processing/ProcessWorker.py", line 108, in
ProcessWorker(**args, cmd_original = subprocess.list2cmdline(sys.argv))
File "/home/pkidd/Apps/tierpsy-tracker/tierpsy/processing/ProcessWorker.py", line 38, in init
self.execAllPoints()
File "/home/pkidd/Apps/tierpsy-tracker/tierpsy/processing/ProcessWorker.py", line 66, in execAllPoints
cmd_original = self.cmd_original)
File "/home/pkidd/Apps/tierpsy-tracker/tierpsy/processing/trackProvenance.py", line 28, in execThisPoint
func(**argkws)
File "/home/pkidd/Apps/tierpsy-tracker/tierpsy/analysis/compress/processVideo.py", line 142, in processVideo
compressVideo(video_file, masked_image_file, **compress_vid_param)
File "/home/pkidd/Apps/tierpsy-tracker/tierpsy/analysis/compress/compressVideo.py", line 335, in compressVideo
bg_dataset._v_attrs['save_interval'] = vid.frame_max-vid.first_frame + 1
AttributeError: 'readVideoCapture' object has no attribute 'frame_max'
I get similar errors with other file types as well (eg after converting to TIF).
Because I have a pre-existing Python installation (including OpenCV) that I use for other tasks, I didn't use Anaconda, and just installed from the github source with pip install -e. Many of my packages are different versions than recommended in your requirements.txt, in particular I have OpenCV 4.1.2. So I suspect this is an OpenCV version issue? If there's no easy fix I could create a new environment and setup with Anaconda, but I figured I would check here first. Thanks!
Phil