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.
| 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 |
| require "date" | |
| require "json" | |
| require "sinatra" | |
| require "time" | |
| module StreamMessageFormatter | |
| def self.format(object) | |
| return JSON.generate(object) << "\r\n" | |
| end | |
| end |
| #!/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 "net/http" | |
| require "pry" | |
| # Parameters for episode looping. | |
| # | |
| # Note that 404 seems to be reserved for whining. | |
| MIN_EPISODE_NUMBER = 001 | |
| MAX_EPISODE_NUMBER = 417 | |
| FORMAT = ".ogv" |
| require "matrix" | |
| require "pry" | |
| class Integer | |
| # Method to compute binomial coefficient nCk (where n is this object, | |
| # and k is some other integer. | |
| def choose(k) | |
| # n! / (n-k)! | |
| top = (((self-k)+1)..(self)).inject(1, &:*) |
| #!/bin/sh | |
| ruby -e "\"`ps -ef|grep \<defunct\>`\".split(/$/).each{|l|puts(l.match(/^(?<user>\w+)\W+(?<pid>\d+)\W+(?<ppid>\d+)/)[:pid])}" |
| require 'uri' | |
| require 'net/http' | |
| module Monoid | |
| class Site | |
| attr_accessor :base_uri | |
| def initialize(base_uri = URI.parse('https://larsenwork.com')) | |
| @base_uri = base_uri | |
| end |
| CC = clang | |
| LD = ld | |
| LDSHARED = clang -dynamic -bundle | |
| CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=division-by-zero -Werror=deprecated-declarations -Werror=extra-tokens -pipe | |
| XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE | |
| CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin16 -I./include -I. -I./enc/unicode/data/8.0.0 | |
| DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -Wl,-pie -framework CoreFoundation | |
| SOLIBS = -lgmp | |
| Apple LLVM version 8.0.0 |
| #!/bin/bash | |
| function check_user_and_host { | |
| _ssh_result=$(ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no $1@$2 "echo \"\`who | grep -c . \`\"; true" 2>/dev/null) | |
| } | |
| function check_and_output_host { | |
| check_user_and_host $1 $2 && echo "$2: up, $_ssh_result users logged in" || echo "$2: down" | |
| } |