-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-vp9.sh
More file actions
executable file
Β·53 lines (43 loc) Β· 1.27 KB
/
test-vp9.sh
File metadata and controls
executable file
Β·53 lines (43 loc) Β· 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Quick VP9 testing script with automatic cleanup
set -e
echo "π§ VP9 Test Script - Automatic Cleanup & Testing"
# Function to cleanup processes
cleanup() {
echo "π§Ή Cleaning up..."
pkill -f "node server.js" || true
pkill -f "./security-camera" || true
docker stop ion-sfu-instance || true
docker rm ion-sfu-instance || true
sleep 2
echo "β
Cleanup complete"
}
# Trap cleanup on exit
trap cleanup EXIT
# Initial cleanup
cleanup
# Build latest version
echo "π¨ Building latest security-camera..."
go build ./cmd/security-camera
# Start servers
echo "π Starting servers..."
./startServers.sh &
SERVER_PID=$!
# Wait for servers to be ready
echo "β³ Waiting for servers to start..."
sleep 10
# Test VP9 implementation
echo "π₯ Testing VP9 streaming..."
if command -v gtimeout > /dev/null; then
gtimeout 30s ./security-camera -debug || echo "π Test completed (timeout expected)"
elif command -v timeout > /dev/null; then
timeout 30s ./security-camera -debug || echo "π Test completed (timeout expected)"
else
./security-camera -debug &
CAMERA_PID=$!
sleep 30
kill $CAMERA_PID || true
wait $CAMERA_PID 2>/dev/null || true
echo "π Test completed (timeout expected)"
fi
echo "β
VP9 test cycle complete!"