This repository contains the code for an IoT Traffic Surveillance System using a fog-computing architecture. The system uses an adaptive video encoding algorithm that switches the video encoding at specific intervals to reduce the required network bandwidth.