Posts

Showing posts with the label audio-processing

Using FFMPEG to trim your videos

 There are multiple methods to trim or clip videos with the help of FFMPEG, but sometimes looking at the documentation can confuse lots of us, and we cannot derive the output we want. And the examples on the documentation are simpler than what we want to do. So I will show few methods to combine, trim or clip video files using FFMPEG. I won't be going through installation process and will assume that you already have it installed. 1. Using timestamps to clip the video 🕐   ffmpeg -i video.mp4 -ss 00:00:00 -to 00:10:00 -c copy output.mp4   This command will copy the clip from 0 sec to 10 min without re-encoding, since we specify not to re-encode. Break down of command:      -i  : input video file     -ss : starting timestamp you can define in hh:mm:ss or just secs     -to : ending timestamp, this is the timestamp of the video     -c copy : codec is copy, which doesn't require re-encoding   If you w...

Audio de-noising using Python (Wavelets)

What is audio de-noising? Audio de-nosing is a process of removing noise(unwanted sound/signals from audio). You might have heard of noise cancellation headphones, these remove all the noise from the audio.  This process has various applications in media creation and learning. Also, de-noising is not only done on audio but also done on images. There are various methods to do this. We will see 2 methods and implement one. Method 1: FFT (Fourier Transform)    There are multiple different implementations of FT: FFT (fast FT), STFT (Short time FT). Also, there are inverse for each of them IFT respectively. So what is it? In short, FFT converts signals from one form to another, in audio, the time-series signal is converted to the frequency domain. More shortly, the dominant audio (your voice) will have more power than the non-dominant(noise). The following video will explain (a really good video):  Denoising with FFT (in Python)  Method 2: Wavelets (faster than FT) ...