Skip to content

Instantly share code, notes, and snippets.

@joshdvir
Created April 9, 2020 13:06
Show Gist options
  • Save joshdvir/861ccbfaf1f68bc05d09df8888e1540f to your computer and use it in GitHub Desktop.
Save joshdvir/861ccbfaf1f68bc05d09df8888e1540f to your computer and use it in GitHub Desktop.
#!/bin/bash
url="rtmp://localhost/live/pi"
fifo="live.fifo.h264"
rm -f "$fifo"
mkfifo "$fifo"
raspivid \
-w 1280 -h 720 -fps 25 -g 100 \
-t 0 -b 3000000 -o - | psips > "$fifo" &
ffmpeg -y \
-f h264 \
-i "$fifo" \
-c:v copy \
-map 0:0 \
-f flv "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment