'How to extract audio from MPEG-4 file using ffmpeg [closed]
How can we extract audio from video file (MPEG-4 format)?
What is convenient form of storing the extracted audio data for further analysis? (edit: In other words: is it better to use PCM format or something like WAV if I want to get audio sound level?)
From other questions about this topic I learned that ffmpeg is a right tool to do this.
Solution 1:[1]
You can use the following command:
ffmpeg - i input.mp4 -vn -acodec pcm_s16le -ac 2 -ar 44100 out.wav
-vn: no video
-acodec: audio codec selection.
pcm_sl6le: 2 bytes samples in little endian format
-ac: number of audio channels
-ar: audio sample rate
out.wav output wav file
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Joel G Mathew |
