move sleep before starting of ffmpeg

This commit is contained in:
deflax 2025-04-21 23:52:29 +03:00
parent 59ce841742
commit fa300b030f

View file

@ -8,8 +8,7 @@ FFMPEG_LOGLEVEL="repeat+level+info"
mkdir -p ./rec/ mkdir -p ./rec/
cleanup() cleanup() {
{
adb_pid=$(ps aux | grep 'adb' | grep ${android} | awk '{print $2}'); adb_pid=$(ps aux | grep 'adb' | grep ${android} | awk '{print $2}');
echo "] Killing adb services with pid=${adb_pid}" echo "] Killing adb services with pid=${adb_pid}"
kill -9 ${adb_pid} kill -9 ${adb_pid}
@ -70,6 +69,7 @@ scrcpy -n \
while : while :
do do
sleep 5
CURRENTDATE=`date +"%Y_%m_%d_%T"` CURRENTDATE=`date +"%Y_%m_%d_%T"`
echo "] ffmpeg start at ${CURRENTDATE}" echo "] ffmpeg start at ${CURRENTDATE}"
@ -91,6 +91,5 @@ do
#CURRENTDATE=`date +"%Y_%m_%d_%T"` #CURRENTDATE=`date +"%Y_%m_%d_%T"`
echo "] ffmpeg end at ${CURRENTDATE}" echo "] ffmpeg end at ${CURRENTDATE}"
sleep 5
done done