Lifetimes of battery-powered monitoring and surveillance systems are limited by the given battery capacity. This could lead either to a complete loss, or to a significant loss of quality in the recorded image of events. In addition, it is hard to transfer all the recorded images to base station due to the limitation of energy and wireless channel. Accordingly, the recorded images are stored in non-volatile memory for the purpose of object recognition in the future, such as black-box system. In this paper, we propose a lifetime maximization method for memory- and battery-constrained smart video surveillance system which exploits event characteristics. The power consumption of video encoding can be minimized with reduced computational complexity. In scalable video coding, the motion information obtained in the base layer can be exploited to adjust the search range of motion estimation in the enhancement layer, which leads to reduce the power consumption of video encoding. Given event statistics, the proposed method balances the resource of a wireless surveillance (camera) node (WSN) consisting of image sensor, event detector, video encoder, transceiver and memory. The lifetime of WSN is determined by the remaining resource, i.e., battery charge and memory space. In this work, we assume that the resource of WSN is refreshed at $\It{a system maintenance period}$ (SMP). The proposed method controls the bit-rate of encoded videos and recording condition (resolution and frame rate) to maximize the lifetime of WSN up to the SMP. Hierarchical event detection algorithms are utilized for trade-offs between energy consumption and detection accuracy. Based on operational framework of power-rate-distortion relationship analysis, we build $\It{an energy-rate-distortion optimization technique}$ which gives an energy-optimal operating point of the video encoder under the given battery and memory constraint. Experimental results show that the proposed method prolongs the lifetim...