#!/bin/sh
while true; do
  ffmpeg -rtsp_transport tcp -stimeout 5000000 -i "rtsp://admin:hik123456@192.168.31.102:554" -vcodec libx264 -acodec aac -f flv rtmp://192.168.31.250/live/hls102
  echo "Stream disconnected, reconnecting..."
  sleep 1
done
