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
The videowriter from openCV that you use is only looking for mp4 files and is not reporting an error if it entcounters other filetypes, which results in an empty variable that get's further passed down.
First error that happens in line 38 when trying to write the first videos:
video = cv.VideoWriter(output, cv.VideoWriter_fourcc('M','J','P','G'), fps, (int(width), int(height)))
Error says "fps" is called before assignment.
Most likely origin:
in line:19 vame/analysis/videowriter.py when calling vame.motif_videos()
def get_cluster_vid(cfg, path_to_file, file, n_cluster):
print("Videos get created for "+file+" ...")
labels = np.load(path_to_file+'/'+str(n_cluster)+'_km_label_'+file+'.npy')
--> capture = cv.VideoCapture(cfg['project_path']+'videos/'+file+'.mp4')
Suggested solution:
allow filetype parameter in config file (as early DLC did)
This would also help if you plan to include an automatic video/PE copying when initializing the project.
Alternative:
You could search for common filetypes within OpenCVs limits.
best,
Jens
The text was updated successfully, but these errors were encountered:
thank you for pointing this out. In a later release of VAME we will perhaps include this option.
For now, your workaround seems to be fine and I close the issue.
Me again,
The videowriter from openCV that you use is only looking for mp4 files and is not reporting an error if it entcounters other filetypes, which results in an empty variable that get's further passed down.
First error that happens in line 38 when trying to write the first videos:
Error says "fps" is called before assignment.
Most likely origin:
in line:19
vame/analysis/videowriter.py
when callingvame.motif_videos()
My workaround:
capture = cv.VideoCapture(cfg['project_path'] + 'videos/' + file + '.avi')
Suggested solution:
allow filetype parameter in config file (as early DLC did)
This would also help if you plan to include an automatic video/PE copying when initializing the project.
Alternative:
You could search for common filetypes within OpenCVs limits.
best,
Jens
The text was updated successfully, but these errors were encountered: