Skip to content

Instantly share code, notes, and snippets.

@notpushkin
Last active October 22, 2023 12:48
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save notpushkin/a7a5fe3d70abb86aeb58 to your computer and use it in GitHub Desktop.
A script for streaming from OBS Studio (https://obsproject.com/) to Icecast2
ICE_HOST="example.net"
ICE_PORT="8000"
ICE_PASS="hackme"
ICE_MOUNT="/obs.ogg"
FILE="/tmp/iceobs.ogg.sock"
# Requirements: obs oggfwd
rm -f $FILE
mkfifo $FILE
#obs > /dev/null 2>&1 &
echo "Please configure your OBS — in Settings > Output > Recording:"
echo ""
echo " Output Type: URL"
echo " File Path: $FILE"
echo " Container: ogg"
echo " Rescale Output: 872x490 (or lower)"
echo ""
echo "Click [Start Recording], then press Enter here"
read
echo "Okay, ready to stream now!"
echo "Open your stream at: http://$ICE_HOST:$ICE_PORT$ICE_MOUNT"
oggfwd "$ICE_HOST" "$ICE_PORT" "$ICE_PASS" "$ICE_MOUNT" < "$FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment