Skip to content

Instantly share code, notes, and snippets.

@protrolium
protrolium / ffmpeg.md
Last active May 15, 2024 18:27
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@Francesco149
Francesco149 / shige-skins.md
Last active March 31, 2024 14:53
Shigetora / Cookiezi skin compilation
@davideast
davideast / transfer.js
Last active April 20, 2021 17:19
Transfer data from one Firebase database to another
var client = require('firebase-tools');
function transfer(path, options) {
var fromDb = options.fromDb;
var toDb = options.toDb;
var output = options.output;
client.data.get(path, { firebase: fromDb, output: output })
.then(function(data) {
return client.data.set(path, output, { firebase: toDb, confirm: true });
})
@haydenjameslee
haydenjameslee / CoherentWebAudioPlayer.cs
Created January 19, 2016 00:07
Gets PCM audio data from a CoherentUI browser in Unity3D and plays it through a Unity audio filter.
using UnityEngine;
using System.Collections;
using Coherent.UI;
using System.IO;
using System;
using System.Runtime.InteropServices;
[RequireComponent(typeof(CoherentUIView))]
[RequireComponent(typeof(AudioSource))]
unsafe public class CoherentAudioPlayerFilter : MonoBehaviour
@ousttrue
ousttrue / FFMpegYUV4Texture.cs
Last active November 7, 2019 09:04
TextureUpdater for Unity by ffmpeg
using UnityEngine;
using System.IO;
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Collections;
public class FFMpegYUV4Texture : MonoBehaviour
{
@leducanhh
leducanhh / GetStreamingAssetsPath.cs
Created July 29, 2016 08:58
[Unity] Get StreamingAssets file path with Android and iOS.
void GetStreamingAssetsPath(string fileName)
{
#if UNITY_EDITOR
dbPath = string.Format(@"Assets/StreamingAssets/{0}", fileName);
#else
// check if file exists in Application.persistentDataPath
var filepath = string.Format("{0}/{1}", Application.persistentDataPath, fileName);
if (!File.Exists(filepath))
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@luciditee
luciditee / BatchBurner.cs
Last active June 16, 2018 17:09
Batch Burner, a script designed to reduce static mesh draw calls in Unity scenes with a large number of static mesh entities.
/*
* Unity Batch Burner: A script designed to reduce static mesh draw calls automatically in scenes
* with a large amount of static geometry entities.
*
* Copyright 2016-2017 Will Preston & Die-Cast Magic Studios, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@spaceemotion
spaceemotion / EditorWindowFinder.cs
Created March 28, 2017 21:08
Displays a window that lists all available EditorWindows inside the Unity Editor.
using System;
using System.Reflection;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class EditorWindowFinder : EditorWindow
{
@simdezimon
simdezimon / VRNightVision.cs
Last active April 13, 2021 04:18
VR Night Vision Shader
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class VRNightVision : MonoBehaviour {
private Material material;
private Camera cam;
[Tooltip("Grain size in pixel. Should be greater than 1 with supersampling.")]