Skip to content

Instantly share code, notes, and snippets.

Avatar

Ran Sagy ransagy

View GitHub Profile
@ransagy
ransagy / DelayFadeSampleProvider.cs
Last active Sep 1, 2020 — forked from Ahmed-Abdelhameed/DelayFadeOutSampleProvider.cs
NAudio basic example of how to begin a fade in or fade out after a certain number of milliseconds have elapsed, as a stop gap to crossfading.
View DelayFadeSampleProvider.cs
using NAudio.Wave;
namespace WaveCombineHelper
{
/// <summary>
/// Sample Provider to allow fading in and out with delays. Based on https://gist.github.com/Ahmed-Abdelhameed/b867a8cfe739cd7a128b73a33d317402
/// </summary>
public class DelayFadeSampleProvider : ISampleProvider
{
private enum FadeState
@ransagy
ransagy / compile-ffmpeg-nvenc.sh
Last active Feb 3, 2020 — forked from Prototype-X/compile-ffmpeg-nvenc.sh
Script to build a static FFMpeg binary with NVENC support
View compile-ffmpeg-nvenc.sh
#!/bin/bash
# This script will compile and install a static ffmpeg build with support for nvenc in ubuntu.
# See the prefix path and compile options if edits are needed to suit your needs.
# NOTE: This build is made to target Ubunutu 16.04 Data-Science Azure VMs - With nVidia 418.xx drivers and CUDA SDK 9.0.
# It also relies on a hack described in https://trac.ffmpeg.org/ticket/6431#comment:7 to make glibc dynamic still.
# Long story short, you need to edit your ffmepg's configure script to avoid failures on libm and libdl.
# in function probe_cc, replace the _flags_filter line to: _flags_filter='filter_out -lm|-ldl'