LibrePlanet: Conference/2015/Streaming

From LibrePlanet
Jump to: navigation, search
(update detailed equipment list + create 'Future work' subsection)
Line 1: Line 1:
= <span style="color:#FFFFFF; background:red"> THIS PAGE IS A WORK IN PROGRESS</span> =
+
==Equipment Template — 3-Room Simultaneous Desktop + In-Room Streaming==
 +
===Camera===
 +
*(3×) Elphel NC353L Camera + C/CS lens adapter ring in-place
 +
*(3×) Tycon POE-INJ-LED-S Shielded POE Inserter with Power & Current LEDS
 +
*(3×) Antec SNP90 Slim Notbook Power Adapter + "blue" tip
 +
*(3×) 6' Belkin Premium Cat5e Networking Cable (flat/snagless)
 +
*(3×) Universal lithium-ion power pack (generic) + charging cables (camera+router battery backup) ['''TODO''': discontinued, find replacement item]
  
We will be updating this page in the coming days after the conference.
 
  
== Equipment Used ==
+
*(3×) One of the following lenses:
 +
**Fujinon HF12.5SA-1 2/3" 12.5mm fixed focal lens (5 megapixel, c-mount)
 +
**Fujinon DV3.4x3.8SA-1 3.8-13mm vari-focal lens (3 megapixel, c-mount)
 +
**Computar E3Z4518CS-MPIR 5MP Full HD IR Varifocal Lens, 4.5-13.2mm (5 megapixel, c*s*-mount ) (boderline unsuitable for low-lighting conditions)
 +
**C-mount <-> Canon EF/EF-S Adapter + manual or manual-option Canon lens of your choice (slight loss in pixel definition)
 +
*(1×) Lens cloth + protective case
  
=== Video ===
 
