Skip to content

Instantly share code, notes, and snippets.

View rgorsuch's full-sized avatar

Ryan Gorsuch rgorsuch

View GitHub Profile
@rgorsuch
rgorsuch / encoding-video.md
Created February 1, 2018 18:18 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
package http_test
import (
"encoding/json"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"strings"
"testing"
package main
// This is a one-file boil-down of github.com/k0kubun/pp + github.com/mattn/go-colorable.
// It can do terminal coloring and pretty printing for ease of use in repl.it
// Paste it into a file in your repl.it and then use it like this, no import necessary.
//
// func main() {
// pp.Println(struct{ message, whom string }{
// message: "Hello", whom: "World"},
// )
package main
import (
"fmt"
"log"
"net/http"
)
const response = `{
"queryID": 42,