espressif/esp_video

0.1.0

uploaded 2 weeks ago
A framework designed to support Linux V4L2, multiple cameras and video streaming.

readme

# Espressif Video Component

Espressif video component provides a solution to call POSIX API plus Linux V4L2 commands to capture data streams from multi camera sensors, and transform stream data pixel format according to Linux V4L2 M2M codec device.

[![Component Registry](https://components.espressif.com/components/espressif/esp_video/badge.svg)](https://components.espressif.com/components/espressif/esp_video)

Now we have implementations based on:

- esp_cam_sensor

changelog

## 0.1.0

- Inititial version for esp_video component

### Enhancements

- MIPI CSI video device
- Virtual file system to control video device
- Linux V4L2 commands mainly includes(actually not support commands' full features):

```
    VIDIOC_QUERYCAP

    VIDIOC_STREAMON
    VIDIOC_STREAMOFF

    VIDIOC_ENUM_FMT
    VIDIOC_G_FMT
    VIDIOC_S_FMT

    VIDIOC_REQBUFS
    VIDIOC_QUERYBUF
    VIDIOC_QBUF
    VIDIOC_DQBUF

    VIDIOC_G_EXT_CTRLS
    VIDIOC_S_EXT_CTRLS
    VIDIOC_QUERY_EXT_CTRL
```

readme of capture_stream example

                                        
                                        # Capture Stream Example

This example demonstrates the following:

- How to initialize esp_video with specific parameters
- How to open video device and capture data stream from this device

## How to use example

### Hardware Required

* A ESP32-P4 development board with MIPI-CSI interface
* A SC2336 camera sensor
* A USB Type-C cable for power supply and programming

### Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

```
idf.py -p PORT flash monitor
```

(To exit the serial monitor, type ``Ctrl-]``.)

See the [ESP-IDF Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.

## Example Output

Running this example, you will see the following log output on the serial monitor:

```
...
I (1075) main_task: Calling app_main()
I (1085) gpio: GPIO[31]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
I (1095) gpio: GPIO[34]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
I (1105) sc2336: Detected Camera sensor PID=0xcb3a with index 0
I (1175) example: version: 0.1.0
I (1175) example: driver:  MIPI-CSI
I (1175) example: card:    MIPI-CSI
I (1175) example: bus:     esp32p4:MIPI-CSI
I (1185) example: capabilities:
I (1185) example:       VIDEO_CAPTURE
I (1195) example:       READWRITE
I (1195) example:       STREAMING
I (1195) example: device capabilities:
I (1205) example:       VIDEO_CAPTURE
I (1205) example:       READWRITE
I (1215) example:       STREAMING
I (1215) example: Capture RAW8 BGGR format frames for 3 seconds:
I (4235) example:       width:  1280
I (4235) example:       height: 720
I (4235) example:       size:   921600
I (4245) example:       FPS:    30
I (4245) example: Capture RGB 5-6-5 format frames for 3 seconds:
I (7265) example:       width:  1280
I (7265) example:       height: 720
I (7265) example:       size:   1843200
I (7265) example:       FPS:    30
I (7275) example: Capture RGB 8-8-8 format frames for 3 seconds:
I (10295) example:      width:  1280
I (10295) example:      height: 720
I (10295) example:      size:   2764800
I (10295) example:      FPS:    30
I (10305) example: Capture YUV 4:2:0 format frames for 3 seconds:
I (13325) example:      width:  1280
I (13325) example:      height: 720
I (13325) example:      size:   1382400
I (13325) example:      FPS:    30
I (13325) example: Capture YVU 4:2:2 planar format frames for 3 seconds:
I (16355) example:      width:  1280
I (16355) example:      height: 720
I (16355) example:      size:   1843200
I (16355) example:      FPS:    30
I (16355) main_task: Returned from app_main()
...
```
                                    

Links

Target

License: Custom

To add this component to your project, run:

idf.py add-dependency "espressif/esp_video^0.1.0"

or download archive

Dependencies

  • espressif/cmake_utilities 0.*
  • espressif/esp_cam_sensor 0.*
  • ESP-IDF >=5.3
  • Examples:

    capture_stream

    more details

    To create a project from this example, run:

    idf.py create-project-from-example "espressif/esp_video^0.1.0:capture_stream"

    or download archive (112 bytes)

    Stats

    • Archive size
      Archive size: 69.27 KB
    • Downloaded in total
      Downloaded in total 1 time
    • Downloaded this version
      This version: 1 time

    Badge

    espressif/esp_video version: 0.1.0
    |