Video surveillance systems are of a great value for public safety. They are used as an effective tool for crime prevention and as an after the fact forensic tool. Many automatic methods have been proposed for video analytics such as anomaly detection and human activity recognition. Such methods have significant challenges due to object occlusions, shadows, various scales, and changes in viewpoints and illumination conditions. In addition, mobile or networked environments have limited bandwidths and adaptive data-rate streaming is frequently used. Video compression can introduce significant quality degradation that impacts the accuracy of video analytics. In this thesis, we propose a two-stage quality-adaptive convolutional neural network ...