You configure two streams in a depth camera SDK's Python wrapper, the pipeline starts without an error, and the camera runs something else: the color stream comes up at 1920x1080 in Y16 instead of the 640x480 BGR8 you asked for, and depth runs at 60 fps instead of 30. Nothing crashes; your code simply receives frames in a shape it never expected. This guide is for engineers integrating 3D sensors and color area scan cameras into inspection software who hit exactly that. You will learn to read back the profile that pipeline.start() actually returns, prove field by field which part of your request never bound, apply the overload that fixes it, and gate every future start with a three-line check.
Why did the camera start a stream I never requested?
Because the short enable_stream overload never bound your values: the camera falls back to its default modes, which for this sensor generation means Depth 640x480 Z16 at 60 fps and Color 1920x1080 Y16 at 30 fps. The config object accepts every call, and pipeline.start(config) returns without an error, so nothing tells you the request was dropped.
The maintainers traced the defect to the wrapper's C++ layer and closed it in two rounds: the first round restored the binding of the short overload, and the second restored the format argument, which the first round had missed. Until your build carries both, the camera receives what amounts to an empty request and starts what it would start with no configuration at all.
The depth line is the trap. Width, height and format match your request, so a glance passes; only the fps, 60 against your 30, plus the entire color line betray the substitution. The 30 fps on the color line is coincidence, not binding, because the default mode also runs at 30. That asymmetry is why a five-minute demo can pass while the integration fails on the floor.
How do I check what the camera actually started?
Print the profile object that pipeline.start(config) returns and read the name, index, resolution, fps and format of each video_stream_profile from the printed line, before you touch a single frame. In the code below, pipeline, config and pipeline_profile are your variables, initialized as shown; rs.pipeline(), rs.config(), enable_stream(...) and get_streams() are the SDK calls, written the way the vendor's own example shows them.
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30)
pipeline_profile = pipeline.start(config)
print(pipeline_profile.get_streams())
Each printed profile carries five facts: stream name, index in parentheses, width x height, fps, format. The printout is the test; lay it against your request field by field:
| Stream | You requested | The camera started | Verdict |
|---|---|---|---|
| Depth | 640x480, Z16, 30 fps | Depth (0) 640x480 @ 60 fps Z16 | fps never bound |
| Color | 640x480, BGR8, 30 fps | Color (0) 1920x1080 @ 30 fps Y16 | width, height and format never bound |
If any cell disagrees, stop there. Everything downstream, from OpenCV conversion to your measurement code, now runs on values you can trust because you compared them, not because start() returned.
Which returned field proves the config was never applied?
The format field: a Color stream reporting Y16, which is 16-bit single-channel luma, when you asked for BGR8 means your three-channel request never left the config object, whatever the resolution line says. BGR8 carries three bytes per pixel of color; Y16 carries two bytes per pixel of grayscale. No code path that read your format request produces Y16 on a stream you declared color, so the format argument was lost.
The resolution tells the same story from the other end. 1920x1080 is the sensor's largest mode, and a silently failed request starts the default mode, which usually sits at the top of the sensor's list. A USB camera that only ever offers 1920x1080 is the same family of behavior, and why a USB camera only offers 1920x1080 resolution works through it. When those Y16 frames reach your processing, color code fed single-channel data produces nothing usable; camera stream stuck in Y16 grayscale: fix format negotiation covers the downstream symptoms.
What is the fix for a request that never binds?
Call the six-argument overload of enable_stream with an explicit stream index, passing -1 as the index, and it binds width, height, format and fps in one call. Swap each short call for the overload that carries the stream index as its second argument:
config = rs.config()
config.enable_stream(rs.stream.depth, -1, 640, 480, rs.format.z16, 30)
config.enable_stream(rs.stream.color, -1, 640, 480, rs.format.bgr8, 30)
pipeline_profile = pipeline.start(config)
print(pipeline_profile.get_streams())
Read the printout again. A bound start reads Depth (0) 640x480 @ 30 fps Z16 and Color (0) 640x480 @ 30 fps BGR8, every field yours. Update the SDK as well if you can: the two wrapper fixes that closed the defect also restore the short overload on current builds. Keep the six-argument form anyway, because it states every field explicitly on old and new builds alike, and it is the maintainers' own workaround from when the defect was open.
How much does the wrong profile cost in bandwidth?
About 3.5 times what you asked for: 161 MB/s instead of 46 MB/s in this failure, because the unbound color stream alone carries 124.4 MB/s where your BGR8 request needed 27.6 MB/s. The formats fix the byte counts: Z16 and Y16 are 16-bit, two bytes per pixel, and BGR8 is three bytes per pixel.
Requested color stream:
- 640 x 480 = 307,200 pixels
- 307,200 x 3 bytes = 921,600 bytes, about 0.92 MB per frame
- 0.92 MB x 30 fps = 27.6 MB/s
Color stream the camera actually started:
- 1920 x 1080 = 2,073,600 pixels
- 2,073,600 x 2 bytes = 4,147,200 bytes, about 4.15 MB per frame
- 4.15 MB x 30 fps = 124.4 MB/s, which is 124.4 / 27.6 = 4.5 times your request on this stream alone
Depth stream:
- Requested: 640 x 480 x 2 bytes = 614,400 bytes, about 0.61 MB, at 30 fps = 18.4 MB/s
- Started: the same 0.61 MB frame at 60 fps = 36.9 MB/s
Totals: 27.6 + 18.4 = 46.0 MB/s requested against 124.4 + 36.9 = 161.3 MB/s started, a factor of 161.3 / 46.0 = 3.5. A link and host budgeted for 46 MB/s now carries 161 MB/s, and links do not fail politely: you see late color frames, growing queues or stale frames rather than an error with a code. On a small controller the effect doubles, because every extra 2.07-million-pixel Y16 frame also costs CPU to copy and convert; 3D depth camera on an ARM SBC: USB3 bandwidth and CPU budget quantifies that budget.
What should I assert before the first capture?
Assert all five fields of every returned stream (name, index, width and height, format, fps) at every pipeline start, because a silent default can come back after any SDK update, cable re-plug or sensor swap. The check is one pass over the printed profiles:
- Name: Depth and Color, exactly the streams you enabled.
- Index: (0), unless you deliberately address a second sensor.
- Width and height: an exact match, so 640x480 means 640x480, not 1920x1080.
- Format: Z16 on depth and BGR8 on color; Y16 on a color stream fails the check.
- fps: 30 means 30, and 60 where you asked for 30 is a failure, not a bonus.
Put the check directly after pipeline.start(config) so the process stops before it touches a frame, and keep it in your startup test suite. One honest exception survives the fix: if fps still disagrees after the six-argument call, the sensor's mode table may lack that combination, so request a rate it actually lists; color stream fps lower than configured on a depth camera works through that case.
Exposure, gain and laser power are not part of the profile: they are sensor controls applied after the start call returns, with their own failure modes, and 3D camera 2D stream settings: exposure, iris and gain defaults covers where those live. Once frames flow, also confirm what your processing code received, because a format can be right at the camera and wrong after conversion; converted image object pixel format shows that check.
Is a rejected profile a different problem than an ignored one?
Yes: a start that fails with no matched video stream profile is the SDK refusing a mode the link cannot carry, while this failure returns success with different numbers, and the two need opposite fixes. Read your start outcome as one of three cases:
- An error at start naming the profile: the mode is not available end to end, so pick one the sensor and link both list. The depth-camera version of that hunt is 3D camera no matched video stream profile: set a listed depth mode.
- Success with different numbers: the silent substitution this article covers, fixed by the six-argument overload and caught by the readback gate.
- A stream absent from the returned list: usually the order in which streams were enabled, and depth camera color stream missing: the enable-order fix straightens it out.
A fourth neighbor is worth knowing: settings that save to file but never apply when the camera opens, which smells identical from the outside. Camera settings saved but not applied at open: fix the locale traces that one to a different layer entirely.
Which cameras does this check apply to?
Every one of them: the check is three lines and independent of vendor, so make it standard on 3D sensors, color area scan cameras and board-level cameras alike. Any camera whose SDK hands you a profile at start can substitute a default for your request; the wrapper bug here is one instance, not the only route. Firmware updates, thin sensor mode tables and OEM modules all produce the same silent substitution.
For a new cell, the depth side comes from 3D sensors:
- Type
- Stereo / structured light
- Type
- Stereo / structured light
The MV-DPS200P-02 projects structured light across the whole field, and the MV-DLS300P-04 is a laser galvanometer stereo camera; both expose their streaming modes to the host SDK, so the profile readback applies unchanged.
The color side belongs to area scan cameras:
- Sensor format
- 1/1.7"
- Lens mount
- C-mount
- Sensor format
- 1/1.7"
- Interface
- USB3
A 2.5 MP GigE camera with a global shutter like the MV-CU020-90GC, or a 12 MP USB3 model like the LS-CMR-0166 at 30 fps, hands you BGR8 frames under your control once the profile binds. Board-level cameras deserve the same gate, because their sensors expose fewer modes and a silent default is even easier to miss.
Next step: filter the camera finder for the sensor and interface you need, or begin with the camera step of the system configurator. If a stream on your bench still starts wrong after the six-argument call, bring the printed profile to us through the contact page and we will read it with you. More capture and streaming failures are grouped under the systems topic.
Questions
Does passing -1 as the stream index cause problems later?
No. The -1 occupies the stream-index argument of the six-argument overload, and the wrapper fills in the index while width, height, format and fps travel explicitly in the same call. The short overload drops fields only on the defective builds, so keep the explicit form on every build and assert the returned profile anyway; it costs one print statement.
Why did depth come back at 60 fps when I asked for 30?
Same root cause, different field: the ignored request lets the depth sensor default to its 60 fps mode even though 640x480 Z16 happened to match. After the six-argument overload binds, a depth stream that still starts at a rate you did not request means the sensor's mode table lacks that combination; request a listed fps for that format instead of one it never offers.
Is Y16 ever the right format for a color stream?
No. Y16 is 16-bit single-channel luma (grayscale), while BGR8 is three-byte color, so a Color stream reporting Y16 means the color request never bound and you will receive 16-bit grayscale frames with no color channels. Request the format in the six-argument call and confirm the returned line prints BGR8 before any color processing runs.
How do I make this failure impossible to miss in production?
Turn the readback into a hard gate: right after pipeline.start(config), walk pipeline_profile.get_streams() and fail the process unless every stream's printed resolution, format and fps match the request exactly. Add it to your startup tests so a wrapper or firmware update that reintroduces a silent default stops the line at bring-up instead of feeding wrong-sized frames to your algorithms.
Do exposure and gain live in the stream profile too?
No. The profile carries the transport shape (resolution, format, fps and stream index), while exposure, gain and similar controls are sensor settings applied after the start call returns. If the returned profile matches your request but images stay dark or blown out, debug the control path, not the stream configuration; knowing the power-up default of each camera saves the first hour of that hunt.



