-
Notifications
You must be signed in to change notification settings - Fork 1
/
match_video.sh
executable file
·69 lines (45 loc) · 1.59 KB
/
match_video.sh
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# run match.py for all video files in the `data' directory
flags=""
trap "exit 1" 2 # catch SIGINT
if [ -n "$1" ]; then
echo "usage: $0"
exit 1
fi
dir=$(dirname "$0")
cd "$dir"
outroot="output/muserc_sav_pre"
if [ ! -d "${outroot}" ]; then
mkdir "${outroot}"
fi
# setup log
outdir="output/muserc_sav_pre/muserc_sav"
if [ ! -d "${outdir}" ]; then
mkdir "${outdir}"
fi
log_base="$outdir/match_video"
log="${log_base}.log"
i=0
while [ -e "$log" ]; do
i="`expr $i + 1`"
log="${log_base}_${i}.log"
done
touch "$log"
# video 1
audio="data/muserc_sensor_audio_video_raw/data_video1_audio"
sync="data/muserc_sensor_audio_video_raw/data_video1_sync"
sensor="data/muserc_sensor_audio_video_raw/data_video1_sensor"
cutlist="data/muserc_sensor_audio_video_raw/data_video1_cutlist"
title="amateur_51_m_vib"
echo "$title ..."
echo "./match.py -v $flags \"${audio}\" \"${sync}\" \"${sensor}\" \"$title\" \"${outdir}\" -c \"${cutlist}\" >>$log 2>>$log" >>$log
./match.py -v $flags "${audio}" "${sync}" "${sensor}" "$title" "$outdir" -c "${cutlist}" >>$log 2>>$log
# video 2
audio="data/muserc_sensor_audio_video_raw/data_video2_audio"
sync="data/muserc_sensor_audio_video_raw/data_video2_sync"
sensor="data/muserc_sensor_audio_video_raw/data_video2_sensor"
cutlist="data/muserc_sensor_audio_video_raw/data_video2_cutlist"
title="pro_51_f_vib"
echo "$title ..."
echo "./match.py -v $flags \"${audio}\" \"${sync}\" \"${sensor}\" \"$title\" \"${outdir}\" -c \"${cutlist}\" >>$log 2>>$log" >>$log
./match.py -v $flags "${audio}" "${sync}" "${sensor}" "$title" "$outdir" -c "${cutlist}" >>$log 2>>$log