fixed webcam protocol encoding