0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

manjaroinux ( arch 系列 ) motion 監視カメラ HDMI Virtual Display

Last updated at Posted at 2021-07-23

sva.or.jp/wp/?p=25137 より

ある日、釈迦は弟子二人を連れて托鉢に出かけました。
なので 釈迦自身も 村民から鉢に 食物をもらっていたのだろう 
自ら農地を耕作し作物を作らないという意味では プログラマーも一緒かな
なお 托鉢は自ら歩いていかないといけません! 乗り物は禁
# crontab -l
@reboot motion ; sleep 1 ;  /home/jaro/ufw.bat
*	 *	*	*	*	 /home/jaro/mv.bat
# every Saturday erase 3 days before
1	18	*	*	6	 /home/jaro/motion-clear.bat
# ./comment-out.bat ufw.bat 
ufw disable
ufw enable
ufw default deny
 ufw allow Deluge
 ufw limit ssh/tcp

 ./comment-out.bat mv.bat



x=`date +%Y%m%d`
y=`date +%H`
mkdir -p /home/jaro/kansi---/$x/$y
mv /home/jaro/kansi---/*$x*.mkv  /home/jaro/kansi---/$x/$y


これにて

ls -ltr /home/jaro/kansi---/20210724/

合計 28
drwxr-xr-x 2 root root 4096 7月 24 05:59 05
drwxr-xr-x 2 root root 4096 7月 24 06:00 06
drwxr-xr-x 2 root root 4096 7月 24 07:26 07
drwxr-xr-x 2 root root 4096 7月 24 08:48 08
drwxr-xr-x 2 root root 4096 7月 24 10:59 10
drwxr-xr-x 2 root root 4096 7月 24 11:59 11
drwxr-xr-x 2 root root 4096 7月 24 12:00 12

な感じに 日にちの下に時間フォルダを作ってます

# ./comment-out.bat motion-clear.bat


x=`date +%Y%m%d`
z7=`date +%Y%m%d  --date '7 day ago' `
z6=`date +%Y%m%d  --date '6 day ago' `
z5=`date +%Y%m%d  --date '5 day ago' `
z4=`date +%Y%m%d  --date '4 day ago' `
z3=`date +%Y%m%d  --date '3 day ago' `
z2=`date +%Y%m%d  --date '2 day ago' `
z1=`date +%Y%m%d  --date '1 day ago' `
z0=`date +%Y%m%d`
rm -rf /home/jaro/kansi---/$z7
rm -rf /home/jaro/kansi---/$z6
rm -rf /home/jaro/kansi---/$z5
rm -rf /home/jaro/kansi---/$z4




motion.confは

# ./comment-out.bat /etc/motion/motion.conf | ./comment-out.bat-
daemon off
setup_mode off
log_level 6
target_dir /home/jaro/kansi---
videodevice /dev/video0
width 640
height 480
framerate 15
text_left CAMERA1
text_right %Y-%m-%d\n%T-%q
emulate_motion off
threshold 1500
despeckle_filter EedDl
minimum_motion_frames 1
event_gap 60
pre_capture 3
post_capture 0
picture_output off
picture_filename %Y%m%d%H%M%S-%q
movie_output on
movie_max_time 60
movie_quality 45
movie_codec mkv
movie_filename %t-%v-%Y%m%d%H%M%S
webcontrol_port 8080
webcontrol_localhost on
webcontrol_parms 0
stream_port 8081
stream_localhost on

別のPCから入って見ます ( vnc over ssh )

virtual monitor をつかいます
これだと monitor(自分の場合はTVです)をつかわなくていいので便利です

1.jpg

動画では以下です
https://www.youtube.com/watch?v=QbfFLZm8eRc
あっという間に motion(監視カメラ)を動かしているPCに 入ってます

なお 水色の別のPCでは

$ ./comment-out.bat vnc-over-ssh-2-kansi.bat 
x='192.168.0.3'
ping -c 3 $x
ssh jaro@$x  -L 5900:localhost:5900


./comment-out.bat vnc-viewer.bat 
vncviewer localhost:5900


です
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?