This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
''' | |
Script to monitor live streams and send an Amazon SNS if the stream is down (and possibly take restorative action) | |
Future: | |
Black detect: ffmpeg -i out.mp4 -vf blackdetect -f null - | |
Note the following doesn't seem to fully work without looking at the debug logs | |
On live ffmpeg -y -i rtmp://cp30129.live.edgefcs.net/live/videoops-videoops@50541 -vf blackdetect -t 10 -loglevel debug -f null - | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set("log.file.path", "/tmp/test.log") | |
set("server.socket.path","/tmp/<script>.sock") | |
set("server.socket",true) | |
# Simple check function to match any "Finished with ...." line in the logs | |
def checker(n) | |
# get info from upcoming request | |
m = request.metadata(n) | |
# command to find if the file was played according to the log | |
command = 'grep -F' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ { "type": "TIMESTAMP", "name": "time" }, | |
{ "type": "STRING", "name": "host" }, | |
{ "type": "STRING", "name": "user" }, | |
{ "type": "STRING", "name": "method" }, | |
{ "type": "STRING", "name": "path" }, | |
{ "type": "STRING", "name": "code" }, | |
{ "type": "INTEGER", "name": "size" }, | |
{ "type": "STRING", "name": "referer" }, | |
{ "type": "STRING", "name": "agent" }, | |
{ "type": "STRING", "name": "duration" } ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@raspberrypi3-e78c6d9:/data# SoapySDRUtil --probe | |
###################################################### | |
## Soapy SDR -- the SDR abstraction library ## | |
###################################################### | |
Probe device | |
usb_claim_interface error -6 | |
Found Rafael Micro R820T tuner | |
Detached kernel driver | |
Found Rafael Micro R820T tuner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Produces load on all available CPU cores | |
""" | |
from multiprocessing import Pool | |
from multiprocessing import cpu_count | |
def f(x): | |
while True: | |
x*x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Storage} = require('@google-cloud/storage'); | |
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path; | |
const ffmpeg = require('fluent-ffmpeg'); | |
var bucket = 'test-demo-transcode'; | |
ffmpeg.setFfmpegPath(ffmpegPath); | |
exports.transcodeVideo = (data, context) => { | |
const file = data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state.audioinjectorpi { | |
control.1 { | |
iface MIXER | |
name 'Master Playback Volume' | |
value.0 121 | |
value.1 121 | |
comment { | |
access 'read write' | |
type INTEGER | |
count 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone -b 1.23 https://github.com/crosstool-ng/crosstool-ng.git | |
$ cd crosstool-ng | |
$ ./bootstrap | |
$ ./configure --prefix=/usr/local | |
$ make | |
$ sudo make install | |
$ cd .. | |
$ mkdir ctng | |
$ ct-ng menuconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rtl_fm, a simple narrow band FM demodulator for RTL2832 based DVB-T receivers | |
Use: rtl_fm -f freq [-options] [filename] | |
-f frequency_to_tune_to [Hz] | |
use multiple -f for scanning (requires squelch) | |
ranges supported, -f 118M:137M:25k | |
[-M modulation (default: fm)] | |
fm, wbfm, raw, am, usb, lsb | |
wbfm == -M fm -s 170k -o 4 -A fast -r 32k -l 0 -E deemp | |
raw mode outputs 2x16 bit IQ pairs |
NewerOlder