In this paper, we have proposed an ontology-based context-aware framework for providing intelligent services such as smart surveillance, which employ IoT technologies to ensure better quality of life in a smart city. An IoT network such as a smart surveillance system combines the working of Closed-circuit television (CCTV) cameras and various sensors to perform real-time computation for identifying threats and critical situations with the help of valuable context information. This information is perceptual in nature and needs to be converted into higher-level abstractions that can further be used for reasoning to recognize situations. Semantic abstractions for perceptual inputs are possible with the use of a multimedia ontology encoded using Multimedia Web Ontology Language (MOWL) that helps to define concepts, properties and structure of a possible environment. MOWL also allows for a dynamic modeling of real-time situations by employing Dynamic Bayesian networks (DBN), which suits the requirements of a intelligent IoT system. In this paper, we show the application of this framework in a smart surveillance system. Surveillance is enhanced by not only helping to analyze past events, but by predicting dangerous situations for which preventive actions can be taken. In our proposed approach, continuous video stream of data captured by CCTV cameras can be processed on the fly to give real-time alerts to concerned authorities. These alerts can be disseminated using e-mail, text messaging, on-screen alerts and alarms. © 2018 Association for Computing Machinery.