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

Recording audio in Swift

In Swift 3 Add framework AVFoundation **In info.plist add key value Key = Privacy – Microphone Usage Description and Value = For using microphone (the apps will crash if you don’t provide the value – description why you are asking for the permission)** Import AVFoundation & AVAudioRecorderDelegate, AVAudioPlayerDelegate import AVFoundation class RecordVC: UIViewController , AVAudioRecorderDelegate, … Read more

Play audio as microphone input

Just as there are printer drivers that do not connect to a printer at all but rather write to a PDF file, analogously there are virtual audio drivers available that do not connect to a physical microphone at all but can pipe input from other sources such as files or other programs. I hope I’m … 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

Download the best quality audio file with youtube-dl [closed]

If you want mp3, just tell youtube-dl that: youtube-dl -x –audio-format mp3 https://www.youtube.com/watch?v=uWusmdmc0to will get you an audio version (-x, short for –extract-audio) in or converted to mp3 (that’s the –audio-format option). youtube-dl will automatically pick the best quality and most appropriate format. Note that the listed qualities are just guesses. In practice, opus is … Read more

Using ffmpeg to cut audio from/to position

With FFmpeg the ordering of parameters is significant. All of the parameters that come directly before an input will apply to that input. The same is true for an output… the parameters directly before it apply to the output. Consider this command line: ffmpeg -ss 132 -i input.mp3 output.mp3 -ss is the parameter to seek, … Read more

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