해피 투게더

mac mini 에서 ebs 녹음 본문

장난감

mac mini 에서 ebs 녹음

보아요 2021. 12. 12. 15:49

터미널에서 rtmpdump, ffmpeg 설치

brew install rtmpdump ffmpeg

 

테스트

/Volumes/hd2/EBS/ebs_record.sh test 1 /Volumes/hd2/EBS

 

crontab -e

CRON_TZ=Asia/Seoul

0 5 * * 1-6 /Volumes/hd2/EBS/ebs_record.sh Pocket-CH 10 /Volumes/hd2/EBS/1Pocket-CH
30 5 * * 4-6 /Volumes/hd2/EBS/ebs_record.sh Basic-CH 20 /Volumes/hd2/EBS/EBS/2Basic-CH
20 6 * * 1-6 /Volumes/hd2/EBS/ebs_record.sh Easywriting 20 /Volumes/hd2/EBS/3Easywriting
0 7 * * 1-6 /Volumes/hd2/EBS/ebs_record.sh SpeakEng 20 /Volumes/hd2/EBS/4SpeakEng
40 7 * * 1-6 /Volumes/hd2/EBS/ebs_record.sh PowerEng 20 /Volumes/hd2/EBS/5PowerEng

:wq 로 저장

 

테스트시에는 잘 되는듯 하지만 권한문제인지 실행이 안된건지 저장 안됨. 스크립트 위치 변경.

 

cp /Volumes/hd2/EBS/ebs_record.sh ~/duckdns/

 

*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1

CRON_TZ=Asia/Seoul

0 5 * * 1-6 ~/duckdns/ebs_record.sh Pocket-CH 10 /Volumes/hd2/EBS/1Pocket-CH
30 5 * * 4-6 ~/duckdns/ebs_record.sh Basic-CH 20 /Volumes/hd2/EBS/EBS/2Basic-CH
20 6 * * 1-6 ~/duckdns/ebs_record.sh Easywriting 20 /Volumes/hd2/EBS/3Easywriting
0 7 * * 1-6 ~/duckdns/ebs_record.sh SpeakEng 20 /Volumes/hd2/EBS/4SpeakEng
40 7 * * 1-6 ~/duckdns/ebs_record.sh PowerEng 20 /Volumes/hd2/EBS/5PowerEng

 

duck.sh 는 ddns 설정. 그래도 안됨.

 

cron runs scripts with a very minimal environment. In particular, its PATH doesn't contain all of the usual binaries directories, just /usr/bin and /bin, so any commands in other binaries directories (like wget) will not be available.

 

그래서 Path 설정을 crontab 에 추가해줌

 

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/homebrew/bin

*/5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1

CRON_TZ=Asia/Seoul

0 5 * * 1-6 ~/duckdns/ebs_record.sh Pocket-CH 10 /Volumes/hd2/EBS/1Pocket-CH
30 5 * * 4-6 ~/duckdns/ebs_record.sh Basic-CH 20 /Volumes/hd2/EBS/EBS/2Basic-CH
20 6 * * 1-6 ~/duckdns/ebs_record.sh Easywriting 20 /Volumes/hd2/EBS/3Easywriting
0 7 * * 1-6 ~/duckdns/ebs_record.sh SpeakEng 20 /Volumes/hd2/EBS/4SpeakEng
40 7 * * 1-6 ~/duckdns/ebs_record.sh PowerEng 20 /Volumes/hd2/EBS/5PowerEng

 

녹음이 되긴 하는데 시간대가 맞지않음. 옵션을 TZ=Asia/Seoul 로 해도 같은 결과

 

그냥 시간대를 조정해서 쓰기로... daylightsaving 끝나면 또 조정해야 겠지만