Skip to content

Instantly share code, notes, and snippets.

@DusanBrejka
Forked from jedi4ever/Reseach Livestream.md
Created February 19, 2020 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DusanBrejka/605e13ec860a1f854eb8dfbe43b1bedf to your computer and use it in GitHub Desktop.
Save DusanBrejka/605e13ec860a1f854eb8dfbe43b1bedf to your computer and use it in GitHub Desktop.

These are notes while researching a way to convert a browser/website to a stream. This could be used for Facebook Live or for webrecording. TL'DR:

  • I started with Phantomjs - but that didn't support the html5 video tag
  • SlimerJS supports it, but there is no way to record audio directly (though this might come from desktop audio)
  • So I moved to research ffmpeg/X11/XVFB to record it with linux which works
  • But ffmpeg has no easy way to mix streams/overlays to I moved on to OBS with overlay browser support
  • I started researching options OBS in docker and it needed best a GPU , so I move to nvidia-docker
  • And so came across building game servers on EC2/AWS using GPUs and managed to run OBS inside of GPU g2x.large machine
  • I tried streaming to twich , which works great and managed to restream 4K 60FPS youtube on an AWS instance
  • Remote control works through OBS-Remote but OBS has kinda limit in types of features
  • Xsplit (some JS automation), Wirecast (no automation found, besides keypresses) , Livestream.com (non-scriptable) and found Vmix.com which an API (but costs 799$)
  • For Overlaying systems , nodeCG looks nice
  • Sending RTMP to FBlive and periscope works fine
  • Looked into redundancy for RTMP as FBLive ends the post/stream when the stream ends (options are ffmpeg UDP switch over and zencode RTMP ping)
  • For CDN still looking livestream.com vs Cloudfront/Fastly with their HLS setup
  • Possibly use restream.io to send it to multiple feeds.

To be continued.

Phantomjs:

Slimerjs:

XVFB linux recording:

Docker/X11/GPU:

Setup windows EC2/GPU/OBS:

Setup linux/GPU:

OBS:

Controlling OBS from remote:

Overlay systems:

Livestream control:

Xsplit control:

Vmix Scripting:

CDN:

RTMP:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment