Skip to content

Instantly share code, notes, and snippets.

@aztlan2k
Created September 1, 2015 16:12
Show Gist options
  • Save aztlan2k/f8b34149f932be614d86 to your computer and use it in GitHub Desktop.
Save aztlan2k/f8b34149f932be614d86 to your computer and use it in GitHub Desktop.
Creates a live stream using madelbrot with timestamp
#!/usr/bin/env bash
host=${WOWZA_HOST:-rtmp://23.253.252.28/liveorigin-adaptive/live2}
backuphost=${WOWZA_BACKUPHOST:-rtmp://23.253.252.28/liveorigin-adaptive/live2}
echo -e "Starting on host = ${host} backup host = ${backuphost}"
ffmpeg \
-re \
-f lavfi \
-i mandelbrot \
-vf drawtext="text='%{pts\:hms}':rate=30:x=(w-tw)/2:y=(h-lh)/2:fontsize=48:fontcolor=white:box=1:boxcolor=black" \
-vcodec libx264 \
-profile:v baseline \
-pix_fmt yuv420p \
-preset ultrafast \
-tune zerolatency \
-crf 28 \
-acodec libvo_aacenc \
-map 0 \
-f tee \
"[f=flv]${host}|[f=flv]${backuphost}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment