Journal
Personal
31 Jul 2021#iot#embedded#hw#python#firebase 1 min read

Live video from a Raspberry Pi over LTE

Let the camera's encoder do the video; the stream that stayed ran at a sixth of the first bitrate.

FromPetTrack: End-to-End IoT Tracking System

A pet tracker on a Raspberry Pi 4 with an LTE modem, a camera, an audio board and a UPS board. The app asks for video by setting a flag in Firebase; the Pi starts a stream and pushes it over RTMP to a cloud transcoder that serves HLS back to the phone.

Two choices shaped the stream. The camera's own H.264 encoder does the video, and ffmpeg only adds the microphone and copies the rest, instead of re-encoding in software on the Pi's CPU. And the last preset written, 640 by 360 at 700 kbps, runs at a sixth of the first one. On a cellular uplink, the stream that keeps playing beats the sharp one.