Dash cam is not quite a black box

Recently, I had two encounters with dash camera memory cards. Both were supposed to contain a video recorded immediately before a road accident. However, in both cases, there was none. I made extensive data recovery attempts on these, and I'm reasonably sure there was no video, neither in a normally accessible sense nor available for recovery. Thinking back, I recall these situations are quite common. I had many cases like this in recovery; quite in a few of these cases, the video was just not there, never recorded.

Dash camera, like most cameras, uses some form of buffering. The data is not being flushed to the card immediately as the camera captures it. MP4 format, most commonly used in dash cameras, stores several separate sets of data in each file, called atoms. Actual video frames are stored in one part of the file, and various reference tables are stored in another. This layout implies buffering if it is to work in real-time. Buffering is fine as long as there is time to flush buffered data to permanent storage (memory card in this case) before shutdown. It does not work if the shutdown is abrupt because the most recent data gets lost. Exactly how much is lost depends on the aggressiveness of the buffering. More aggressive buffering is more efficient, speed-wise, and allows less capable CPUs to still cope with the task. At the same time, more aggressive buffering means more data lost in an unexpected shutdown.

In a road accident, as far as a dash camera is concerned, things can go wrong in many different ways. The camera may lose power, or the card may get disconnected from the camera by the jolt. While the loss of power is typically mitigated by having a battery (even a small battery does the job), other failures still cause data loss. This is why a dash cam is not that reliable in case of an accident. Aircraft black boxes, for comparison, are specifically designed to continue working throughout the accident as it unfolds and retain the data after that. Dash cameras are typically not designed for that.

Filed under: File carving.

Created Friday, November 10, 2017