Created
January 4, 2019 22:39
-
-
Save ergoz/4b78ff5c1fe61395941e4e44b52a7fab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/dumb-init /bin/bash | |
set -euxo pipefail | |
VIDEO_URL=${VIDEO_URL:-$1} | |
ICECAST_URL=${ICECAST_URL:-$2} | |
ICECAST_DESC=${ICECAST_DESC:-Re-Stream of ${VIDEO_URL}} | |
ICECAST_NAME=${ICECAST_NAME:-Re-Stream} | |
ICECAST_WEBSITE=${ICECAST_WEBSITE:-$VIDEO_URL} | |
streamlink "${VIDEO_URL}" best -O | \ | |
ffmpeg -i - -vn -c:a libvorbis \ | |
-legacy_icecast 1 -content_type audio/ogg \ | |
-ice_name "${ICECAST_NAME}" -ice_url "${ICECAST_WEBSITE}" \ | |
-ice_description "${ICECAST_DESC}" \ | |
"${ICECAST_URL}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment