0

I tried to remove the "writing library" entry from some of my mp3 files with ffmpeg, and this is the command I used:

ffmpeg -i input.mp3 -map_metadata -1 -c copy output.mp3

The command removed all the other tags, but the "writing library" still remained intact.

I've also tried other mp3 tag editing tools, but none of them did the job.

Here's the mediainfo of an example mp3 file:

Format                         : MPEG Audio
File size                      : 32.1 MiB
Duration                       : 1 h 9 min
Overall bit rate mode          : Variable
Overall bit rate               : 64.0 kb/s
Writing library                : LAMEUUULAME3.91
Cover                          : Yes
Cover MIME                     : image/jpeg

Audio
Format                         : MPEG Audio
Format version                 : Version 1
Format profile                 : Layer 3
Format settings                : Joint stereo / MS Stereo
Duration                       : 1 h 9 min
Bit rate mode                  : Variable
Bit rate                       : 64.0 kb/s
Channel(s)                     : 2 channels
Sampling rate                  : 44.1 kHz
Frame rate                     : 38.281 FPS (1152 SPF)
Compression mode               : Lossy
Stream size                    : 31.9 MiB (100%)
Writing library                : LAMEUUULAME3.91

Any help would be greatly appreciated. Thank you.

aveceux
  • 31
  • 5

2 Answers2

2

You'll have to disable ID3 tags as well as the Xing header.

ffmpeg -i input.mp3 -map_metadata -1 -write_xing 0 -d3v2_version 0 -c copy output.mp3
Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thanks for your advice. I tried your code, but the file just became unplayable. MPC-HC shows the following message: `File Source (Async.)::Output Media Type 0: -------------------------- Unknown AM_MEDIA_TYPE: majortype: MEDIATYPE_Stream {E436EB83-524F-11CE-9F53-0020AF0BA770} subtype: MEDIASUBTYPE_MPEG1Audio {E436EB87-524F-11CE-9F53-0020AF0BA770} formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000} bFixedSizeSamples: 1 bTemporalCompression: 0 lSampleSize: 1 cbFormat: 0` (Part 1) – aveceux Aug 16 '19 at 16:12
  • `Media Type 1: -------------------------- Unknown AM_MEDIA_TYPE: majortype: MEDIATYPE_Stream {E436EB83-524F-11CE-9F53-0020AF0BA770} subtype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000} formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000} bFixedSizeSamples: 1 bTemporalCompression: 0 lSampleSize: 1 cbFormat: 0` (Part 2) – aveceux Aug 16 '19 at 16:13
  • Is it possible to remove the "writing library" entry while keeping the other tags? For h264 video streams, -bsf:v "filter_units=remove_types=6" can get rip of the writing library entry perfectly. I was wondering if there's any similar code for mp3 audio. – aveceux Aug 16 '19 at 16:18
  • That's a player limitation. Works here in .VLC and AIMP. Anyway, the LAME encoder will always write its own tag into the bitstream directly. Can't be skipped. – Gyan Aug 16 '19 at 16:29
0

ffmpeg -i input.mp3 -map_metadata -1 -write_xing 0 -id3v2_version 0 -c copy output.mp3

(Correction)