ffmpeg -f avfoundation -framerate 30 -video_size 1280x720 -i "0:none" -codec:v libx264 -bsf:v h264_mp4toannexb -f h264 udp://localhost:1234
ffmpeg -y \
-probesize 42M \
-rtsp_transport tcp \
from flask import Flask, request, Response, abort, jsonify, send_file, make_response | |
import os | |
import hashlib | |
import uuid | |
import logging, base64 | |
import argparse | |
app = Flask(__name__) | |
logging.basicConfig(level=logging.INFO) |
FROM debian:11 | |
RUN apt update && apt-get install motion ffmpeg v4l-utils -y | |
RUN apt-get install python2 curl -y | |
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && python2 get-pip.py | |
RUN apt-get install python-dev-is-python2 python-setuptools libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev libffi-dev libzbar-dev libzbar0 -y | |
RUN apt install -y fdisk lsb-release |
#!/bin/sh | |
./simple_lan.sh # https://gist.github.com/sarjsheff/1b5b088c18e237c9aa28fcc218578536#file-simple_net-sh | |
set -x | |
ip -n ve1 tunnel add ve1tun mode gre remote 10.20.1.6 local 10.20.1.1 | |
ip -n ve1 addr add 10.20.2.1/24 dev ve1tun | |
ip -n ve4 tunnel add ve4tun mode gre remote 10.20.1.1 local 10.20.1.6 | |
ip -n ve4 addr add 10.20.2.2/24 dev ve4tun |
flowchart LR
ve1e1 --- ve2e1
ve1e2 --- ve3e1
ve3e2 --- ve4e1
subgraph ve1
ve1e1(ve1e1<br/><small>.1</small>)
ve1e2(ve1e2<br/><small>.2</small>)
end
# | |
process.roles=broker,controller | |
inter.broker.listener.name=PLAINTEXT | |
controller.listener.names=CONTROLLER | |
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL | |
num.network.threads=3 | |
num.io.threads=8 | |
socket.send.buffer.bytes=102400 | |
socket.receive.buffer.bytes=102400 | |
socket.request.max.bytes=104857600 |
Kube config client
srv# kubectl create ns test
srv# kubectl create sa testuser
srv# SNAME=`kubectl get sa testuser -o go-template="{{ (index .secrets 0).name }}"`
srv# kubectl get secret $SNAME -o go-template='{{ index .data "ca.crt" }}' | base64 -d > server.ca
cli# kubectl config set-cluster ofd --server=https://<kube server ip>:6443 --embed-certs --certificate-authority=./server.ca
function uuidv4() { | |
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => | |
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) | |
); | |
} |
kafka-topics.sh --bootstrap-server localhost:9092 --create --topic testunique --config cleanup.policy=compact --config max.compaction.lag.ms=60000 --config min.cleanable.dirty.ratio=0.1 |