The following is the GNU All-permissive License as recommended inhttps://www.gnu.org/licenses/license-recommendations.en.html
Copyright (C) 2024 Free Software Foundationsysadmin@fsf.org
Copying and distribution of this file, with or without modification,are permitted in any medium without royalty provided the copyrightnotice and this notice are preserved. This file is offered as-is,without any warranty.
Contributions are welcome. Seehttps://savannah.gnu.org/maintenance/fsf/.
LibrePlanet Low Resolution video streaming
Create the following script:
#!/bin/bashif [ $# -lt 1 ] || [ $# -gt 2 ] ; then echo "usage $0 stream-room-neptune [--audio]" exit 1fiaudio_only=falseif [ ! -z $2 ] ; then if [ $2 == "--audio" ] ; then audio_only=true else echo "usage $0 stream-room-neptune [--audio]" exit 1 fifipassword=cheeW1Ohencoder_speed="ultrafast"mount="$1"src_url="http://live-master.fsf.org:8000/${mount}.webm"dest_url="icecast://source:${password}@live-master.fsf.org:8000/${mount}-lowres.webm"dest_ogg_url="icecast://source:${password}@live-master.fsf.org:8000/${mount}.ogg"while true; do sleep 1 if wget $src_url -O - -q | grep . -q ; then if [ "$audio_only" == "true" ] ; then ffmpeg -f webm -re -i "${src_url}" \ -f ogv -reconnect_at_eof 1 -reconnect_streamed 1 -content_type audio/ogg \ -c:a copy -preset "${encoder_speed}" -deadline realtime -threads 2 -error-resilient 1 \ -bufsize 100K -content_type audio/ogg -vn \ "${dest_ogg_url}" else ffmpeg -f webm -re -i "${src_url}" -vf scale=854:480 \ -f webm -reconnect_at_eof 1 -reconnect_streamed 1 -content_type video/webm -cluster_time_limit 5100 -cluster_size_limit 1M \ -c:a copy -b:v 500k -preset "${encoder_speed}" -deadline realtime -threads 2 -error-resilient 1 \ -maxrate 500k -bufsize 1M -content_type video/webm -c:v libvpx \ "${dest_url}" fi else echo $(date): ${src_url} is not live on live-master.fsf.org fidone
Set the password for the source user from the live-master icecast server.
Execute like so:
./low-res-scaling-480p.sh stream-room-neptune# for audio:./low-res-scaling-480p.sh stream-room-neptune --audio
This script should run on a server such as lowres0p.fsf.org during theconference. This lowers our bandwidth, and reduces load on streamers.