[FFmpeg-user] id3 tags not really removed?
Rodolfo Medina
rodolfo.medina at gmail.com
Wed May 31 12:20:11 EEST 2017
Moritz Barsnick <barsnick at gmx.net> writes:
> On Mon, May 29, 2017 at 18:37:31 -0400, Ron Sparks wrote:
>> > ... I also tried to remove all the tags with:
>> > $ ffmpeg -i input.mp3 -map 0:a -map_metadata -1 -c copy out.mp3
>> > and then put them again, but the problem remains...
>>
>> I suspect the problem might be that ffmpeg works with the id3v2 tags,
>> while your mp3 reader works with the id3v1 tags.
>
> I had the same thought, but why would ffmpeg, when remuxing, re-insert
> the original id3v1 tags? Perhaps they're considered part of the stream,
> *then* they would survive "-c:a copy".
>
> You may want to try adding "-write_id3v1 1", as hinted in the docs:
> https://www.ffmpeg.org/ffmpeg-formats.html#mp3
>
> In both cases, that should either drop the metadata or insert both
> versions. (I didn't manage to test, because I don't have any tools at
> hand which expose both/all types of tags in MP3 files. exiftool should
> manage.)
>
> Other suggestion (never confirmed):
> https://lists.ffmpeg.org/pipermail/ffmpeg-user/2011-June/001365.html
>
> Actually, there are so many forms of tags (incl. EXIF), metadata, and
> so on, that other tools may be much more suitable for such operations.
>
> Cheers,
> Moritz
>
> P.S.: I found "-map_metadata -1" on lists and superuser.com, but
> neither in the docs nor the wiki. Hmmm.
Unfortunately "-write_id3v1 1" seems to have no effect. I wish I could
understand what the problem is. Let input.mp3 be our file. I do:
$ ffmpeg -i input.mp3 - c copy -metadata composer="Bach" output.mp3
$ mv -vi output.mp3 input.mp3
, then get on my car and the reader reads fine the `composer' tag as `Bach'.
Then I remember that J. S. Bach had children who were composers as well, get
off the car, go to the PC and do:
$ ffmpeg -i input.mp3 - c copy -metadata composer="Bach J. S." output.mp3
$ mv -vi output.mp3 input.mp3
. Then I get back to the car and the reader keeps on reading simply `Bach'
instead of `Bach J. S.' I.e., it does not see the change occurred. Now, you
listers say that the problem is in that ffmpeg works with id3v2 tags whereas my
car's mp3 reader does it with id3v1. But, if so, why does it read them
correctly the first time they are created and not the second time, when they
have been changed? Besides, it seems that sometimes, when the above ffmpeg
command is repeated many times, at least the change is somewhat by my reader
finally seen: but only after repeating it at least twice.
Thanks,
Rodolfo
More information about the ffmpeg-user
mailing list