Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / gist:d095656ae0f0eca4a83ebb2b331da367
Last active January 11, 2024 22:01
Chromium build with proprietary codecs
Topics:
- design
- frontend (react ~)
- mobile app (ios/android/...)
- VR
- iot (alexa, arduino, ...
- testing
- continuous delivery (artefact, versioning,...)
- serverless/containers/cloud
- ai stuff

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
@jedi4ever
jedi4ever / readme.md
Created January 13, 2017 15:03 — forked from vizath/readme.md
SlimerJS on AWS EC2 with webgl support

There is not a lot of doc or posts about making an headless renderer with webgl support. Here are few of my findings

I tried things on Heroku, but I was not able to make anything work.

Next, I tried EC2 t2.micro, only to find out that OpenGL needs a graphic card to execute (sure, there are things like mesa that I didn't tried, but it looked like I needed to build Chrome and I didn't want to go that way).

The only easy solution that I found was AWS EC2 GPU Instances. They are pretty much overpriced for what I'm trying to acheive, but it worked. You need to use an AMI that support the Nvidia GRID thing. eg https://aws.amazon.com/marketplace/pp/B00FYCDDTE and its CentOS.

Slimer need Firefox and Firefox need shared libraries that we need to install (we will use a custom repo).

@jedi4ever
jedi4ever / gist:e2e621a4f3f22a8b9f591e398e1e1881
Created November 3, 2016 21:22
activate fabric from the CLI
fabric-activate: clean simulator-build
-xcrun simctl terminate 6A6D30C8-AA08-4A55-A95A-0D5983AE33B2 $(BUNDLE_ID)
-xcrun simctl shutdown 6A6D30C8-AA08-4A55-A95A-0D5983AE33B2
-xcrun simctl erase 6A6D30C8-AA08-4A55-A95A-0D5983AE33B2
-xcrun simctl boot 6A6D30C8-AA08-4A55-A95A-0D5983AE33B2
-xcrun simctl install 6A6D30C8-AA08-4A55-A95A-0D5983AE33B2 $(XCODE_APP_FILE)
-xcrun simctl launch 6A6D30C8-AA08-4A55-A95A-0D5983AE33B2 $(BUNDLE_ID)
@jedi4ever
jedi4ever / index.js
Created December 6, 2015 18:07 — forked from joshhunt/index.js
Socket.io live reload for Apple TV TVML app
import 'babel-polyfill';
import firstView from 'views/first';
import * as liveReload from 'lib/liveReload';
App.onLaunch((launchOptions) => {
firstView();
liveReload.connect(launchOptions);
});
@jedi4ever
jedi4ever / floatsign.sh
Last active August 29, 2015 14:26 — forked from mediabounds/floatsign.sh
A small bash script to re-sign iOS applications.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
Created vm ubuntu 14.04
Tried installing via apt-get install youtube-dl
- kept getting errors on Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>
- this is a bug when using python2 (default on ubuntu)
- So remove the apt package
Install via pip:
- apt-get install pip
- alias python=`/usr/bin/python3`
- pip install youtube-dl
@jedi4ever
jedi4ever / gist:b6013f313aacdac844bf
Created May 19, 2015 11:53
redis - redis sentinel - docker setup
#!/bin/bash
DOCKER_IP=$(ip addr show docker0|grep "inet "|sed -e 's/^[ ]*//g'| cut -d ' ' -f 2| cut -d '/' -f 1)
docker stop redis_0
docker stop redis_1
docker stop sentinel_0
docker stop sentinel_1
docker stop sentinel_2