🛠 Capture and play video with GStreamer

AIWorld P1 AI Module for BPI-M2 Ultra and Berry · debutant · Apprendre à utiliser les démos intégrées pour tester la caméra et le flux vidéo.

Objectifs

This tutorial guides beginners in using the Vecoo environment to test the OV5640 camera and the GStreamer video pipeline. The goal is to verify sensor functionality and understand how to launch simple video streams via the command line.

Matériel nécessaire

Étapes

  1. Ensure the AIWorld P1 card is correctly connected to the host board's GPIO port and that the Vecoo system has booted.
  2. Open a terminal via serial connection or graphical interface if available.
  3. Verify camera detection by listing video devices. Type the following command:
ls /dev/video*
  1. If the camera is recognized, you should see a device like /dev/video0.
  2. Launch a static image capture to validate the sensor. Use the provided demo application:
camera
  1. To test continuous video streaming, use GStreamer. GStreamer V1.10 is pre-installed. Launch a simple preview window with the following command:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1 ! videoconvert ! autovideosink
  1. This command configures the video source (v4l2src) to capture at 720P 30fps, converts the format, and displays the output.

Vérification

A window should appear displaying the live video stream. If the window is black or the command fails, check access permissions for /dev/video0 or ensure no other application is using the camera. 720P resolution and 30fps confirm the hardware pipeline is active.

Pour aller plus loin

Explore GStreamer options to record video to a file instead of displaying it, or test the RTSP network streams mentioned in the specs to transmit video to another device.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials