Skip to content

Commit 8ecd356

Browse files
authored
fix(api): Ensure the backend uses the ot_system_camera (#20068)
1 parent 370b7d9 commit 8ecd356

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

api/src/opentrons/system/camera.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
log = logging.getLogger(__name__)
2222

2323
# Default System Cameras
24-
FLEX_EMBEDDED_CAMERA = "/dev/video2"
25-
OT2_CAMERA = "/dev/video0"
24+
DEFAULT_SYSTEM_CAMERA = "/dev/ot_system_camera"
2625

2726
# Stream Globals
2827
DEFAULT_CONF_FILE = (
@@ -278,9 +277,7 @@ async def image_capture(
278277
robot_type: RobotType, parameters: ImageParameters
279278
) -> bytes | CameraError:
280279
"""Process an Image Capture request with a Camera utilizing a given set of parameters."""
281-
camera = (
282-
FLEX_EMBEDDED_CAMERA if ARCHITECTURE == SystemArchitecture.YOCTO else OT2_CAMERA
283-
)
280+
camera = DEFAULT_SYSTEM_CAMERA
284281

285282
# We must always validate the camera exists
286283
if not os.path.exists(camera):

api/src/opentrons/system/ffmpeg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ async def ffmpeg_capture_image_bytes(
4545
"auto",
4646
"-video_size",
4747
f"{resolution[0]}x{resolution[1]}",
48+
"-f",
49+
"v4l2",
4850
"-i",
4951
f"{camera}",
5052
"-vf",
@@ -66,6 +68,8 @@ async def ffmpeg_capture_image_bytes(
6668
"auto",
6769
"-video_size",
6870
f"{resolution[0]}x{resolution[1]}",
71+
"-f",
72+
"v4l2",
6973
"-i",
7074
f"{camera}",
7175
"-vf",

0 commit comments

Comments
 (0)