Hi everyone, new user here. I get an error when trying to classify avi video files, but no problems with mp4 files. How can I fix the issue?
update. I installed addaxai on another computer and the avi videos classified normally. Not sure what the issue was, probably some missing program or plugin in the first machine
Hi @rbcer15 ,
I’m not sure what is going on exactly. If you wish to delve into this and go bug hunting together, please run AddaxAI in debug mode on the faulty machine, and send the logs to me (can go to peter@addaxdatascience.com). Or if just using machine two is good enough for you, that is also fine by me ![]()
It’s up to you!
Cheers,
Peter
I was having the same problem. The error it give me was “Video detection failed with exit code 3221225477"
I eventually just converted the video files to mp4 and it worked, but its adds a new step and it looses the exif data which is not ideal.
It would be great to know how to solve this.
Hi @Bernardo,
Which version of AddaxAI are you running? Could you try to run a bunch of AVI files again, and then share the diagnostics report with me? You can send it to: peter@addaxdatascience.com.
That will show me what’s going on and help me to fix the issue.
Thanks!
Peter
Hi Peter, I’m using 7.0.2. The Log it’s in your mail. Thanks!
Found it. The cause is a bug in the video reading library that AddaxAI (and many other tools) use. Some cameras, like Bushnell, save the first frame of each video in a different format than the rest, and the library crashes on the switch. That’s the “exit code 3221225477” you saw.
The fix is done and will be in the next release v7.0.10. AddaxAI then handles these videos automatically, so you can analyse the original files directly. No conversion, no lost dates. Your videos probably have no date inside the file at all, so when you analyse the originals, tick the checkbox to use file timestamps when AddaxAI offers it.
I also reported the bug upstream: VideoCapture FFMPEG backend: crash (Windows/Linux) or silent frame corruption (macOS) when pixel format changes mid-stream · Issue #29699 · opencv/opencv · GitHub
Hi Peter and Bernardo, thanks for bringing this up and resolving the issue! I later found out that my problem was restricted to the AVI files of only one camera model I use (chinese PR900). When I installed the software on another computer I also changed the dataset to another camera model so that´s why the problem did not re appear.
There is a remaining issue however. When AddaxAI encounters a bad jpeg file it records the problem to the error log and continues with the next file in the queue. However when AddaxAI encounters a bad video file (zero file size, or unreadable frames) it writes to the error log and interrupts all processing. Is there a fix that can make it continue processing with the next readable video files? Thanks Peter for all your work and help!, Roberto
Hi @rbcer15,
Thanks for testing further, and for narrowing it down to the PR900. That helps a lot.
You were right that something stopped the whole run, but the cause turned out a bit different than expected. I have looked into it this week. A video that cannot be read (zero bytes, or frames that will not decode) is already skipped one by one, the same as a bad jpeg does. What went wrong sat one level higher: when one folder in the queue failed, AddaxAI marked every folder after it as failed too, without even trying them. So one bad folder could take the rest of your run with it.
That is fixed now. From the next version a folder that fails is reported on its own and the run simply continues with the next one. At the end you see something like “processed 9 of 10 deployments, 1 failed”, with the reason for the one that failed.
Could you try again with version 7.0.12? It should be out later today, otherwise Monday.
Also good to know: the crash on the PR900 AVI files itself was already fixed in 7.0.10, which came out just after you wrote. So there is a fair chance that one is gone for you as well.
Thanks again for the careful testing. This kind of report is really useful.
Cheers,
Peter
Small addition for anyone finding this thread later: the crash above (exit code 3221225477) is fixed since 7.0.10. If your photos work but your videos fail, and your folder sits on a mapped network drive (U:, Z:, etc.), that is a different problem, fixed in 7.2.1.
Hi Peter, thanks for keeping AddaxAI up to date with the latest fixes! I´ll try your new version with some of my older files from various camera trap models and let you know how it goes. Best, Roberto