#!/bin/bash # Set pipeline for UDP streaming (H.264) SOCKET="/tmp/vizion_control.sock" HOST="${1:-192.168.1.100}" PORT="${2:-5000}" echo "Setting UDP streaming pipeline to $HOST:$PORT..." echo "{\"command\":\"set_pipeline\",\"params\":{\"pipeline\":\"videoconvert ! x264enc tune=zerolatency bitrate=2000 ! rtph264pay ! udpsink host=$HOST port=$PORT\"}}" | socat - UNIX-CONNECT:$SOCKET echo "" echo "Pipeline set. Start streaming with start_stream.sh" echo "To receive stream on target machine:" echo " gst-launch-1.0 udpsrc port=$PORT ! application/x-rtp,encoding-name=H264 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink"