The Lions Rear

Meme Generator

Sometimes simple dumb shit works. This simple Tool can be used by other pages to generate Meme gifs from links which can be fed in to youtube-dl. See By the power of MACHINE LEARNING! for example usage.

Is this Hypermedia? open threads

conf-windows:tangle ~/meme/template.srt:comments no:mkdirp yes
1
00:00:00,000 --> 00:01:00,000
$TEXT
shell:tangle ~/meme/meme.sh:comments none
set +e

# ----
MEMEDIR=~/meme/
TMPDIR=/tmp/
mkdir $MEMEDIR

export CAP_END=$((${START}+${DURATION}-1))

cat $MEMEDIR/template.srt | envsubst | tee $MEMEDIR/$MEMENAME.srt

[[ -f $TMPDIR/$MEMENAME.mkv ]] || yt-dlp ${URL} -o $TMPDIR/$MEMENAME.mkv

test -f $MEMEDIR/$MEMENAME.gif && rm $MEMEDIR/$MEMENAME.gif
ffmpeg -i $TMPDIR/$MEMENAME* -ss ${START} -t ${DURATION} -vf "fps=${FPS},scale=${WIDTH}:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse,subtitles=$MEMEDIR/$MEMENAME.srt:force_style='Fontsize=24,Fontname=Vulf\ Mono\ Italic'" $MEMEDIR/$MEMENAME.gif
nix:tangle ~/meme/shell.nix
let
  pkgs = import <nixpkgs> {};
in pkgs.mkShell {
  buildInputs = with pkgs; [ ffmpeg envsubst yt-dlp ];
}