v1

latestOpenAPI 3.1.0raw.githubusercontent.com2026-02-1354131442.5 KB
v1
camera

Get Supported Resolutions

Get supported camera resolutions and video formats using v4l2 detection.

This endpoint provides comprehensive camera capability information including resolution enumeration for all supported image sizes, framerate details with available rates for each resolution, format capabilities for supported video formats like MJPEG and YUYV, and optimization recommendations for best format selection.

Detection Methods

When camera is currently streaming, the system provides active camera query with real-time capability information from the active device. When no camera is actively streaming, the system performs v4l2 static detection with complete capability scan using the v4l2 interface.

Format Categories

The system supports MJPEG compressed formats for efficient streaming applications and YUYV uncompressed formats for processing applications requiring raw video data.

Integration Recommendations

Check supported resolutions before starting streams for pre-streaming validation, adjust resolution based on network conditions for dynamic adaptation, and cache resolution data to avoid repeated queries for capability caching optimization.

get/api/v1/camera/supported-resolutions

Response

Supported resolutions retrieved successfully

devicestring required

Camera device path

sourcestring required

Source of resolution data (active_camera or v4l2_detection)

device_namestring nullable

Camera device name

Example response

{
  "best_format": {
    "format": "MJPG",
    "fps": 30,
    "height": 720,
    "width": 1280
  },
  "device": "/dev/video0",
  "device_name": "USB Camera",
  "source": "v4l2_detection",
  "supported_formats": [],
  "supported_resolutions": [
    {
      "framerates": [
        30
      ],
      "height": 720,
      "width": 1280
    }
  ]
}