This is the example command that will take pictures periodically:
$ ffmpeg -f v4l2 -i {{device, e.g. /dev/video1}} -ss 0:0:2 -s 120x90 -vsync 2 -r 4 -updatefirst 1 stream.png-f v4l2uses the standard linux /dev/video decoder thing.
| #!/usr/bin/env ruby | |
| require "net/http" | |
| require "json" | |
| require "pry" | |
| # Uncomment this line and put in your default location if | |
| # you want to have a default location (in case of network | |
| # errors). | |
| # $default_latlon = [90.0, 90.0] |
| require "date" | |
| require "json" | |
| require "sinatra" | |
| require "time" | |
| module StreamMessageFormatter | |
| def self.format(object) | |
| return JSON.generate(object) << "\r\n" | |
| end | |
| end |
| diff --git a/lib/frecon/server.rb b/lib/frecon/server.rb | |
| index 5a524de..06b6435 100644 | |
| --- a/lib/frecon/server.rb | |
| +++ b/lib/frecon/server.rb | |
| @@ -13,6 +13,8 @@ module FReCon | |
| before do | |
| content_type "application/json" | |
| + | |
| + p request.body.read.to_s |
| #!/bin/sh | |
| echo ">>>> Copying archive to home directory!" | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| cp $DIR/zz_config-diffs.tar.gz $HOME | |
| echo ">>>> Changing to home directory!" |
| neonatestail | |
| penrumings | |
| unisi | |
| gooproach | |
| destoolsnant | |
| lopdurablee | |
| falsenalhen | |
| govnobsis | |
| intenlog | |
| loottylows |
| class Array | |
| def mean | |
| return ((self.map{|x| x.to_f} | |
| .inject(:+)) / | |
| (self.count)) | |
| end | |
| def standard_deviation | |
| m = self.mean |
| require 'socket' | |
| require 'timeout' | |
| module Porto | |
| class PortoPort | |
| def self.in_use?(ip, port) | |
| begin | |
| Timeout::timeout(1) do | |
| begin | |
| s = TCPSocket.new(ip, port) |
| #!/usr/bin/env ruby | |
| require "json" | |
| module DataSync | |
| EXAMPLE_CONFIGURATION_FILE_NAME = "z_datasync-configuration.sample.json" | |
| CONFIGURATION_FILE_NAME = "configuration.json" | |
| OutputProperties = { |
| #!/usr/bin/env rackup | |
| #\ -E deployment | |
| use Rack::ContentLength | |
| app = Rack::Directory.new Dir.pwd | |
| run app |