A Wearable Project Based on Raspberry Pi Zero Camera

Continuing from the previous article.

During this period, I optimized the system, removed some programs that occupied too much memory, and also tested the soft encoding and hard encoding of x264, and delved into the conversion from h264 to MP4, and received the shell.

A Wearable Project Based on Raspberry Pi Zero Camera

Two shells were printed, one deeper.

A Wearable Project Based on Raspberry Pi Zero Camera

Camera side view.

Based on Raspberry Pi Zero, tested soft encoding h264 and hard encoding openmx. Using baseline, the soft encoding libx264 library takes about 60-80ms. The hard encoding is implemented using the raspvid command, with baseline reaching 30 fps.

A Wearable Project Based on Raspberry Pi Zero Camera

Each minute saves a file, recording continuously for an hour is not a problem. In the videos I recorded, when the image is still, each file is about 2-5M, and when there is movement or dynamic scenes, each file is 6-10M.

In actual use, it should be in motion, and one hour is estimated to occupy between 350-600M of storage space.

Moreover, this video was recorded at 20fps, and the final conversion from h264 to MP4 (converted at 30fps) actually became 48s.

Recording at night, the smoothness can basically be satisfied.

A Wearable Project Based on Raspberry Pi Zero Camera

The battery I bought, 1600mA, is predicted to record for 3 hours.

The Zero has only 512M of memory. During use, when transferring files over the network, if the download speed exceeds 3MB, it will freeze.

The recording part has not been done yet because I changed the plan. The microphone uses sph0645 connected to the CPU via I2S, due to its more compact size.

A Wearable Project Based on Raspberry Pi Zero Camera

A Wearable Project Based on Raspberry Pi Zero Camera

Raspberry Pi Zero also supports I2S connection with sph, overall this plan is feasible.

Recently, I searched for video recorders on Taobao, and I was shocked to find that I could buy one for over 30 yuan, while this DIY alone costs 90 yuan for the Zero.

Just a simple record, only for reference for those interested in DIY. If you want to wear it, it still needs to be polished carefully.

Leave a Comment

×