<span class="latin" style="width:19px;height:19px;">L</span><span class="latin" style="width:19px;height:19px;">i</span><span class="latin" style="width:19px;height:19px;">b</span><span class="latin" style="width:19px;height:19px;">r</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">P</span><span class="latin" style="width:19px;height:19px;">l</span><span class="latin" style="width:19px;height:19px;">a</span><span class="latin" style="width:19px;height:19px;">n</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">t</span><span class="latin" style="width:19px;height:19px;">:</span><span class="latin" style="width:19px;height:19px;">C</span><span class="latin" style="width:19px;height:19px;">o</span><span class="latin" style="width:19px;height:19px;">n</span><span class="latin" style="width:19px;height:19px;">f</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">r</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">n</span><span class="latin" style="width:19px;height:19px;">c</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">/</span><span class="latin" style="width:19px;height:19px;">2</span><span class="latin" style="width:19px;height:19px;">0</span><span class="latin" style="width:19px;height:19px;">1</span><span class="latin" style="width:19px;height:19px;">7</span><span class="latin" style="width:19px;height:19px;">/</span><span class="latin" style="width:19px;height:19px;">S</span><span class="latin" style="width:19px;height:19px;">t</span><span class="latin" style="width:19px;height:19px;">r</span></span><span class="tktr-gyo" style="height:640px;margin:0 0 180px 22px;font-size:19px;_width:19px;/width:19px;"><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">a</span><span class="latin" style="width:19px;height:19px;">m</span><span class="latin" style="width:19px;height:19px;">i</span><span class="latin" style="width:19px;height:19px;">n</span><span class="latin" style="width:19px;height:19px;">g</span><span class="latin" style="display:block;width:19px;height:19px;"> </span><span class="latin" style="width:19px;height:19px;">-</span><span class="latin" style="display:block;width:19px;height:19px;"> </span><span class="latin" style="width:19px;height:19px;">L</span><span class="latin" style="width:19px;height:19px;">i</span><span class="latin" style="width:19px;height:19px;">b</span><span class="latin" style="width:19px;height:19px;">r</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">P</span><span class="latin" style="width:19px;height:19px;">l</span><span class="latin" style="width:19px;height:19px;">a</span><span class="latin" style="width:19px;height:19px;">n</span><span class="latin" style="width:19px;height:19px;">e</span><span class="latin" style="width:19px;height:19px;">t</span>  

Navigation menu




LibrePlanet


About 
About LibrePlanet
Mission Statement
Founding documents
Support this Community
Code of Conduct
Anti-harassment policy
Teams 
Activists
Wiki Helpers
LibrePlanet Artists
FSF Community Team
Local & Student Teams
Conferences 
LibrePlanet Conference
Non-official
Get involved 
Participate
Discussion channels
Events
 


Login
 










LibrePlanet: Conference/2017/Streaming

 

From LibrePlanet

< LibrePlanet:Conference | 2017

Jump to: navigation, search  

