Skip to content

Instantly share code, notes, and snippets.

View bugre's full-sized avatar

Werner [wm] bugre

  • South Brazil
View GitHub Profile

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

@bugre
bugre / build-tmux.sh
Created July 21, 2019 17:44 — forked from cisano-arelia/build-tmux.sh
Script to build a static tmux for CoreOS
#!/usr/bin/env bash
#Author: https://groups.google.com/forum/#!topic/coreos-dev/JAeABXnQzuE
pushd $(dirname $0) > /dev/null; CURRABSPATH=$(readlink -nf "$(pwd)"); popd > /dev/null; # Get the directory in which the script resides
set -x
MUSLPKG="musl:musl.tgz:http://www.musl-libc.org/releases/musl-1.1.14.tar.gz"
LEVTPKG="libevent:libevent2.tgz:https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz"
TMUXPKG="tmux:tmux.tgz:https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
NCRSPKG="ncurses:ncurses.tgz:http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz"
TEMPDIR="$CURRABSPATH/tmp"
TMPLIB="tempinstall/lib"
@bugre
bugre / format.json
Created October 14, 2019 21:40 — forked from apeckham/format.json
fastly json log format
{
"service_id":"%{req.service_id}V",
"service_version":"%{fastly_info.version}V",
"time_start":%{begin:msec}t,
"time_end":%{end:msec}t,
"time_elapsed":%{time.elapsed.usec}V,
"client_ip":"%{req.http.Fastly-Client-IP}V",
"request":"%{req.request}V",
"protocol":"%{req.proto}V",
"host":"%{req.http.Fastly-Orig-Host}V",
@bugre
bugre / Time-based-auto-scaling-on-fargate.md
Created February 2, 2020 21:16 — forked from toricls/Time-based-auto-scaling-on-fargate.md
Example: Time-based Auto Scaling on Amazon ECS + AWS Fargate

Set parameters

$ export ECS_CLUSTER_NAME={YOUR_ECS_CLUSTER_NAME}
$ export ECS_SERVICE_NAME={YOUR_ECS_SERVICE_NAME}

RegisterScalableTarget

# ## may fail because no apt-tansport-https... go ahead.
# sudo apt-get update
# sudo apt-get dist-upgrade -y
# requires apt-transport-https
sudo apt-get install apt-transport-https -y
# get docker apt repo
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo "deb https://apt.dockerproject.org/repo debian-jessie main" | sudo tee /etc/apt/sources.list.d/docker.list
@bugre
bugre / CSCubeBGRA.cc
Created September 22, 2020 13:54 — forked from victusfate/CSCubeBGRA.cc
decode a video with libav/ffmpeg
#include "CSCubeBGRA.h""
#include <sstream>
#include <cmath>
int getNearestIndexForTime(const vector<double> &times, double rTime)
{
// binary search
// returns an iterator pointing to the first element in the range [first,last) which does not compare less than val.
auto pFrameIndex = lower_bound(times.begin(),times.end(),rTime);
@bugre
bugre / project.json
Created January 5, 2021 09:41 — forked from TsuyoshiUshio/project.json
Storage migration from Google Cloud Storage to Azure with Async/Await
{
"frameworks": {
"net46":{
"dependencies": {
"Google.Cloud.Storage.V1": "1.0.0-beta05"
}
}
}
}
@bugre
bugre / clean-dedup-bash-history.sh
Last active March 2, 2022 00:42
Bash history deduplicate / simplify / cleanup
## ATTENTION: Complete purges history.. make a backup if you want..
# Clear bash history file and loaded history.
> ~/.bash_history && history -c
## deduplicate
## add to ~/.bashrc && ~/.bash_profile
HISTCONTROL=ignoreboth:erasedups
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=50000
@bugre
bugre / README.md
Created March 2, 2022 02:11 — forked from mikoim/README.md
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@bugre
bugre / ubuntu-racadm-install.sh
Last active March 20, 2023 19:19
Ubuntu (20.04) install racadm and ipmitool
sudo apt-get install gpg libssl-dev
## the default "sudo gpg --keyserver pool.sks-keyservers.net --recv-key 1285491434D8786F" fails.. pool.sks-keyservers.net is having problems...
gpg --keyserver keyserver.ubuntu.com --recv-key 1285491434D8786F && gpg -a --export 1285491434D8786F | sudo apt-key add -
echo 'deb http://linux.dell.com/repo/community/openmanage/932/bionic bionic main' | sudo tee -a /etc/apt/sources.list.d/linux.dell.com.sources.list
sudo apt-get update
sudo apt-get install srvadmin-idracadm8
sudo apt install ipmitool