Yearly Archives: 2020


Increase volume in video using ffmpeg 2

A quick note on how to boost the audio stream in a video using the volume filter in ffmpeg

#;For newer versions of ffmpeg
ffmpeg -i input.mkv -filter:a "volume=4.0" output.mkv;
#For older versions of ffmpeg (we use multiples of 256)
ffmpeg -i input.mkv -vol 1024 -vcodec copy output.mkv;

Using the above command we were able to make the audio LOUDER!


Ubuntu 18.04 and VOSK Speech Recognition API

Just some quick notes on how to install and use VOSK on Ubuntu 18.04 LTS.

  1. Install using: pip3 install vosk
  2. Get samples from https://github.com/alphacep/vosk-api/tree/master/python/example
  3. Using ffmpeg create input audio files ffmpeg -i video.mkv -c:a pcm_s16le -ac 1 output.wav
    It will create a file of the following type output.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz
  4. Export text to JSON python3 ./test_simple.py output.wav


Host or domain name not found. Name service error for name=smtp.gmail.com type=AAAA: Host not found, try again

Recently, a postfix mail server running on Ubuntu gave us the following error while trying to send an email to Bob:

Jun 16 17:02:03 gateway postfix/smtp[23522]: ED3799A0D27: to=[email protected], relay=none, delay=0.02, delays=0.01/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=smtp.gmail.com type=AAAA: Host not found, try again)

After several attempts like changing the protocol (inet_protocols) to IPv4 (since AAAA is an IPv6 A-record) in /etc/postfix/main.cf and so on we could not get it running.. We restored the configuration file to its original and then we restarted the service:

sudo service postfix restart;

It worked!…. no idea why..