Skip to content

Instantly share code, notes, and snippets.

View pierrextardif's full-sized avatar

pierre pierrextardif

View GitHub Profile
@aslushnikov
aslushnikov / win-compile-ffmpeg.md
Last active September 16, 2022 07:35
Windows: Compiling FFMPEG 4.3.1 with only LIBVPX and a few filters

Windows: Compiling FFMPEG 4.3.1 with only LIBVPX and a few filters

My goal was to compile minimal FFMPEG binary on Windows with the following properties:

  • is statically-linked
  • has jpeg decoder
  • has vp8 encoder
  • has a few enabled filters
  • both win32 and win64

Here's my log as of September 3, 2020.

@jvcleave
jvcleave / openframeworks jetson nano.txt
Last active March 1, 2023 10:10
openframeworks jetson nano instructions
Nightly required - get link from the bottom of this page (e.g. https://openframeworks.cc/ci_server/versions/nightly/of_v20190324_linuxarmv7l_nightly.tar.gz)
https://openframeworks.cc/download/
Download OF and unpack:
wget https://openframeworks.cc/ci_server/versions/nightly/of_v20190324_linuxarmv7l_nightly.tar.gz
tar -zxvf of_v20190324_linuxarmv7l_nightly.tar.gz
mv of_v20190324_linuxarmv7l_nightly openFrameworks
#include "ofMain.h"
#include "AvFoundationH264DecoderListener.h"
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <Accelerate/Accelerate.h>
#import <CoreMedia/CoreMedia.h>
#import <AVFoundation/AVPlayer.h>
#import <VideoToolbox/VideoToolbox.h>
@aferriss
aferriss / loadVideo.js
Created July 25, 2018 20:06
Load a Video with Promise
module.exports = {
videos : function(asset){
return new Promise(function(resolve, reject){
var vElement = document.createElement('video');
vElement.autoplay = true;
vElement.muted = true;
vElement.loop = true;
vElement.playsinline = true;
vElement.playsInline = true;
@sparrc
sparrc / install-ffmpeg.sh
Last active November 14, 2023 13:24
Installs ffmpeg with libaom and libx265 enabled for av1 and hevc encoding (tested on Ubuntu 16.04)
#!/usr/bin/env bash
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few
# other common libraries
# binary will be at ~/bin/ffmpeg
sudo apt update && sudo apt upgrade -y
mkdir -p ~/ffmpeg_sources ~/bin
export PATH="$HOME/bin:$PATH"
@mattatz
mattatz / Matrix.hlsl
Last active July 7, 2024 02:26
Matrix operations for HLSL
#ifndef __MATRIX_INCLUDED__
#define __MATRIX_INCLUDED__
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
float4x4 inverse(float4x4 m) {
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1];
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2];
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3];