Streaming to SmartDashboard 2019



Hi, my team is having an issue streaming a video feed from a USB camera to the RoboRio SmartDashboard. We are currently using the JeVois camera, and we have gotten it to stream during the 2018 season, but after updating to the 2019 firmware, we cannot get a stream. We programmed our robot in Java and we are attempting to open the stream by calling:

UsbCamera cam = CameraServer.getInstance().startAutomaticCapture();
cam.setResolution(352, 288);

but when we run the robot, this warning keeps appearing:

CS: WARNING: USB Camera 0: invalid JPEG image received from camera (UsbCameraImpl.cpp:419)

Is this something to do with updates to the 2019 Wpilib? Thanks.


You will need to ensure the pixel format you are trying to read from the camera matches what the JeVois is feeding to the roboRIO. I believe CameraServer will default to MJPEG.