Skip to content

Instantly share code, notes, and snippets.

View dougal's full-sized avatar

Douglas F Shearer dougal

View GitHub Profile
@ddennedy
ddennedy / dash-avc264 command lines
Last active July 27, 2022 03:44
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.
@tomaslin
tomaslin / Pivotal CSV to Trello.groovy
Created October 4, 2011 15:56
This is a groovy file ( http://groovy.codehaus.org/ ) that will import your Pivotal Tracker stories into your Trello board. It works with an empty board and will add stories to the first list.
@Grapes([
@Grab("org.codehaus.geb:geb-core:0.6.0"),
@Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.4.0"),
@Grab("net.sf.opencsv:opencsv:2.0")
])
import geb.Browser
import au.com.bytecode.opencsv.*
def fileLocation = 'secret_escapes_20111004_1436.csv' // the location of your csv file. You can go to your pivotal board and do an export to CSV.
# monkey patch heroku to replace rest-client with em-http-request
class Heroku::Client
def process(method, uri, extra_headers={}, payload=nil)
headers = heroku_headers.merge(extra_headers)
args = [method, payload, headers].compact
# begin HACK
# response = resource(uri).send(*args)
basic_auth = {'Authorization' => 'Basic ' +
["#{user}:#{password}"].pack('m').delete("\r\n")}
@palaniraja
palaniraja / HSBC.php
Created June 7, 2011 09:44
Class to process payment using HSBC gateway (HSBC CPI Payment)
<?php
/**
* @desc Class to process payment using HSBC gateway
* This class will return orderhash
* 18-Dec-2006
*/
class HSBC{
var $storeFrontId;
#!/usr/bin/env ruby
%w{rubygems hmac-sha1 base64 cgi net/https uri openssl}.each{ |f| require f }
KEY = '<YOUR KEY>';
SECRET = '<YOUR SECRET>';
# encodes strings that make twitter oauth happy
def encode( string )
URI.escape( string, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]") ).gsub('*', '%2A')
end