#!/bin/bash
# 推流到 Cloudflare Stream

RTSP_SOURCE="rtsp://localhost:8554/camera1"
CLOUDFLARE_URL="rtmps://live.cloudflare.com:443/live/a6ab89289f20807d84b56bbb899f296ek3c1ae1949e76f200feef94b8f7d093ca"

echo "开始推流到 Cloudflare Stream..."
echo "源: $RTSP_SOURCE"
echo "按 Ctrl+C 停止推流"
echo ""

ffmpeg -i "$RTSP_SOURCE" \
  -c:v copy \
  -c:a aac \
  -f flv \
  "$CLOUDFLARE_URL"
