mediamtx/bench/publish/start.sh

28 lines
578 B
Bash
Raw Normal View History

2020-09-18 17:59:07 +00:00
#!/bin/sh -e
2023-08-26 16:11:55 +00:00
PUBLISHER_COUNT=50
2020-09-18 17:59:07 +00:00
PUBLISHER_PROTOCOL=tcp
#####################################################
# publishers
CONF=""
CONF="${CONF}pprof: yes\n"
2021-11-12 21:33:19 +00:00
CONF="${CONF}paths:\n"
CONF="${CONF} all_others:\n"
2020-09-18 17:59:07 +00:00
echo -e "$CONF" > /source.conf
/mediamtx /source.conf &
2020-09-18 17:59:07 +00:00
sleep 1
for i in $(seq 1 $PUBLISHER_COUNT); do
ffmpeg -hide_banner -loglevel error \
-re -stream_loop -1 -i /video.mkv -c copy -f rtsp \
-rtsp_transport $PUBLISHER_PROTOCOL rtsp://localhost:8554/source$i &
done
sleep 5
go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=15