How to remove ALL metadata using ffmpeg?

33,258
-fflags +bitexact -flags:v +bitexact -flags:a +bitexact
Share:
33,258
Deep
Author by

Deep

Updated on July 13, 2022

Comments

  • Deep
    Deep almost 2 years

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

    Yes! I found option:

    -map_metadata -1

    But output is unexpected to 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 the wav header after "subchunk1_id" with "fmt " value I expect in "subchunk2_id" is the "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 from the output file?