Extracting audio from mp4 has less bitrate

1

1

I'm using ffmpeg -i input.mp4 -c:a copy -vn -sn output.m4a to extract audio from an mp4 file. However, when I open the mp4 in Spek, it shows 255kbps AAC and the extracted file is only 200kbps. Also, the spectrogram isn't 1:1 identical, there are small differences. Why is that so? Is it normal, or is there a better way to do it?

Ookami

Posted 2018-09-18T17:17:28.160

Reputation: 11

As per Spek docs, it uses ffmpeg to read and decode files, so my best guess is that Spek uses an older version when ffmpeg did not discard initial samples from MDCT-codec streams. The ffmpeg output should be taken as accurate. – Gyan – 2018-09-19T05:01:54.060

Answers

0

According to DSP textbooks, shifting the frequency can have significant spectral effects, see "interpolation" and "decimation". If at all possible make sure the sampling frequency and/or bit-rate is exactly the same, that will preserve as much of the audio as is possible. Any other consideration must use various pre-filters to guarantee there is no spectral aliasing.

JosephDoggie

Posted 2018-09-18T17:17:28.160

Reputation: 139

0

Try to demux the audio with something like mp4muxer or avidemux.

watermelon nfo

Posted 2018-09-18T17:17:28.160

Reputation: 1

Welcome to Super User! Can you explain how? – bertieb – 2018-10-03T22:50:28.000