koki-h / motion_for_mukoyama Goto Github PK
View Code? Open in Web Editor NEWmukoyama( http://mukoyama.lmlab.net )への画像送信にmotion( http://lavrsen.dk/foswiki/bin/view/Motion/ )を使う
License: MIT License
mukoyama( http://mukoyama.lmlab.net )への画像送信にmotion( http://lavrsen.dk/foswiki/bin/view/Motion/ )を使う
License: MIT License
Rotate image this number of degrees. The rotation affects all saved images as
# well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate <%= rotation %>
"lib/mk_motionconf.rb" 12L, 438C
#!/usr/bin/env ruby
require 'erb'
motion_home = ENV['MOTION_HOME']
target_dir = ENV['MOTION_TARGET_DIR'] || '/var/lib/motion'
threshold = ENV['MOTION_THRESHOLD'] || 1500
stream_localhost = ENV['MOTION_STREAM_LOCALHOST'] || 'on'
snapshot_interval= ENV['MOTION_SNAPSHOT_INTERVAL'] || 0
rotate = ENV['MOTION_ROTATE'] || 0 #<----
config_template = "#{motion_home}/motion/template/motion.conf.erb"
erb = ERB.new(open(config_template).read)
puts erb.result(binding)
autossh等を上手く利用できないか。
常に動体がフレームに入ってくる場合、動体検出時に毎回画像アップロードでは画像が大量になるため却って見づらくなる。動体検出時にアップロードせずに定時撮影だけにすることはできないか。
ProtocolKeepAlivesのような定期的にパケットを送信するなどのオプションを追加する必要がありそう。
http://d.hatena.ne.jp/rx7/touch/20100330/p1
再マウントできるような設定手順をREADMEに追記する。
そのためmukoyama側でタイムゾーンが正しく反映されない場合がある。
`dt=2017-07-18T10:10:10+0900` ってcurlに渡すと、URLエンコードされて `dt=2017-07-18T10:10:10 0900` ってのをrailsで受け取ってるみたいです。
現状nohup.outにログが出力されている。ローテーション等しないため肥大化が心配。/dev/nullに捨てるなどの設定も必要。
youtube apiを使って動体検出したタイミングで撮影した動画をアップロードする。(プライベートにしたい)
まず、motionの設定で可能かどうか調査する。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.