Skip to content

Instantly share code, notes, and snippets.

View Laurian's full-sized avatar

Laurian Gridinoc Laurian

  • Creative Technologist ※ Knight-Mozilla OpenNews Fellow ※ Visual analytics × Computational Linguistics × Semantic Web
  • Cyberspace
  • X @gridinoc
View GitHub Profile

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@Laurian
Laurian / ffmpeg.sh
Created April 24, 2020 19:13 — forked from crookm/ffmpeg.sh
FFmpeg commands to create DASH and HLS
mkdir dash && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=426:240 -b:v 400k -r 30 -dash 1 dash/426x240-30-400k.webm && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=426:240 -b:v 600k -r 30 -dash 1 dash/426x240-30-600k.webm && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=640:360 -b:v 700k -r 30 -dash 1 dash/640x360-30-700k.webm && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=640:360 -b:v 900k -r 30 -dash 1 dash/640x360-30-900k.we
@Laurian
Laurian / 0_reuse_code.js
Created May 27, 2014 12:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
(function($) {
$.fn.oembed = function(url, options, callback) {
options = $.extend(true, $.fn.oembed.defaults, options);
return this.each(function() {
var container = $(this),
resourceURL = (url != null) ? url : container.attr("href"),
provider;
@Laurian
Laurian / index.html
Last active December 18, 2015 13:29 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var nodes = [{"label":"Christopher J Dennis"},{"label":"Bob Gonsalves"},{"label":"Bob Martinengo"},{"label":"Jeff Gomez"},{"label":"Frank Da Silva"},{"label":"Linda Nelson"},{"label":"Michael Bekemeyer"},{"label":"Christie Strong"},{"label":"Michele Simmons"},{"label":"Tom Marcinko"},{"label":"Jeff Norman"},{"label":"Jon Reiss"},{"label":"Elisabeth Holm"},{"label":"Travis Megill"},{"label":"John Paul Rice"},{"label":"Adisakdi Tantimedh"},{"label":"Tieg Zaharia"},{"label":"Nathan Loofbourrow"},{"label":"Erin Hoffman"},{"label":"Howard A. Rodman"},{"label":"Zetetics"},{"label":"Jeanne Veillette Bowerman"},{"label":"Brendon Fogle"},{"label":"Niki Anis Ab Karim"},{"label":"Tom Morton"},{"label":"Angela Shelton"},{"label":"Douglas Lain"},{"label":"Marcella Selbach"},{"label":"Flyway Film Festival"},{"label":"Mark Stolaroff"},{"label":"Joe Gold"},{"label":"Laurian Gridinoc"},{"label":"Bruce Murphy"},{"label"