Where Do We Need to Go From Here?



Extracting .wav from .mp4 with ffmpeg

Today on the ELAR blog, we are sharing another post from ELDP grantee, Nick Williams on extracting .wav from .mp4 with ffmpeg. Nick works in Indonesia researching Kula, an endangered non-Austronesian language spoken in the eastern highlands of Alor. 

In addition to concatenating and converting our original video files, we also need to extract the audio files. This is very easy with ffmpeg and the best thing about it is we can easily do it for ALL the mp4 files in a given folder. Here is a video showing how to do this: youtu.be/m8i7RWKrnmk

No commentary in the video, so I’ll briefly explain here:

1. Have a folder with all your mp4s in it.
2. Open terminal and navigate to the folder (just type ‘cd’ without quotes and drag the folder onto the terminal window and then hit enter).
3. Type the following code into terminal: for f in *.mp4;do ffmpeg -i “$f” “${f%mp4}wav”;done
[basically, for any file ending in .mp4, extract the audio in .wav format but keep the filename the same! make sure your ” ” are straight plain ones and not “ ”.]
4. That’s it! the wav files will be put in the same folder as the mp4s.

This content is by Nick Williams and originally appeared here