In many video surveillance applications, only a very small proportion of the information provided by the cameras is really useful. To reduce the video data stream transmitted, one solution is to pre-analyze the video at the sensor, compress and send out only the valuable information that will be analyzed more precisely at the control station. In this paper, we propose a video pre-analyzing and coding system in the context of video surveillance applications aiming to simplify as possible as we can the captured data without altering the interesting information for traffic analysis. The originality of the method described here lies in the gain in term of video H.264/AVC compression by reducing the prediction error values during the motion estimation step.