简体   繁体   中英

How to stop ffmpeg from manipulating mp3 metadata?

I'm using ffmpeg to change bitrate of my mp3 files. It works well, but one thing is very frustrating.

ffmpeg automatically changes some of metadata fields. Specifically it converts ID3v2.3 to ID3v2.4, and it does it incorrectly. For example, it writes TYER field that actually does not exist in ID3v2.4. But the most frustrating thing is, it converts USLT field to lyrics-LANGCODE (like lyrics-eng ). Most of music players does not recognise this tag!

I don't want ffmpeg to mess up with metadata fields. I just want it to change bitrate. Is there anyway to tell ffmpeg that it should not touch any metadata fields?

I'm running ffmpeg 4.0.2 in windows 64bit. Options are:

ffmpeg -i input.mp3 -codec:a libmp3lame -b:a 128k output.mp3

And no, -id3v2_version 3 did not help. It corrected TYER problem, but not lyrics problem.

I couldn't solve the lyrics problem with ffmpeg but was able to copy lyrics from the LYRICS-ENG metadata field to the USLT field.
I used the Mp3tag tool for batch copying of the data.
It has the Actions feature for batch operations.

What I did:

  • Actions -> Actions
  • New -> New -> Format value
  • "Field": UNSYNCEDLYRICS, "Format string": %LYRICS-ENG%
  • Navigate to a folder with the files, select them and execute the created action

I used a mix between ffmpeg and the first answer to this question: I first convert a full folder of files thanks to the cmd loop below (in this case converting .flac files to .mp3). Right now I am changing the bitrate of my entire iTunes library so that it takes less place, and ffmpeg does indeed change the tag of the lyrics. But using mp3tag and creating this action allows me to switch them back to a tag that iTunes knows. This is a very quick way of doing it, and I was searching for it for a very long time !

FOR /F "tokens=*" %G IN ('dir /b *.flac') DO ffmpeg -i "%G" -ab 320k -acodec mp3 "3%~nG.mp3"

i am pretty sure i have found a way to do fix the problem with the lyrics...

$ ffmpeg -i input.mp3 ... -metadata "lyrics-eng=" -metadata "unsyncedlyrics=eng||{lyrics}" output.mp3

the -metadata "lyrics-eng=" prevents the incorrect metadata to be set, while -metadata "unsyncedlyrics=eng||{lyrics}" sets the correct metadata, hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM