In this paper, we propose a lifetime maximization method for battery- and flash-constrained blackbox surveillance node (BSN) consisting of image sensor, event detector, video encoder, flash memory and battery. Because it is not economically feasible to transfer all the recorded images to the base station due to the limited energy in BSN, the recorded images are stored in flash memory for offline event recognition. In BSN, balancing the usage of battery and flash memory is critical to prolong the lifetime, because the shortage of either battery charge or flash capacity could lead to a complete loss of events, or a significant loss of quality in the recorded image of events. The lifetime of BSN is determined by the remaining battery charge and flash memory space. In this work, we assume that the resources of BSN, i.e., battery and flash memory are refreshed every system maintenance period (SMP). The proposed method controls the bit-rate of encoded videos and sampling rate, i.e., resolution and frame rate, to prolong the BSN lifetime till the SMP. Experimental results show that the proposed method prolongs the BSN lifetime by up to 136.36% compared with an existing bit-rate allocation method which does not consider the resource usage balancing.