LibrePlanet: Conference/2019/Streaming

From LibrePlanet
Jump to: navigation, search
(Add links to icecast and hubangl)
Line 1: Line 1:
This year, we used [https://github.com/soonum/hubangl HUBAngl] to stream speakers and audio to [https://icecast.org/ Icecast]. We also used a gstreamer script to stream desktop streams.
+
This year, we used [https://github.com/soonum/hubangl HUBAngl] to stream speakers and audio to [https://icecast.org/ Icecast].  
 +
 
 +
We've been using this system with minor tweaks since LibrePlanet 2017, when we [https://www.fsf.org/blogs/sysadmin/free-software-video-streaming-hubangl-powered-libreplanet-2017 blogged about it]
 +
 
 +
We also used a gstreamer script to stream desktop streams:
  
 
<pre>
 
<pre>

Revision as of 11:50, 13 May 2019

This year, we used HUBAngl to stream speakers and audio to Icecast.

We've been using this system with minor tweaks since LibrePlanet 2017, when we blogged about it

We also used a gstreamer script to stream desktop streams:

#!/bin/bash

export DISPLAY=":0"

while true; do

  unset XPARAMETERS

  # native x200 resolution not supported

  # mirrored mode
  if xdpyinfo|grep -i dimensions |grep 1280x720 -q; then
      XPARAMETERS="startx=0 starty=0 endx=1279 endy=719"
  fi
  # dual mode
  if xdpyinfo|grep -i dimensions |grep 2560x720 -q; then
      XPARAMETERS="startx=1280 starty=0 endx=2559 endy=719"
  fi

  sleep 1
  gst-launch-1.0 -e ximagesrc $XPARAMETERS use-damage=false show-pointer=false ! videoconvert !  videorate ! video/x-raw,framerate=$FRAMERATE/1 ! videoscale ! video/x-raw, width=1280, height=720 ! queue ! vp8enc target_bitrate=$BITRATE cpu-used=16 deadline=1 threads=2 keyframe-max-dist=$(expr $FRAMERATE \* 2) ! webmmux streamable=true ! shout2send ip=live-master.fsf.org port=80 mount=$MOUNT password=$PASSWORD sync=false
done

We also used desktop shortcuts that ran the following scripts to change video resolution, and to set mirror / dual monitor modes:

#!/bin/bash

export DISPLAY=":0.0"

if (xrandr | grep -q "VGA1 disconnected" ); then
  echo "$0: error: failed to detect 2nd monitor in xrandr output. Doing nothing."
  exit 1
fi

if  ! ( xrandr | grep -q _LP); then
    xrandr --newmode "1280x720_60.00_LP"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync
    xrandr --addmode LVDS1 "1280x720_60.00_LP"
    xrandr --addmode VGA1 "1280x720_60.00_LP"
fi

if ( [ "1${1}1" = "1dual1" ]); then
    xrandr --output LVDS1 --mode 1280x720_60.00_LP --output VGA1 --mode 1280x720_60.00_LP --right-of LVDS1
else
    xrandr --output LVDS1 --mode 1280x720_60.00_LP --output VGA1 --same-as LVDS1
fi

echo Changed the screen settings, now restarting gstreamer
pkill gst-launch-1.0