Building a Blockchain Bodycam Proof of Concept for $25

Stories of faked or manipulated bodycam footage show a pressing need for law enforcement to use bodycams with footage secured by blockchain IoT to prevent any tampering.

Jordan Mack
Illustration: © IoT For All

Police bodycams are an essential piece of equipment for modern law enforcement. But there’s a problem: videos can be faked. Blockchain technology can aid in the battle against malicious video forgery.

An AXON police body camera. (DAVID MCNEW/GETTY IMAGES)

The evidence on a bodycam is often a critical differentiator in the justice process. It can be the difference between whether someone spends the rest of their life in jail or leaves the courtroom unscathed. Lives are on the line. The authenticity of bodycam videos must be protected to the highest possible degree.

The importance of the videos is unquestionable, but is the threat of video alteration real? Very.

Researchers have found that bodycam videos are vulnerable to undetectable alteration, and malware has been found on shipped bodycams. Police departments have also been caught editing bodycam videos to skew the narrative in their favor.

This isn’t remote speculation, it’s already a serious problem.

Most people have at least heard about Bitcoin by now, but blockchain technology can take many forms. A blockchain can be used to ensure that data isn’t changed or deleted. This is the usage we can apply specifically to police bodycams.

Bodycams can cost up to $2,000 per camera, placing a hefty burden on police forces that are already cash strapped. Is it possible to run a blockchain on a low-cost low-power camera device?

Here’s the equipment we will be working with. Our total cost: < $25

The components for our test.

This isn’t going to produce a field ready piece of equipment, but that isn’t the purpose. We just need to prove it’s possible.

Using some hot glue, tape, a few extra wires, and some minor soldering, we have a functional device that just barely crams into our project box.

Our (poorly) assembled components in a project box.

Now we install our software:

After a few hours of installing and configuring, we’re ready for our first video test at a 720p resolution with 30 fps.

Screenshot of our first FFMPEG test.

Uh oh, FFMPEG is maxing out the CPU! 😲 We need to get that way down or this is a complete failure.

Our power is looking good though. Maxing out at around 0.3A we should be able to get a fair amount of time out of our 3200mAH battery.

Power utilization at full load.

Next, I tried 480p at 10fps… Still maxing out the CPU, and we’re not even running the blockchain yet. 😢

Then I remembered something. Doesn’t the Raspberry Pi have hardware x264? After some quick googling: Yes, and it works with FFMPEG! 😃

Now to put it to the test.

Screenshot of our successful FFMPEG test.

Running 720p at 30fps consumes only 5% of the CPU, so we have plenty of room to spare! 🙌

The next step is to get RigidBit running. Compiling is painfully slow, so it was left to run overnight. At 4:25 am the compile finished, and (to my surprise) didn’t require any modification. Thank you, Rust!

Screenshot of RigidBit running on our Raspberry Pi.

Now for the final test. Can our $10 Raspberry Pi handle the task of capturing video and storing it in a blockchain?

Screenshot of RigidBit and FFMPEG running together.

RigidBit hovers around 10% and FFMPEG at around 5%. Success! 🍾

It’s not pretty, but for $25 we have functional video capture being secured with a blockchain on the device itself.

Photo of our fully operational blockchain bodycam proof of concept.

This proof of concept isn’t even close to being ready for field deployment. It may be good enough for a home security camera, but anyone who suggests duct-taping this to a police officer should be fired immediately.

There’s plenty of room for improvement.

RigidBit requires an internet connection to sync with Ethereum. Since cell phones are widely available, this isn’t a complete deal-breaker, but it’s not ideal. If we incorporate trusted hardware, we may be able to achieve an acceptable level of provability while only needing to sync with Ethereum at the beginning and end of a shift.

RigidBit is already lightweight, but it can be stripped down much further. Most of the features it has aren’t being used. We might be able to strip it down enough to run on an MCU instead of a Raspberry Pi.

Raspberry Pis are great, but we might be able to get the cost and power utilization even lower by using an SoC like an RTL8170 or an ESP32.

An RTL8170 (left) and an ESP32 (right).

By combining all of the above, we could cut the device costs, reduce power usage, reduce the physical footprint and eliminate the need for a full OS.

Besides bodycams, there are plenty of other potential applications:

  • Security cameras.
  • Vehicle dash cameras.
  • Vehicle black boxes.

Any place where data integrity is important, blockchain can serve an important role in providing absolute provability in a completely open and transparent way.

Jordan Mack
Jordan Mack
Blockchain developer. Founder of RigidBit. Cryptocurrency since 2011. ♥ Rust. Health nut. Libertarian. Lifelong learner.
Blockchain developer. Founder of RigidBit. Cryptocurrency since 2011. ♥ Rust. Health nut. Libertarian. Lifelong learner.