Streaming what is on your desktop

See also:

You might need to stream everything happening in you desktop.

You would need to use a Debian based distro and install these packages:

sudo apt install ffmpeg pulseaudio-utils 

Next, create a configuration file called .config/stream-desktop and add the following to it (change as needed):

# This file is sourced by the stream-desktop script

# Set output device. Use the command: `pactl list sources | grep alsa_output` to find the
# right one. If you have a USB headset or some other device, it might not be the alsa device
# that is the active one.

# Set the icecast server URL, including password. 

# Set your screen dimensions. For performance reasons I am keeping it very low.
# If you want to set it to your maximum resolution for your monitor, you can
# find your dimensions with: `xdpyinfo | awk '/dimensions:/ { print $2; exit }'`

# video bits is the main quality marker. .15M seems the lowest you can go without
# sacrificing too much quality. 1.5M gives really good video quality, but doesn't
# play too well.

name="May First/People Link"
description="MF/PL annual Membership Meeting"

Lastly, create a file called stream-desktop in your ~/bin directory and add the following:


if [ ! -f "$config_file" ]; then
  printf "Please create the file %s and set all configuration parameters.\n" "$config_file"
  exit 1
source "$config_file"

ffmpeg -loglevel info \
  -f x11grab -show_region 1 -thread_queue_size 32 -video_size "$dimensions" -framerate 30 -i :0.0  \
  -f pulse  -i "$output" \
  -f webm -af aresample=async=1 -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm \
  -c:a libvorbis -b:a 96K \
  -c:v libvpx -b:v "$video_bits" -crf 30 -g 30 -deadline good -threads 3 \
Last modified 3 years ago Last modified on Nov 15, 2018, 9:06:01 AM