Open Vegeta4567 opened 10 months ago
Hi @Vegeta4567,
It is likely an issue with the installation of FFmpeg. Could you try to install it manually from https://ffmpeg.org/ , restart your computer, and try again?
Otherwise, can you help me with the following in order:
wxPython
is the issue or the installation of FFmpeg.--debug
tag as well? That will tell me which lines are unhappy and ideally it is the same part of the script for both.Try this and let me know how things go!
Hello,
Thanks for your fast reply!
I am using Python 3.6.0 in the virtual env. 3.6.10 in the base (same problem):
I reinstalled ffmpeg. ffmpeg -version gives: ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
The versions: argparse = 1.1 ffmpeg-python = 0.2.0 matplotlib = 3.1.3 numpy=1.19.5 pandas=1.0.5 pip=20.1.1 scipy=1.5.0 trackpy=0.4.2 wxPython = 4.0.4
If I run: pythonw .\scripts\FreeClimber_main.py --video_file .\example\w1118_m_2_1.avi it's the same problem. I suppose it's the non-GUI right?
I am not really familiar with Python, where I put the --debug command?
Thanks a lot and best!
The debug command would go at the end of when you call the script:
pythonw .\scripts\FreeClimber_main.py --video_file .\example\w1118_m_2_1.avi --debug
To run the non-GUI, try this as well:
python FreeClimber_main.py --config_file ./example/example.cfg --debug
Hello,
The first command returns absolutely nothing.
For the second one, I have this result:
########################################################################
detector.init detector.check_video...detector.load_for_main detector.load_for_main: --------variables-------- detector.load_for_main: x=100 detector.load_for_main: y=136 detector.load_for_main: w=1112 detector.load_for_main: h=380 detector.load_for_main: check_frame=100 detector.load_for_main: blank_0=0 detector.load_for_main: blank_n=145 detector.load_for_main: crop_0=0 detector.load_for_main: crop_n=145 detector.load_for_main: threshold="auto" detector.load_for_main: diameter=7 detector.load_for_main: minmass=100 detector.load_for_main: maxsize=11 detector.load_for_main: ecc_low=.05 detector.load_for_main: ecc_high=.58 detector.load_for_main: vials=3 detector.load_for_main: window=50 detector.load_for_main: pixel_to_cm=46 detector.load_for_main: frame_rate=29 detector.load_for_main: vial_id_vars=2 detector.load_for_main: outlier_TB=1 detector.load_for_main: outlier_LR=3 detector.load_for_main: naming_convention="geno_sex_day_rep" detector.load_for_main: path_project="./example" detector.load_for_main: file_suffix="h264" detector.load_for_main: convert_to_cm_sec=True detector.load_for_main: trim_outliers=True detector.check_variable_formats
detector.specify_paths_details detector.specify_paths_details: self.path_data='./example\w1118_m_2_1.raw.csv' detector.specify_paths_details: self.path_filtered='./example\w1118_m_2_1.filtered.csv' detector.specify_paths_details: self.path_diagnostic='./example\w1118_m_2_1.diagnostic.png' detector.specify_paths_details: self.path_slope='./example\w1118_m_2_1.slopes.csv' detector.video_to_array !! Could not read ./example\w1118_m_2_1.h264 into FreeClimber. Likely due to unacceptable video file or FFmpeg not installed !! Could not read in video file metadata Traceback (most recent call last): File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 276, in video_to_array out,err = (ffmpeg AttributeError: module 'ffmpeg' has no attribute 'input'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".\scripts\FreeClimber_main.py", line 489, in
I get the same error. Please help:(
Hello,
For me, the problem was the virtual env.
I have totally uninstalled python and anaconda. Reinstalled anaconda Installed python 3.6.8 https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe Reboot the computer Launched a anaconda console Installed the dependencies needed. pip install argparse pip install ffmpeg-python pip install matplotlib pip install numpy pip install pandas pip install scipy pip install trackpy pip install wxPython pip install FreeClimber
And it works :-)
Hello,
I tried to follow the steps described in https://github.com/adamspierer/FreeClimber/blob/master/TUTORIAL.md
I am pretty sure I followed all the instructions, but when I try to run:
(python36) C:\Users\myUser\Desktop\free\FreeClimber>pythonw .\scripts\FreeClimber_gui.py --video_file .\example\w1118_m_2_1.avi
Is does absolutely nothing. I tried to redirect the output in a file, and I have this. I installed ffmpeg, added to the environment variables, but I am stuck. Do you have an idea?
Thanks a lot for your help and best regards!
Traceback (most recent call last): File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 276, in video_to_array out,err = (ffmpeg AttributeError: module 'ffmpeg' has no attribute 'input'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File ".\scripts\FreeClimber_gui.py", line 40, in OnInit frame = create(None, file_name) File ".\scripts\FreeClimber_gui.py", line 782, in create return main_gui(parent, file_path) File ".\scripts\FreeClimber_gui.py", line 125, in init self.load_video() File ".\scripts\FreeClimber_gui.py", line 192, in load_video variables = vars) File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 76, in init self.image_stack = self.video_to_array(video_file,loglevel='panic') File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 283, in video_to_array print('!! Could not read in video file to an array. Error message (if any):', err) UnboundLocalError: local variable 'err' referenced before assignment
########################################################################
FreeClimber v.0.4.0
Please cite: https://doi.org/10.1242/jeb.229377
Beginning program @ 2023-09-08 14:57:10
######################################################################## --> Video file: .\example\w1118_m_2_1.avi Loading: .\example\w1118_m_2_1.avi
!! Could not read .\example\w1118_m_2_1.avi into FreeClimber. Likely due to unacceptable video file or FFmpeg not installed !! Could not read in video file metadata OnInit returned false, exiting...