1. First checks

  1. Leave "cameraName" out (or empty) once. The driver prints the list of available video devices of the machine and does not start capturing. Copy the exact name from the list.
  2. Then leave "format" out once, with cameraName set. The driver prints the pixel formats and options the camera offers (it opens the camera to do so).
  3. Check the start-up report. On success the driver prints FFMPegDriver: Stream '<name>' Init success followed by the platform (dshow on Windows, video4linux2 on Linux, avfoundation on macOS), resolution, pixel format, framerate and buffer size.
  4. Test the same camera settings outside the engine, for example on Windows ffplay -f dshow -video_size 640x480 -framerate 30 -vcodec mjpeg -i video="Camera name", on Linux v4l2-ctl --list-devices and ffmpeg -f v4l2 -input_format mjpeg -i /dev/video0 .... If it does not work there, it will not work in the engine.
  5. Check the block counters of the input block in DIPanel or System Layout.

2. Message reference

MessageCauseWhat to do
FFMPegDriver: Stream '<name>' Must specify Device name.
Printing avaliable devices:
(error)
cameraName is missing or empty. The driver lists the video devices instead of starting. This is the discovery mode.Copy the device name from the printed list into cameraName. See section 4.
FFMPegDriver: Stream '<name>' Must specify format.
Printing avaliable formats for device '<camera>':
(error)
format is missing or empty.Pick a pixel format (for example yuvj422p, yuyv422, mjpeg) from the printed list and set format. See section 5.
FFMPegDriver: Stream '<name>' Failed to init. (error)The camera could not be opened or started with the settings given. The driver gives no further detail in the report. Possible reasons, in order of likelihood: wrong name, camera busy, resolution / fps / format not supported by the camera, no video stream found, no decoder available for the stream.Work through section 3. Look at the console: FFmpeg prints its own text there.
Failed to open device: <ffmpeg error text> (console)Printed while listing formats: FFmpeg could not open the camera (name wrong, camera busy).Check the name and close other programs using the camera.
Failed to open camera <name> (console)Same, from the format listing.Same.
Input format <dshow|video4linux2|...> not found. / Error listing devices: ... (console)This FFmpeg build does not contain the capture back end (device library not built in).Use an FFmpeg build with avdevice and the DirectShow / V4L2 input (the bundled ffmpeg-win64-shared package has them).
FFMPegStream: stream '<name>', Bad LRU name '<lru>' not in database (error)The block name in streams.json refers to an LRU that does not exist.Block names are written LRU.block; use names that exist in the ICD / LRU database.
ExternalModelDeviceStream: stream '<name>', Bad block name '<block>' not in LRU '<lru>' (error)The block does not exist in that LRU. (The FFMpeg stream reuses this text; the prefix says ExternalModelDeviceStream.)Fix the block name.
Stream: '<name>': block '<block>': timing <N>us > system minor frame <M>us; data may be lost. (warning)An input block has a numeric framePerMS longer than the minor frame.See section 7.

3. "Failed to init": what to check

CauseHow to recognize itFix
Camera name wrongFFmpeg prints a "could not find video device" or similar line on the console.Use the exact name from the discovery list, including capitals and spaces. On Windows the driver prefixes video= itself; do not add it.
Camera busy (Teams, Zoom, browser, camera app, another engine instance)"Could not run graph" or an access error; the camera LED may be on.Close the other program. Only one program can normally open a USB camera on DirectShow.
Resolution not supportedWorks in the camera app, fails in the engine; the list of options shows other sizes.Use a size the camera lists (width, height). The driver passes it as video_size.
fps not supported at that resolution/formatMany cameras offer 30 fps at 640x480 but only 5-15 fps at full HD in raw formats.Lower fps, or choose a compressed format such as mjpeg which usually allows higher rates over USB.
Pixel format not supportedInit fails only with that format.See section 5.
USB bandwidthWorks with one camera, fails with two on the same hub; or raw formats fail but MJPEG works.Use separate USB controllers, a lower resolution, or MJPEG.
FFmpeg DLLs missingThe engine does not start, or reports a missing avcodec, avformat, avdevice, swscale, avutil DLL.Copy the FFmpeg shared DLLs (from ffmpeg-win64-shared) next to the executable. Use 64-bit DLLs for a 64-bit engine, and keep all DLLs from the same FFmpeg version.
Permission denied (Linux)"Permission denied" on /dev/video0.Add the user to the video group and log in again.

4. Camera names: DirectShow and V4L2

5. Format, resolution and fps

6. Frame size versus ICD block size

The input block that receives the video must be large enough for one decoded frame. The size of a frame is:

Pixel formatBytes per frame (width x height)
yuyv422 (packed 4:2:2)width x height x 2
yuvj422p / yuv422p (planar 4:2:2)width x height x 2
yuv420p / yuvj420p / nv12 (4:2:0)width x height x 1.5
rgb24 / bgr24width x height x 3
graywidth x height

7. framePerMS for input blocks and dropped frames

For an input block ("direction": "in") the rule is:

See the note on framePerMS. Important for this driver: reading a frame waits until the camera delivers one (the read is blocking). With -1 and a minor frame faster than the camera's frame rate, the engine thread waits for each frame and the whole stream can run at the camera's rate. If the rest of the simulation must keep its own rate, use a numeric framePerMS that matches the camera (for example 33 for 30 fps) so the read is the pacing element, and accept the warning, or run the video in its own stream.

Buffer size and dropped frames

8. Other problems

SymptomCauseFix
Init succeeds, block stays zero / old dataInput block has framePerMS: 0, or the frame size is unknown (the decoder has not delivered a frame yet) or the block is smaller than the frame.Use -1; check the block size (section 6); look at the console for FFmpeg errors.
Image looks green / pink / skewedThe consumer interprets the planes with a different pixel format or stride than the data (for example treating planar yuvj422p as packed RGB).Treat the block bytes exactly in the format printed in the init report; there is no stride padding (rows are packed).
Image is stretched or shearedWidth/height in the consumer differ from the real decoded size.Use the size the camera actually produces (init report and discovery list).
Simulation runs slower than expected after adding the cameraBlocking read waits for each frame.See section 7.
Frame rate lower than configuredCamera lowers the rate in low light (auto exposure), or the USB link cannot carry the format.Increase lighting or switch off auto exposure/low-light compensation in the camera settings; use MJPEG.
Camera works once, fails after an engine resetThe previous session still holds the camera or was not released.Stop and start the engine; check that no stale process remains in Task Manager.
Sending video out of the engineThe driver is input only: writing to an output block returns an error (not supported).Use a different driver for output.
Industrial camera (GigE Vision / USB3 Vision, global shutter, hardware trigger)DirectShow / V4L2 webcam path has no trigger and little control.Use the GenICam driver: Troubleshoot: GenICam Driver.
Message counters and error counters of every block are visible live in System Layout. Use the receive hooks to examine frames. The fields cameraName, format, fps, width, height and bufferSizeMB are described in the streams manual; for setup see How to Set Up Streams.