Skip to content

Instantly share code, notes, and snippets.

@fingul
fingul / dash-avc264 command lines
Created May 31, 2017 15:41 — forked from ddennedy/dash-avc264 command lines
Use ffmpeg and mp4box to prepare DASH-AVC/264 v1.0 VoD
See my DASH-IF presentation from October, 2014:
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/
1. encode multiple bitrates with keyframe alignment:
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012.
@fingul
fingul / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created May 5, 2017 23:02 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@fingul
fingul / grafana.rb
Last active November 29, 2016 03:39
grafana build from source
#brew install https://raw.github.com/gist/3072321/meteor.rb
require "language/node"
class Grafana < Formula
desc "Gorgeous metric visualizations and dashboards for timeseries databases."
homepage "http://grafana.org"
url "https://github.com/grafana/grafana/archive/v4.0.0-beta2.zip"
#sha256 "77bff57f02e507fb998d6d2492798801db4cb10c82c1378e32bd1dde963dba3d"
head "https://github.com/grafana/grafana.git"

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

@fingul
fingul / gulpfile.js
Created September 26, 2015 00:41 — forked from soin08/gulpfile.js
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
//Based on gulpfile.js from Google Web Starter Kit.
//https://github.com/google/web-starter-kit
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
@fingul
fingul / winenv.py
Created February 14, 2014 16:18 — forked from ssokolow/winenv.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Helpers for automating the process of setting up ported Linux/UNIX
applications which were designed with expectations like being in $PATH.
@note: Basic functionality requires only the Python standard library.
Some functions and methods also require the PyWin32 package.
@note: A much more verbose "sudo for Windows" implementation (BSD-licensed)
@fingul
fingul / tmux.conf
Created January 1, 2014 04:24 — forked from shinzui/tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@fingul
fingul / hidpi.txt
Created June 20, 2013 17:45 — forked from simX/hidpi.txt
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
using System.Security.Cryptography;
class Program
{
static void Main(string[] args)
{
var privatekey = "RN4nog0661VvjzphNg48372t747365mNfSxirueSDYstqsqeQn?=";
var skey = "e99308c2e3373fb041775a0c813f397d";
var c = new Program();
var encrypted = c.crypto(skey, privatekey, "encrypt");
@fingul
fingul / install-scribed.sh
Created December 28, 2011 10:31 — forked from lox/install-scribed.sh
This is the process for installing Thrift, Scribed and the php extension on Ubuntu
#!/bin/bash
# This is the process for installing Thrift, Scribed and the php extension on Ubuntu
# [email protected]
# install dependancies
sudo apt-get install -y libboost1.42-all-dev libevent-dev build-essential flex bison libtool libevent-dev php5-dev pkg-config
alias make="make -j 4"
# install thrift from source