* 1x Elphel 353 (http://elphel.com)
 
* 1x Camera Stand
 
  
=== Audio ===
+
*(3×) Dolica Proline AX620B100 Tripod –or– (3×) SystemPro "The Clamper" Jr.
* 2x XLR Microphones
 
* 2x Microphone Stands
 
* 1x Behringer QXENYX1002 USB sound board
 
* 4x XLR cables
 
* 2x 6.35mm male to XLR female adapter
 
  
=== Streaming and Capture ===
+
<br />
* 1x X200 Thinkpad (with LibreBoot, http://libreboot.org)
+
===Laptop===
* 1x Streaming Server (Virtual Machine)
+
*(6×) Lenovo x200, Libreboot'd + Open Video Reference Build
** 250GB SSD
+
::Non-ancient layer of thermal paste under CPU heatsink, well-dusted exhaust fan
** 4GB RAM
+
::4GB of fast memory, matching modules
 +
::>60GB hard drive, SSD preferred (8 hrs = ~50GB video file)
 +
::Non-dead battery, no loose power jack connections or similar problems
  
=== ScreenCast ===
+
<br />
* 1x X200 Thinkpad (with LibreBoot, http://libreboot.org)
+
===Audio===
** 250GB SSD
+
*(3×) Ifrogz EarPollution Plugz earbuds + single-use alcohol cleansing pads
** 4GB RAM
+
*(3x) ['''TODO''': Find model #] XLR->USB adapter (encoding station sound capture)  
 +
*(6x) 4' USB 2.0 A/B cable
 +
*(3x) TRS (tip ''ring'' sleeve) <->"male XLR" adapters
  
 +
 +
*(3×) Dolica Proline AX620B100 Tripod (mic stand – unscrew ball head)
 +
*(3x) Ultimate Support ULTI-BOOM-TB Telescopic Mic Boom
 +
 +
 +
*(3x) ['''TODO''': Research suitable devices for digital-audio XLR-out from podium laptops]
 +
*(3×) 15' XLR cables for balanced-audio out from podium laptop
 +
*(3x) ['''TODO''': Add podium mic stand model numbers]
 +
 +
 +
Some combination of the following:
 +
*(3×) Behringer QXENYX1002 USB sound board ['''TODO''': evaluate alternative boards]
 +
*(6-9x) ['''TODO''': Add handheld Audio Technica mic model numbers]
 +
*(3x) XLR<->XLR "male-to-male" adapter
 +
*(3x) XLR<->XLR "female-to-female" adapter
 +
*(6×) 15' XLR cables, good condition
 +
*(3x) Audio-Technica AT8202 Adjustable Inline Attenuator ("padders") (optional -- convert from line-level to mic-level)
 +
 +
<br />
 +
===General===
 +
*(3×) 14' Belkin Premium Cat5e Networking Cable (flat/snagless cable, black) (front-of-room to encoding station)
 +
*(3×) 5-Port Gigabit Ethernet Switch ['''TODO''': find model number]
 +
*(3×) 15' Heavy-guage extension cord, orange
 +
*(3×) Power Sentry 5-Outlet Powersquid
 +
*(3x) Equipment transport bins, clear plastic, snap-shut lid, ~20" x ~15"
 +
*(3×) 9" LED-lighted 3-prong extenion cord (for tight spaces)
 +
*(1×) Label maker
 +
*(1×) Victorinox 54525 pocketknife, black
 +
*(1×) Energizer Aluminum Alloy Waterproof Lithium LED Flashlight
 +
*(1×) 30 yd. Gaffers Tape, black ("tape everything!")
 +
*(1×) Cooper Lighting PQS2504IN1 250W Halogen 4-in-1 Worklight (w/ 150w halogen bulb) (makeshift high-intensity room light)
 +
 +
<br />
 
== Software Used ==
 
== Software Used ==
  
 +
<br />
 
=== Streaming Server ===
 
=== Streaming Server ===
  
 
* IceCast2 2.4.1
 
* IceCast2 2.4.1
  
 +
<br />
 
=== Streaming Clients ===
 
=== Streaming Clients ===
  
The following software was compiled and installed via the OpenVideo Reference Build project (https://gitorious.org/openvideo_reference_build) on Trisquel 7 GNU/Linux (https://trisquel.info).
+
The following software was compiled and installed via the [https://gitorious.org/openvideo_reference_build 'Open Video Reference Build'] project on [https://trisquel.info Trisquel 7 GNU/Linux].
  
* GStreamer (http://gstreamer.freedesktop.org/)
+
* [http://gstreamer.freedesktop.org/ GStreamer]
* Jack Audio Server (http://jackaudio.org/)
+
* [http://jackaudio.org/ Jack Audio Server]
* (need to add the rest)
+
* ['''TODO''': add the rest]
  
 +
<br />
 
== Set up ==
 
== Set up ==
  
 +
<br />
 
=== Camera ===
 
=== Camera ===
  
Line 56: Line 99:
 
At this point you should have have the Elphel 353 camera attached to a tripod, powered on, with the network connection physically setup.
 
At this point you should have have the Elphel 353 camera attached to a tripod, powered on, with the network connection physically setup.
  
 +
<br />
 
== Our GStreamer Pipeline ==
 
== Our GStreamer Pipeline ==
  
Line 66: Line 110:
 
* slides_mountpoint - IceCast2 mountpoint for the slides
 
* slides_mountpoint - IceCast2 mountpoint for the slides
  
 +
<br />
 
=== Audio/Video ===  
 
=== Audio/Video ===  
 
<code>
 
<code>
gst-launch-1.0 -e rtspsrc location=rtsp://192.168.48.2:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=16/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name="GStreamer Input" !  audio/x-raw,rate=48000,channels=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=speaker_mountpoint`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=live.example.com port=80 password=examplepassword mount=/speaker_mountpoint.ogv halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink
+
gst-launch-1.0 -e rtspsrc location=rtsp://192.168.48.2:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=14/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name="GStreamer Input" !  audio/x-raw,rate=48000,channels=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=speaker_mountpoint`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=live.example.com port=80 password=examplepassword mount=/speaker_mountpoint.ogv halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink
 
</code>
 
</code>
  
 +
<br />
 
=== Slides/Screencast ===
 
=== Slides/Screencast ===
  
Line 77: Line 123:
 
</code>
 
</code>
  
 +
<br />
 
== Web Frontend ==
 
== Web Frontend ==
  
The [http://libreplanet.org/2015/live live stream web client] was written using [https://lhorie.github.io/mithril/ MithrilJS].  This interface depends on Icecast >= 2.4.0 for the JSON statistics API.  See [https://vcs.fsf.org/?p=libreplanet-static.git;a=blob;f=2015/assets/js/stream.js here] for the source code.
+
The [http://libreplanet.org/2015/live live stream web client] was written using [https://lhorie.github.io/mithril/ MithrilJS].  This interface depends on Icecast >= 2.4.0 for the JSON statistics API.  [https://vcs.fsf.org/?p=libreplanet-static.git;a=blob;f=2015/assets/js/stream.js Source code.]
 +
 
 +
Additionally, a LibreJS-compatible fork of the [https://kiwiirc.com/ KiwiIRC] client was embedded onto the page. [https://vcs.fsf.org/?p=KiwiIRC.git Source code.]
  
Additionally, a LibreJS-compatible fork of the [https://kiwiirc.com/ KiwiIRC] client was embedded onto the page. See [https://vcs.fsf.org/?p=KiwiIRC.git here] for the source code.
+
<br />
 +
== Future work ==
 +
*The in-room streaming X200's are operating at near-100% CPU utilization, limiting the final streaming framerate to 14FPS (18FPS preferred).  Evaluate stream stability operating at 18FPS after building GCC from source; alternatively, port X201-series laptops to [http://www.libreboot.org/ Libreboot].
 +
*Provide [http://www.vorbis.com/ Vorbis-only] and/or [https://www.opus-codec.org/ Opus-only] audio streams, CPU overhead permitting.
 +
*Provide instructions for Icecast relays and bandwidth sharing.
 +
*Evaluate Icecast stability under load with HTTPS and low-FPS Theora streams; bare metal hardware might be necessary.
 +
*Integrate &lt;video&gt; element repositioning via [https://jqueryui.com/draggable/ jQuery Draggable]
 +
*File and bug reports for in-browser playback (''esp.'' Mozilla Firefox-based browsers); watch for regressions and provide patches
 +
:['''TODO''': list specific bugs here for tracking]

Revision as of 21:03, 5 April 2015

Equipment Template — 3-Room Simultaneous Desktop + In-Room Streaming

Camera

  • (3×) Elphel NC353L Camera + C/CS lens adapter ring in-place
  • (3×) Tycon POE-INJ-LED-S Shielded POE Inserter with Power & Current LEDS
  • (3×) Antec SNP90 Slim Notbook Power Adapter + "blue" tip
  • (3×) 6' Belkin Premium Cat5e Networking Cable (flat/snagless)
  • (3×) Universal lithium-ion power pack (generic) + charging cables (camera+router battery backup) [TODO: discontinued, find replacement item]


  • (3×) One of the following lenses:
    • Fujinon HF12.5SA-1 2/3" 12.5mm fixed focal lens (5 megapixel, c-mount)
    • Fujinon DV3.4x3.8SA-1 3.8-13mm vari-focal lens (3 megapixel, c-mount)
    • Computar E3Z4518CS-MPIR 5MP Full HD IR Varifocal Lens, 4.5-13.2mm (5 megapixel, c*s*-mount ) (boderline unsuitable for low-lighting conditions)
    • C-mount <-> Canon EF/EF-S Adapter + manual or manual-option Canon lens of your choice (slight loss in pixel definition)
  • (1×) Lens cloth + protective case


  • (3×) Dolica Proline AX620B100 Tripod –or– (3×) SystemPro "The Clamper" Jr.


Laptop

  • (6×) Lenovo x200, Libreboot'd + Open Video Reference Build
Non-ancient layer of thermal paste under CPU heatsink, well-dusted exhaust fan
4GB of fast memory, matching modules
>60GB hard drive, SSD preferred (8 hrs = ~50GB video file)
Non-dead battery, no loose power jack connections or similar problems


Audio

  • (3×) Ifrogz EarPollution Plugz earbuds + single-use alcohol cleansing pads
  • (3x) [TODO: Find model #] XLR->USB adapter (encoding station sound capture)
  • (6x) 4' USB 2.0 A/B cable
  • (3x) TRS (tip ring sleeve) <->"male XLR" adapters


  • (3×) Dolica Proline AX620B100 Tripod (mic stand – unscrew ball head)
  • (3x) Ultimate Support ULTI-BOOM-TB Telescopic Mic Boom


  • (3x) [TODO: Research suitable devices for digital-audio XLR-out from podium laptops]
  • (3×) 15' XLR cables for balanced-audio out from podium laptop
  • (3x) [TODO: Add podium mic stand model numbers]


Some combination of the following:

  • (3×) Behringer QXENYX1002 USB sound board [TODO: evaluate alternative boards]
  • (6-9x) [TODO: Add handheld Audio Technica mic model numbers]
  • (3x) XLR<->XLR "male-to-male" adapter
  • (3x) XLR<->XLR "female-to-female" adapter
  • (6×) 15' XLR cables, good condition
  • (3x) Audio-Technica AT8202 Adjustable Inline Attenuator ("padders") (optional -- convert from line-level to mic-level)


General

  • (3×) 14' Belkin Premium Cat5e Networking Cable (flat/snagless cable, black) (front-of-room to encoding station)
  • (3×) 5-Port Gigabit Ethernet Switch [TODO: find model number]
  • (3×) 15' Heavy-guage extension cord, orange
  • (3×) Power Sentry 5-Outlet Powersquid
  • (3x) Equipment transport bins, clear plastic, snap-shut lid, ~20" x ~15"
  • (3×) 9" LED-lighted 3-prong extenion cord (for tight spaces)
  • (1×) Label maker
  • (1×) Victorinox 54525 pocketknife, black
  • (1×) Energizer Aluminum Alloy Waterproof Lithium LED Flashlight
  • (1×) 30 yd. Gaffers Tape, black ("tape everything!")
  • (1×) Cooper Lighting PQS2504IN1 250W Halogen 4-in-1 Worklight (w/ 150w halogen bulb) (makeshift high-intensity room light)


Software Used


Streaming Server

  • IceCast2 2.4.1


Streaming Clients

The following software was compiled and installed via the 'Open Video Reference Build' project on Trisquel 7 GNU/Linux.


Set up


Camera

  • Unpack the gigabit switch
  • Plug the switch into the mains
  • Use an ethernet cable to plug the switch into the local network of the site.
  • Unpack Elphel 353 camera and attach it to the tripod.
  • Attach an ethernet cable into the RJ-45 connector on the camera
  • Plug the other end of the cable into the PoE injector.
  • Plug the PoE injector into the switch
  • Plug the PoE injector into the mains

At this point you should have have the Elphel 353 camera attached to a tripod, powered on, with the network connection physically setup.


Our GStreamer Pipeline

In this example please repalce the following with your own information:

  • 192.168.48.2 - IP Address of camera
  • live.example.com - IceCast2 server address
  • examplepassword - IceCast2 password
  • speaker_mountpoint - IceCast2 mountpoint and local sink filename for the speaker audio/video feed
  • slides_mountpoint - IceCast2 mountpoint for the slides


Audio/Video

gst-launch-1.0 -e rtspsrc location=rtsp://192.168.48.2:554 latency=100 ! queue max-size-bytes=100000000 max-size-time=0 ! rtpjpegdepay ! queue max-size-bytes=100000000 max-size-time=0 ! jpegdec max-errors=-1 ! queue max-size-bytes=100000000 max-size-time=0 ! videorate ! video/x-raw,framerate=14/1 ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1296, height=560 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=halfres ! queue max-size-bytes=100000000 max-size-time=0 ! jpegenc idct-method=2 ! queue max-size-bytes=100000000 max-size-time=0 ! matroskamux name=mux jackaudiosrc connect=1 client-name="GStreamer Input" ! audio/x-raw,rate=48000,channels=1 ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=jackaudio ! queue max-size-bytes=100000000 max-size-time=0 ! vorbisenc ! queue max-size-bytes=100000000 max-size-time=0 ! tee name=vorbisaudio ! queue max-size-bytes=100000000 max-size-time=0 ! mux. mux. ! queue max-size-bytes=100000000 max-size-time=0 ! filesink location=speaker_mountpoint`date +%s`.mkv sync=false halfres. ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw,width=648, height=280 ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 speed-level=1 ! queue max-size-bytes=100000000 max-size-time=0  ! oggmux name=livestream vorbisaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! livestream. livestream. ! queue max-size-bytes=0 max-size-time=0 ! shout2send ip=live.example.com port=80 password=examplepassword mount=/speaker_mountpoint.ogv halfres. ! videoscale add-borders=true ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! xvimagesink sync=false jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 jackaudio. ! queue max-size-bytes=100000000 max-size-time=0 ! audioconvert ! queue max-size-bytes=100000000 max-size-time=0 ! alsasink


Slides/Screencast

gst-launch-1.0 --eos-on-shutdown ximagesrc use_damage=false ! capsfilter caps=video/x-raw,framerate=4/1,width=1280,height=800  ! queue max-size-bytes=100000000 max-size-time=0 ! videoscale ! video/x-raw, width=1056, height=660 ! queue max-size-bytes=100000000 max-size-time=0 ! videoconvert ! queue max-size-bytes=100000000 max-size-time=0 ! theoraenc bitrate=400 keyframe-auto=false keyframe-force=12 keyframe-freq=12 speed-level=1 drop-frames=false ! queue max-size-bytes=100000000 max-size-time=0 ! oggmux ! queue max-size-bytes=100000000 max-size-time=0 ! shout2send ip=live.example.com port=80 password=examplepassword mount=/slides-mountpoint.ogv


Web Frontend

The live stream web client was written using MithrilJS. This interface depends on Icecast >= 2.4.0 for the JSON statistics API. Source code.

Additionally, a LibreJS-compatible fork of the KiwiIRC client was embedded onto the page. Source code.


Future work

  • The in-room streaming X200's are operating at near-100% CPU utilization, limiting the final streaming framerate to 14FPS (18FPS preferred). Evaluate stream stability operating at 18FPS after building GCC from source; alternatively, port X201-series laptops to Libreboot.
  • Provide Vorbis-only and/or Opus-only audio streams, CPU overhead permitting.
  • Provide instructions for Icecast relays and bandwidth sharing.
  • Evaluate Icecast stability under load with HTTPS and low-FPS Theora streams; bare metal hardware might be necessary.
  • Integrate <video> element repositioning via jQuery Draggable
  • File and bug reports for in-browser playback (esp. Mozilla Firefox-based browsers); watch for regressions and provide patches
[TODO: list specific bugs here for tracking]