Skip to content

Instantly share code, notes, and snippets.

View VCone's full-sized avatar

VC:One VCone

  • VC:One (freelance audio/visual design & apps)
  • Sheffield, U.K
View GitHub Profile
@JudeOsborn
JudeOsborn / circlePoint.js
Created September 16, 2012 23:42
Find the point on a the circumference of a circle with a given angle, radius and center coordinates.
function circPoint(angle, center, radius) {
return {
x: center.x + radius * Math.cos(degreesToRadians(angle)),
y: center.y + radius * Math.sin(degreesToRadians(angle))
};
}
@yohhoy
yohhoy / aac_parser.py
Last active March 19, 2025 19:19
Parse AAC/ADTS header
#!/usr/bin/env python3
import sys
import struct
if len(sys.argv) < 2:
print("Usage: aac_parer.py <target.aac>")
exit()
aacfile = open(sys.argv[1], 'rb')
frame_no = 1
@nico-lab
nico-lab / ffmpeg-7.1.1-filters.txt
Last active April 5, 2025 11:30
ffmpeg -filters using Gyan ffmpeg
Filters:
T.. = Timeline support
.S. = Slice threading
..C = Command support
A = Audio input/output
V = Video input/output
N = Dynamic number and/or type of input/output
| = Source or sink filter
TSC aap AA->A Apply Affine Projection algorithm to first audio stream.
... abench A->A Benchmark part of a filtergraph.
@VCone
VCone / AppendBytes_Seeking_Demo.as
Last active February 8, 2017 23:38
Basic demo of handling seeking with NetStream AppendBytes using AS3 (Flash) - ( by VC:One - vcone.co.uk)
package
{
import flash.display.*; import flash.media.*; import flash.text.*;
import flash.geom.*; import flash.net.*; import flash.system.*;
import flash.events.*; import flash.errors.*; import flash.utils.*;
import flash.system.ApplicationDomain;
/*
@vxhviet
vxhviet / LUTFilter.md
Last active April 5, 2025 15:16
How to Apply Color LUT to bitmap images for filter effects in Android?

Source: StackOverflow, StackOverflow

Question: How to Apply Color LUT to bitmap images for filter effects in Android?

Answer:

    final static int X_DEPTH = 64;
    final static int Y_DEPTH = 64; //One little square in the LUT has 64x64 pixels in it
    final static int ROW_DEPTH = 8;
@ryohey
ryohey / convert.js
Created May 23, 2017 04:13
Convert YUV420(I420) Progressive Planar to RGB in JavaScript
const WIDTH = 176
const HEIGHT = 144
const progRGB = yuv420ProgPlanarToRgb(base64ToArrayBuffer(yuv420ProgPlanarImage()), WIDTH, HEIGHT)
const canvas = document.createElement("canvas")
document.body.appendChild(canvas)
const ctx = canvas.getContext("2d")
const imageData = ctx.createImageData(WIDTH, HEIGHT)
putRGBToRGBA(imageData.data, progRGB, WIDTH, HEIGHT)
ctx.putImageData(imageData, 0, 0)
@EricDavies
EricDavies / TextureToJava.
Created June 27, 2017 17:26
Android code for getting a snapshot from a RTCMediaStream.
package com.priologic.easyrtcMedia;
import android.opengl.GLES11Ext;
import android.opengl.GLES20;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.webrtc.*;
/**
* Class for converting OES textures RGBA. It should be constructed on a thread with
* an active EGL context, and only be used from that thread. It is used by the EasyrtcSingleFrameCapturer.
@justsml
justsml / fetch-api-examples.md
Last active April 22, 2025 13:44
JavaScript Fetch API Examples
@XueshiQiao
XueshiQiao / h264format.md
Last active February 5, 2025 06:22
H.264 Annex B format and AVCC format

AnnexB format:

([start code] NALU) | ( [start code] NALU) |

AVCC format:

([extradata]) | ([length] NALU) | ([length] NALU) |
@rveciana
rveciana / .block
Last active September 19, 2023 11:40
Basic gpu.js canvas example
licence: mit