Skip to content

Instantly share code, notes, and snippets.

View dsandler's full-sized avatar

Dan Sandler dsandler

View GitHub Profile
@dsandler
dsandler / framestamp.sh
Created December 16, 2022 15:48
script to put the current frame number and elapsed time in the LL corner of a video
# framestamp.sh
# put the current frame number and elapsed time in the LL corner of a video
# (counts real frames, so vfr input will make the numbers stall from time to time)
if [ -z "$2" ]; then echo "usage: $0 input.mp4 output.mp4"; exit 2; fi
ffmpeg -i "$1" -vf "
drawtext=text='f=%{eif\:n\:d\:4}\ t=%{pts}': x=10: y=h-th-10:
fontcolor=white: fontsize=18: box=1: boxcolor=0x00000099
" -y "$2"
val TEMPLATE = "┏━┓┃ ┃┗━┛".toCharArray().map { it.toString() }
val TEMPLATE2 = listOf("┌", "─", "┒",
"│", " ", "┃",
"┕", "━", "┛")
val TEMPLATE3 = listOf("┌─", "─", "─┒",
"│ ", " ", " ┃",
"┕━", "━", "━┛")
val ASCII = listOf(
"+-", "-", "-+",
"| ", " ", " |",