move sleep before starting of ffmpeg
This commit is contained in:
parent
59ce841742
commit
fa300b030f
1 changed files with 3 additions and 4 deletions
|
@ -8,8 +8,7 @@ FFMPEG_LOGLEVEL="repeat+level+info"
|
|||
|
||||
mkdir -p ./rec/
|
||||
|
||||
cleanup()
|
||||
{
|
||||
cleanup() {
|
||||
adb_pid=$(ps aux | grep 'adb' | grep ${android} | awk '{print $2}');
|
||||
echo "] Killing adb services with pid=${adb_pid}"
|
||||
kill -9 ${adb_pid}
|
||||
|
@ -28,7 +27,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
is_correct_port () {
|
||||
is_correct_port() {
|
||||
# check if port 5555 is open
|
||||
PORT=$(nmap -sT -P0 ${android} -p 5555 | awk -F/ '/tcp open/{print $1}')
|
||||
if [[ $PORT == 5555 ]]; then
|
||||
|
@ -70,6 +69,7 @@ scrcpy -n \
|
|||
|
||||
while :
|
||||
do
|
||||
sleep 5
|
||||
CURRENTDATE=`date +"%Y_%m_%d_%T"`
|
||||
echo "] ffmpeg start at ${CURRENTDATE}"
|
||||
|
||||
|
@ -91,6 +91,5 @@ do
|
|||
|
||||
#CURRENTDATE=`date +"%Y_%m_%d_%T"`
|
||||
echo "] ffmpeg end at ${CURRENTDATE}"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue