Skip to content

Instantly share code, notes, and snippets.

@faleev
faleev / gist:3435377
Created August 23, 2012 10:38
Compile FFmpeg on Ubuntu

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@Fat-Zer
Fat-Zer / autotools-cmake-convert.pl
Last active March 29, 2020 02:51
autotools-cmake-convert.pl
#!/usr/bin/env perl
# Usage sample:
# find <dir> -iname Makefile.am | while read m; do
# echo "=== processing $m ===";
# ../scripts/autotools-cmake-convert.pl ${m} >"$(dirname $m)/CMakeLists.txt";
# done
use v5.10.1;
use experimental qw(smartmatch);
use File::Basename;
@jvranish
jvranish / stack_traces.c
Last active October 23, 2024 04:01
An example of catching exceptions and printing stack traces in C on Windows, Linux and OS X
/* compile with:
on linux: gcc -g stack_traces.c
on OS X: gcc -g -fno-pie stack_traces.c
on windows: gcc -g stack_traces.c -limagehlp
*/
#include <signal.h>
#include <stdio.h>
#include <assert.h>
@lirenlin
lirenlin / gist:9760208
Last active March 10, 2020 08:46
list function in static library or object file
linux:
nm libelf.a | grep symbol
nm xxx.o | grep symbol
win32:
dumpbin/exports libelf.lib | grep symbol
dumpbin/symbols xxx.obj | grep symbol
dumpbin/symbols xxx.exe | grep symbol
dumpbin/all
@rom1mouret
rom1mouret / pipeline2-tts-config.asciidoc
Last active June 26, 2018 06:11
Daisy Pipeline 2 TTS Configuration

TTS configuration

Minimal Requirements

The audio encoder Lame must be installed. Lame’s location must be in the system PATH (i.e. $PATH on Unix, %PATH% on Windows), unless it is provided via the 'lame.path' system property.

In addition, one of the following text-to-speech processors must be installed:

For Unix users,

  • Acapela;

@samhocevar
samhocevar / gist:00eec26d9e9988d080ac
Last active October 17, 2024 17:02
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <[email protected]>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@theshadowx
theshadowx / QtNaCl.sh
Last active September 24, 2021 17:35
Qt/Qml With Chrome Native Client (NaCl)
#!/bin/bash
set -e
# Install NaCl
wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
unzip nacl_sdk.zip
rm nacl_sdk.zip
nacl_sdk/naclsdk list
@theshadowx
theshadowx / QtNaCl_docker.sh
Last active January 10, 2019 02:37
Qt/Qml With Chrome Native Client (NaCl) for docker
#!/bin/bash
# Install NaCl
wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
unzip nacl_sdk.zip
rm nacl_sdk.zip
nacl_sdk/naclsdk list
# get the latest stable bender
nacl_sdk/naclsdk update
pepperDir=$(find ./nacl_sdk -maxdepth 1 -type d -printf "%f\n" | grep 'pepper')
@johan-bjareholt
johan-bjareholt / Speech recognition
Created December 8, 2015 15:54
Speech recognition on linux using Google Speech API
#!/bin/bash
# Record from mic
arecord -d 3 -f cd -t wav -r 16000 -c 1 -D pulse test.wav
# Get record volume
sox test.wav -n stats -s 16 2>&1 | grep 'Max level' | awk '{print $3}'
# Convert to flac for smaller footprint
flac -f test.wav
# Google speech recognition
LANG=en-us
# prepare
$ sudo apt-get install -y linux-headers-generic build-essential dkms
# get the right ISO from http://download.virtualbox.org/virtualbox/
$ wget http://download.virtualbox.org/virtualbox/5.2.8/VBoxGuestAdditions_5.2.8.iso
# create a mount folder
$ sudo mkdir /media/VBoxGuestAdditions
# mount the ISO
$ sudo mount -o loop,ro VBoxGuestAdditions_5.2.8.iso /media/VBoxGuestAdditions
# install the guest additions