How to remove ID3 audio tag image (or metadata) from mp3 with ffmpeg

前端 未结 4 894
自闭症患者
自闭症患者 2020-12-30 04:33

FFMPEG is really a great tool. I know it can edit ID3 tags and even remove all tags in a row :

ffmpeg -i tagged.mp3 -map_metadata -1 untagged.mp3


        
相关标签:
4条回答
  • 2020-12-30 05:02

    I tried llogan's solution with a small castle.mp3 file and found out that its size increased from 4448 to 4797 bytes! Further inspection in Audacity revealed that the signal has been slightly "delayed" as well - however the length of the file [castle2.mp3] remained the same.

    After that, I used id3v2 -D castle.mp3 to delete all mp3 tags from the file, and the filesize went down to 4320 bytes, with no other noticeable (undesired) changes.

    0 讨论(0)
  • 2020-12-30 05:07

    None of the above worked for me but the following did:

    ffmpeg -i tagged.mp3 -write_xing 0 -id3v2_version 0 untagged.mp3
    
    0 讨论(0)
  • 2020-12-30 05:14

    The cover image/album art is treated as a video stream by ffmpeg. To omit it you can use the -vn or -map options.

    Strip metadata and remove album art (no re-encoding)

    In this example the audio is being stream copied (re-muxed) instead of being re-encoded. This is faster and will not degrade the quality:

    ffmpeg -i tagged.mp3 -vn -codec:a copy -map_metadata -1 out.mp3
    

    Same as above but using -map instead of -vn

    Or you could use the -map option to explicitly choose the streams. Using -map 0:a tells ffmpeg to only select the audio stream(s) from input 0 (the first input and the only input in your case):

    ffmpeg -i tagged.mp3 -map 0:a -codec:a copy -map_metadata -1 out.mp3
    

    I prefer -map because it is very flexible.

    0 讨论(0)
  • 2020-12-30 05:23

    I've tried to use codes provided by LordNeckbeard, none of them worked for my case. But this one worked:

    ffmpeg -i tagged.mp3 -acodec copy -map 0 -map_metadata 0:s:0 notags.mp3
    

    It shows now only one tag, 'TSSE' (means Encoder). Also, very recommend this article, if you want to manipulate ID3 tags using ffmpeg:

    How To: Create/Write ID3 tags using ffmpeg

    0 讨论(0)
提交回复
热议问题