Contents

  • 2 480p Scaling script
  • 3 Command to do the same with just audio
  • 4 Commands to set the webcam
  • Slides streaming script

    This script captures 1024x768 pixels from the top right screen (the projector screen). The screens can be configured in these three ways:

    #!/bin/bash
    
    BITRATE=500000
    MOUNT=room-141-slides.webm
    PASSWORD=pw
    FRAMERATE=10
    
    export DISPLAY=":0"
    
    while true; do
    
      unset XPARAMETERS
    
      if xdpyinfo|grep -i dimensions |grep 2304x800 -q; then
          XPARAMETERS="startx=1279 starty=0 endx=2303 endy=767"
      fi
      if xdpyinfo|grep -i dimensions |grep 2048x768 -q; then
          XPARAMETERS="startx=1023 starty=0 endx=2047 endy=767"
      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=1024, height=768 ! queue ! vp8enc target_bitrate=$BITRATE cpu-used=16 deadline=1 threads=2 keyframe-max-dist=$(expr $FRAMERATE \* 2) ! webmmux streamable=true ! shout2send ip=live2.fsf.org port=80 mount=$MOUNT password=$PASSWORD sync=false
    done
    

    480p Scaling script

    This takes a video that is being streamed at live*.fsf.org/video.webm, scales it down to 480p, and publishes it back as live*.fsf.org/video-480p.webm

    #!/bin/bash
    
    if [ $# != 1 ]; then
     echo usage $0 http://foo.bar/baz.webm
     exit 1
    fi
    
    BITRATE=500000
    URL=$1
    PASSWORD=pw
    
    MOUNT=$(echo $URL |sed 's=.*/==; s/.webm//')-480p.webm
    
    while true; do
      sleep 1
      if wget $URL -O - -q | grep . -q ; then
        gst-launch-1.0 -v souphttpsrc location=$URL ! decodebin ! videoconvert ! videoscale ! video/x-raw, width=853, height=480 ! queue ! vp8enc target_bitrate=$BITRATE cpu-used=16 deadline=1 threads=2 ! webmmux streamable=true ! shout2send ip=live2.fsf.org port=80 mount=$MOUNT password=$PASSWORD sync=false                                                                                                       
     
     else
        echo $URL is not live
      fi
    done
    

    Command to do the same with just audio

       gst-launch-1.0 -v souphttpsrc location=http://live2.fsf.org/test.webm ! matroskademux ! oggmux ! shout2send ip=live2.fsf.org port=80 mount=test.ogg password=pw sync=false
    

    Commands to set the webcam

    The following commands make use of v4l2-ctl, available in package v4l-utils.

    The following values are an initial template for a Logitech c930e camera. The two main values to tweak depending on the light quality of a specific room, are:

    #                     brightness (int)    : min=0 max=255 step=1 default=128 value=128
    #                       contrast (int)    : min=0 max=255 step=1 default=128 value=128
    #                     saturation (int)    : min=0 max=255 step=1 default=128 value=128
    # white_balance_temperature_auto (bool)   : default=1 value=1
    v4l2-ctl -c white_balance_temperature_auto=0
    #      white_balance_temperature (int)    : min=2000 max=7500 step=1 default=4000 value=4000 flags=inactive
    v4l2-ctl -c white_balance_temperature=4000
    #                      sharpness (int)    : min=0 max=255 step=1 default=128 value=128
    v4l2-ctl -c sharpness=170
    #         backlight_compensation (int)    : min=0 max=1 step=1 default=0 value=0
    #           power_line_frequency (menu)   : min=0 max=2 default=2 value=2
    #                  exposure_auto (menu)   : min=0 max=3 default=3 value=3
    v4l2-ctl -c exposure_auto=1
    #              exposure_absolute (int)    : min=3 max=2047 step=1 default=250 value=250 flags=inactive
    v4l2-ctl -c exposure_absolute=400
    #                           gain (int)    : min=0 max=255 step=1 default=0 value=0
    v4l2-ctl -c gain=60
    #         exposure_auto_priority (bool)   : default=0 value=1
    v4l2-ctl -c  exposure_auto_priority=0
    #                   pan_absolute (int)    : min=-36000 max=36000 step=3600 default=0 value=0
    #                  tilt_absolute (int)    : min=-36000 max=36000 step=3600 default=0 value=0
    #                 focus_absolute (int)    : min=0 max=255 step=5 default=0 value=0 flags=inactive
    v4l2-ctl -c focus_absolute=0
    #                     focus_auto (bool)   : default=1 value=1
    v4l2-ctl -c focus_auto=0
    #                  zoom_absolute (int)    : min=100 max=400 step=1 default=100 value=100
    #                      led1_mode (menu)   : min=0 max=3 default=0 value=3
    #                 led1_frequency (int)    : min=0 max=255 step=1 default=0 value=0
    
    Retrieved from "https://libreplanet.org/wiki?title=LibrePlanet:Conference/2017/Streaming&oldid=48257" 



















    FSF
    The Free Software Foundation (FSF) is a nonprofit with a worldwide mission to promote computer user freedom.

    We defend the rights of all software users. (Read more)
     



    Campaigns


    High Priority Free Software Projects

    Free JavaScript

    Secure Boot vs Restricted Boot

    GNU Operating System

    Defective by Design

    See all campaigns
     



    Get Involved



    Contact
     




    Send your feedback on our translations and new translations of pages to campaigns@fsf.org.

    Copyright © 20132023 Free Software Foundation, Inc.  Privacy Policy, JavaScript license information