[FFmpeg-user] reduce file size: extract audio from mp4 (video)
steveboyer85 at gmail.com
Tue May 27 17:11:38 CEST 2014
On Tue, May 27, 2014 at 10:04 AM, Beeblebrox <zaphod at berentweb.com> wrote:
> I have several video files that I would like to convert to audio-only.
> Is there a simple ffmpeg command to extract the audio as-is from the video
> file, AND achieve file size reduction? For example,
> "$ ffmpeg -i vidoe.mp4 -vn -acodec copy audio.mp3" naturally fails with:
> "[mp3 @ 0x80d03f020] Invalid audio stream. Exactly one MP3 audio stream is
> required. Output #0, mp3, to 'audio.mp3':
> Metadata: major_brand : isom, minor_version : 512,
> compatible_brands: isomiso2mp41, encoder : Lavf55.19.104
> Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 99
Mind giving the output of just:
ffmpeg -i video.mp4
This would give the stream information that could better help us.
At a glance, the audio bitrate is 99kb/s, so if you want to achieve file
size reduction, your bitrate HAS to be less than that.
Give the following command and see if this works any better for you.
ffmpeg -i video.mp4 -c:a libfdk_aac -ba 64k -vn audio.m4a
> Other methods advised by google mostly have bitrate-type solutions
> "$ ffmpeg -i video.mp4 -vn -ar 44100 -ac 2 -ab 192 -f mp3 music.mp3"
> I have tried some of these, but the resulting files are larger than the
> original mp4, which makes absolutely no sense.
More information about the ffmpeg-user