Mute specified sections of an audio file using ffmpeg

The following command will mute two sections: between 5-10s and 15-20s: ffmpeg -i video.mp4 -af “volume=enable=”between(t,5,10)”:volume=0, volume=enable=”between(t,15,20)”:volume=0″ … Description: -af is the audio filter. It works by specifying multiple volume filters that are enabled/disabled at the specified time. volume=enable=”between(t,5,10)”:volume=0 means use a volume filter that gets enabled between 5 and 10 seconds and sets the … Read more

What do the bytes in a .wav file represent?

You will have heard, that audio signals are represented by some kind of wave. If you have ever seen this wave diagrams with a line going up and down — that’s basically what’s inside those files. Take a look at this file picture from http://en.wikipedia.org/wiki/Sampling_rate You see your audio wave (the gray line). The current … Read more

How is audio represented with numbers in computers?

Physically, as you probably know, audio is a vibration. Typically, we’re talking about vibrations of air between approximitely 20Hz and 20,000Hz. That means the air is moving back and forth 20 to 20,000 times per second. If you measure that vibration and convert it to an electrical signal (say, using a microphone), you’ll get an … Read more

Detecting when head phones are plugged in

In Windows Vista and beyond, you can use the device arrival and removal notifications and retrieve the endpoint formfactor to determine if the manufacturer of your audio solution considers a particular endpoint a “headphone”. Before Vista there was no way of determining this information.

How to overlay/downmix two audio files using ffmpeg

stereo + stereo → stereo Normal downmix Use the amix filter: ffmpeg -i input0.mp3 -i input1.mp3 -filter_complex amix=inputs=2:duration=longest output.mp3 Or the amerge filter: ffmpeg -i input0.mp3 -i input1.mp3 -filter_complex amerge=inputs=2 -ac 2 output.mp3 Downmix each input into specific output channel Use the amerge and pan filters: ffmpeg -i input0.mp3 -i input1.mp3 -filter_complex “amerge=inputs=2,pan=stereo|c0<c0+c1|c1<c2+c3” output.mp3 mono … Read more

What is the best way to merge mp3 files? [closed]

David’s answer is correct that just concatenating the files will leave ID3 tags scattered inside (although this doesn’t normally affect playback, so you can do “copy /b” or on UNIX “cat a.mp3 b.mp3 > combined.mp3” in a pinch). However, mp3wrap isn’t exactly the right tool to just combine multiple MP3s into one “clean” file. Rather … Read more