1. A method, comprising: receiving, at an analytics module implemented in at least one of a memory or a processing device, a video frame having a plurality of pixels; assigning, at the analytics module and without user intervention, based on a type of a foreground object from the video frame having the plurality of pixels, a class from a plurality of predetermined classes to the foreground object; adjusting a quantization parameter value associated with the foreground object based on a weight associated with the class assigned to the foreground object, a size of the foreground object, and a target bit rate associated with the video frame, the weight being based on a coding priority associated with the class assigned to the foreground object; producing a plurality of DCT coefficients for pixels from the plurality of pixels of the video frame associated with the foreground object; quantizing, at a quantization module, the DCT coefficients associated with the foreground object based on the adjusted quantization parameter value; coding the quantized DCT coefficients associated with the foreground object to produce coded quantized DCT coefficients; and sending, to a storage module, a representation of the coded quantized DCT coefficients.