Skip to content

Instantly share code, notes, and snippets.

nguyengoi /
Created Apr 23, 2020 — forked from protrolium/
using ffmpeg to extract audio from video files


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

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

View Install mongo driver for php in ubuntu 12.4 and higher
# install driver
$ sudo apt-get install php-pear php5-dev
# and
$ sudo pecl install mongo
# if you got an error
# configure: error: sasl.h not found!
# you should install (ubuntu)
$ sudo apt-get install libsasl2-dev
# or CentOS