Skip to content

Instantly share code, notes, and snippets.

@tjensen
Created March 26, 2020 17:09
Show Gist options
  • Save tjensen/0de22c181d8a43c6ff345ab6e93a79d7 to your computer and use it in GitHub Desktop.
Save tjensen/0de22c181d8a43c6ff345ab6e93a79d7 to your computer and use it in GitHub Desktop.
FFMPEG command for generating a "bars and tone" RTMP live stream
ffmpeg -re \
-f lavfi -i "smptebars=rate=30:size=640x360" \
-f lavfi -i "sine=frequency=1000" \
-vf drawtext="text='%{pts\:hms}':rate=30:x=(w-tw)/2:y=(h-lh)/2:fontsize=48:fontcolor=white:box=1:boxcolor=black" \
-f flv \
-vcodec libx264 -profile:v baseline -pix_fmt yuv420p -preset ultrafast -tune zerolatency -crf 28 \
-acodec aac \
rtmp://streaming-server/live/key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment