That’s to say, a compendium of so-called ‘Known Unknowns’.
https://wikenigma.org.uk
https://wikenigma.org.uk/doku.php?id=start&do=randompage
3 simple scripts to blurp last or middle or scene detected frames to tty.
edit: There is also a version of scene detected that generates some html < This is the hero version.
edit: Known bugs: When the scene counter reaches 1000, things break. edit2: Most likely, almost certainly the bug is already at the ffmeg line:
# first frame, I want as well
ffmpeg -hide_banner -loglevel panic -i "$1" -vf "${crop}" -vframes 1 -pix_fmt rgb24 "$tmp/make/000.png" || exit
# scene detect
ffmpeg -hide_banner -loglevel info -nostats -i "$1" -threads 0 -vf "${crop},select=gt(scene\,0.4)",showinfo -pix_fmt rgb24 -vsync vfr "$tmp/make/%03d.png" 2> "$tmp/detect.log" >/dev/null &
pid="$!"
where %03d can obviously only host 999 numbers, duh. FIX THE SCRIPT.
edit3: Another bug was in this grep:
var="$(grep "n: \+$frame " "$tmp/detect.log")"
but detect.log gaining 1000ths detection will actually not match (there is no space no more in front of the number), possible solution would be:
# \s matches any whitespace chars (including newline, tab), and you can use * to match ZERO or more of them
var="$(grep "n:\s*$frame " "$tmp/detect.log")";
Probably fixed.
sceneFrame demo
https://www.youtube.com/watch?v=VzYZWDprddI
p.s. Also tested with kitty term and seems to work fine
There is another way to do scene detection using scdet filter,
# help
ffmpeg -h filter=scdet
# example
ffmpeg -i file.mxf -vf "scdet=threshold=0.2" -f null - 2> scdet.log
which supposedly uses a different kind of detection. Untested. Filter is not mentionied in ffmpeg docs due to experimental nature?
(This post and scripts were first posted 22. 6. 2022.)
Supposedly fully open sourced.
The web interface is extremly similar to chatGPT one.
https://gist.github.com/pmarreck/9ce17f7996347dd532f3e20a2a383c0d
“please”- a bash function to ask an LLM to compose and run a bash command, with an approval/denial step All it needs is an OPENAI_API_KEY
context: https://news.ycombinator.com/item?id=42695547
I like this function:
needs() {
command -v "$1" > /dev/null || { >&2 printf "%s is required- not installed or in PATH; %s\n" "$1" "${@:2}"; return 1; }
}
which according to chatgpt could be even nicer:
needs() {
if ! command -v "$1" > /dev/null; then
>&2 printf "%s is required but not installed or not in PATH. %s\n" "$1" "${@:2}"
return 1
fi
}
https://www.youtube.com/watch?v=9U8LCjuQzdc
https://ohmyposh.dev
Oh My Posh is a custom prompt engine for any shell that has the ability to adjust the prompt string with a function or variable.
Btw, there is something called transient prompt, which can change the current prompt to say include pwd, the old ones will get shortened (or similar).