Open raewanyk opened 2 years ago
Hello @raewanyk! Thanks for trying out SimBA. This error could happen, if the video file that SimBA is trying to open, is corrupted/not an actual video file. The '0' refers to frame number 0, the first frame, which SimBA is trying to open through the OpenCV package.
If you navigate to the project_folder/videos
directory, do you see a video file in there in avi or mp4 format that is of expected size? E.g., if it is 1kb large, thats usually a good sign that something odd is going on with that video.
Hi! Thanks for the quick response. There are mp4 videos in the project/video folder:
Does it have something to do with the MPEG-4 file??
Got it, no it should't be any issues with your videos what I can see, do you have a screengrab of your files inside the project_folder/csv/input_csv
as well?
Got it. So, for whatever reason. Your video data files are named slightly differently than your video files, SimBA should have corrected this at import. Your video, for example, is called 1014DLC.mp4
, while the imported file is called 1014.csv
. When you click on 1014DLC, there is a mismatch, and SimBA is most likely searching for 1014.mp4
and it breaks, because it doesn't exist.
That said, I would also avoid pure integer filenames if you can, as there may be some bugs loitering around from early days and I'm trying to find time and fix. E.g., Importing a video called Video_1014
is much better than imprting a video called 1014
.
So then I should just rename the csv files to match the mp4? Noted on the renaming files--thank you.
Yeah that should work - check if that fixes it.
Sadly, it did not. I still get the same opencv error and filenotfound
Ah, thanks for letting me know. Can you try if it is an integer error, nd rename your videos e.g., "Video_1014" and the csv files the same way "Video_1014"
No, didn't work :/
Hmm, thanks let me see if I can replicate
One more question, which version of simba are you running?
I'm not sure, but I downloaded it maybe a week ago on my Mac. This text runs when simba is opening:
you can find out by typing pip show simba-uw-tf-dev
in your july-12 environment
Uhhh??? It says Package not found
that makes more sense now, you might be running an older version that has not been maintained for some years and thats why you are seeing the errors youre seeing.
try pip unininstall simba-uw-tf
and pip uninstall simba-uw-no-tf
, followed by pip install simba-uw-tf-dev
, then simba
and see if everything looks ok with the pixels per millimeter calculations.
Hello! Sorry for such a late response--I didn't have access to this computer over the weekend. I tried those commands in the environment I was working in, and just to be safe, I tried them again in a new environment. Both times, I get this error:
However, since I'm using a mac, I followed the extra instructions to download on a mac, but with pip install simba-uw-tf-dev. If I simply install the dev version by itself and then try to run it, I get the Mac OS X backend error, even though I'm using the correct tkinter and python version as mentioned on the FAQ.
Sorry for so many questions--I really appreciate your help.
No worries about questions :) This error has been coming up a fair bit lately for mac users, and I have not been able to replicate it myself (I'm on a Mac too). There was someone who solved it here last week: https://github.com/sgoldenlab/simba/issues/196 - would you mind trying their solution at the end of that thread?
Yes-- thank you so much for all of your help!
Hello! I've been trying to teach myself deeplabcut and SimBA, and would just like to start by saying I think SimBA is a great idea and really well executed! The GUI and documentation are easy to follow. I've successfully created and loaded a new project, but when I try to edit the video parameters to calculate the pixels/mm, I get an error. I know a screen with the video playing is suppose to pop up, but instead, my terminal says: OpenCV: Couldn't read video stream from file "/Users/lsbmorrisonlab/Documents/Simba/test/test4/project_folder/videos/0" as soon as I click the 'set video parameters' button. (I'm using Mac OS v 12.2.1). Then, when I try to change click the Video1 button under Getcoord, it says this:
I think it can't change directories for some reason, but I double-checked all of my files, video paths, directories, etc and it all seems to be working. One thing I did notice was that the OpenCV error appended an extra '0' at the end of the path, which leads to nothing. Any help would be great!
Thanks!!!