Video analytics for security systems