It could be a function of several things.
I have a few videos from another postdoc, which use I think the default H.264 codec and less than half the bitrate with fairly low illumination. DLC struggles on these videos because they are so dark and grainy.
My lab didn’t like the DVR system anyway because the videos were so dark and grainy, so I embarked on a process of figuring out how we could improve the video quality, adding two different cameras and some sources of illumination as well as tweaking the settings on the devices.
(The Wyze cameras are OK for monitoring, but not so great for DLC due to blurring during fast motion.)
(The raspberry pi camera is great, but it’s difficult to set up and would be expensive to put in 12 boxes.)
Over about a week on the DVR, I :
(1) added diffuse IR illumination
(2) tweaked some image processing options
(3) boosted the bitrate substantially
(4) switched to the H.265+ codec
(5) modified the cam perspective to remove an annoying obfuscating object
I believe that it started doing this without the “plus” codec, but I am not sure. This means the behavior of the codec they use in general might depend on things like bitrate and dynamic range (overall illumination) also.
The information and control over which specific codec is being used isn’t very specific as far as I can tell, but perhaps I don’t know how to spot the difference in the metadata between the codec versions.
This DVR seems to be designed with a large amount of flexibility, and it also seems to be intended for use with a large number of cameras, as it supports IP and analog cameras simultaneously. The interface allows for selection of FPS, and this one is currently set to “camera max” or something similar to that, which it seems to interpret as “50 fps”. I am not certain how to check if it really is 50 FPS or not, but it does take what appear to be substantially clearer looking frames compared to the Wyze Cam @ 10 or 15 FPS, which does not take clear frames when the animal moves rapidly.
The cameras are some sort of thimble sized Foxeer brand model, but I can’t figure out exactly which one they are to learn more about its specs.
In any event, I tried feeding DLC these weird looking frames to see what it would do, as it almost looks like the compression algorithm sort of preselects a set of features for the network to learn while removing background noise. DLC did a fairly decent job of detecting the animal and pose without a lot of special effort on my end. (I basically ignored the very low contrast delta frames, but labeled most relatively good looking ghost rat frames.)
The only weird thing it did was something I have seen reported elsewhere on the forum. During analysis and video generation, it seems to have only processed a little over 50% of the frames. This still makes an OK looking data set and useable telemetry data series, but it is a little weird.
I have not yet tried this with the raspberry pi camera, which was often recording at 80 or 110 fps next to this camera because the files are huge, even with the h264 compression that the pi defaults to. (This is like 3+ GB for 30 minutes on the pi vs around 80 MB on the DVR.) The other potential problem is that the pi is heavily saturated by the indicator LEDs on the headstage of the wired rats, and DLC seems to sometimes find this a bit confusing, because there are other lights and panels in the chamber that come on during the behavior. Finally, I run the Pi FPS so high to keep the frames clear and not blurred during any fast motion, but I don’t expect that I would actually need that level of temporal granularity. However, I have not found a way to perform the equivalent of a downsample function on the video in DLC. (My concern here is that sometimes the rat is on for an hour, which is a lot of frames @ 80 or 110.)
I wanted to try the DVR videos first because it would be easier to distribute to my lab as a solution, but maybe I’ll just have to mess around with this some more.
I should also try grabbing frames in Matlab and see what it does with the DVR file. (It might refuse entirely.)
Correction : The video looks really weird in VLC and appears to effectively run at 25 FPS.