How to remove ALL metadata using ffmpeg?

Deep picture Deep · Aug 16, 2016 · Viewed 24.2k times · Source

I have input file: infile.mp3 This file contains metadata (artist, genre, etc.) I try remove all metadata for output wav file.

Yes! I found option:

-map_metadata -1

But output is unexpected for me...

$ ffmpeg -i infile.mp3 -acodec pcm_s16le -ac 2 -ar 44100 -map_metadata -1 ./outfile.wav

OK!

$ ffprobe outfile.wav
Input #0, wav, from 'inp.wav':
  Metadata:
    encoder         : Lavf56.25.101
  Duration: 00:04:00.47, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

You see? encoder metadata exists!

And in wav header after "subchunk1_id" with "fmt " value I expect "subchunk2_id" with "data" value (clear expected example):

$ strings outfile.wav | more
RIFFFB
WAVEfmt
data

But it is not (LIST, INFOISFT, etc):

$ strings outfile.wav | more
RIFFFB
WAVEfmt 
LIST
INFOISFT
Lavf56.25.101
data

Well.. How to really remove all metadata for output file?

Answer

mzs picture mzs · Nov 2, 2016
-fflags +bitexact -flags:v +bitexact -flags:a +bitexact