Thread: Music from .MP4
View Single Post
  #23  
Old April 23rd 17, 02:46 PM posted to alt.windows7.general,alt.windows-xp,microsoft.public.windowsxp.general
Shadow
external usenet poster
 
Posts: 1,638
Default Music from .MP4 [or any other video]

I'll repeat an older post I made, slightly more detailed.

MP4 (like most other video formats) is a container. It usually
contains a video stream and an audio stream, but it might contain
subtitle or other streams.

To determine exactly what streams your .MP4 contains, you need a tool
like Mediainfo Lite.

http://mediaarea.net/en/MediaInfo/Download/Windows

After it's installed, you can right click on the .MP4 and see what
streams it contains. Scroll down to the audio one, and look at the
format

Here's an example:

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 3 min 45 s
Bit rate mode : Variable
Bit rate : 72.0 kb/s
Maximum bit rate : 75.9 kb/s
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 spf)
Compression mode : Lossy
Stream size : 1.94 MiB (22%)

The important bit is "Format".

So to extract THIS audio WITHOUT re-encoding, I need to set the target
to AAC

ffmpeg -i input -c:a copy output.AAC

(where input is the COMPLETE name of the .MP4, MKV, AVI,
whatever, using double quotes if it has a space in the name)

Example

ffmpeg -i "My Favorite Music.MP4" -c:a copy "My Favorite
Music.AAC"

If Mediainfo showed a MP3, I'd use:

ffmpeg -i "My Favorite Music.MP4" -c:a copy "My Favorite
Music.MP3"

The extraction is as fast as your HD can write. A few seconds
for an hour of music, and there is NO distortion, as the stream is
COPIED, not re-encoded.

If you want to check the bitrate of the music after
extraction, use this tool:

http://spek.cc/

You will find most music from YouTube and other sites is
****-awful in quality. Usually 96.0 kb/s. You can see that with
Mediainfo before extracting, of course, but Mediainfo gives you the
nominal value, Spek does a full analysis.
HTH
[]'s
--
Don't be evil - Google 2004
We have a new policy - Google 2012
Ads