video-stream-gst.sh

AIWorld P1 AI Module for BPI-M2 Ultra and Berry · File : video-stream-gst.sh · Language : bash · Use case : Diffuser le flux vidéo de la caméra en temps réel via RTSP ou HTTP.

Uses GStreamer to expose the OV5640 camera stream on a network port for remote viewing.

GStreamer 1.10 is pre-installed. This command creates an MJPEG server on port 8080. Access it via a web browser (http://CARD_IP:8080). For RTSP, ensure rtsp plugins are installed. Run with bash stream.sh.

video-stream-gst.sh

#!/bin/bash
# Diffusion vidéo via GStreamer 1.10 sur AIWorld P1
# Utilise le décodage/encodage matériel disponible sur V40

# Option 1: Serveur HTTP simple (MJPEG)
gst-launch-1.0 v4l2src device=/dev/video0 ! \n    video/x-raw,width=1280,height=720,framerate=30/1 ! \n    jpegenc quality=90 ! \n    multipartmux ! \n    tcpserversink host=0.0.0.0 port=8080

# Option 2: Serveur RTSP (nécessite gstreamer-rtsp-server)
# gst-launch-1.0 -v v4l2src device=/dev/video0 ! \n#     video/x-raw,width=1280,height=720 ! \n#     mppvideodec ! \n#     rtspclientsink location=rtsp://localhost:8554/stream

← Back to the board