[英]How to stop ffmpeg from manipulating mp3 metadata?
I'm using ffmpeg to change bitrate of my mp3 files.我正在使用 ffmpeg 来更改我的 mp3 文件的比特率。 It works well, but one thing is very frustrating.
它运作良好,但有一件事非常令人沮丧。
ffmpeg automatically changes some of metadata fields. ffmpeg 会自动更改一些元数据字段。 Specifically it converts ID3v2.3 to ID3v2.4, and it does it incorrectly.
具体来说,它将 ID3v2.3 转换为 ID3v2.4,但它做错了。 For example, it writes
TYER
field that actually does not exist in ID3v2.4.例如,它写入了
TYER
中实际不存在的 TYER 字段。 But the most frustrating thing is, it converts USLT
field to lyrics-LANGCODE
(like lyrics-eng
).但最令人沮丧的是,它将
USLT
字段转换为lyrics-LANGCODE
(如lyrics-eng
)。 Most of music players does not recognise this tag!大多数音乐播放器不识别此标签!
I don't want ffmpeg to mess up with metadata fields.我不希望 ffmpeg 弄乱元数据字段。 I just want it to change bitrate.
我只是想让它改变比特率。 Is there anyway to tell ffmpeg that it should not touch any metadata fields?
有没有告诉 ffmpeg 它不应该触及任何元数据字段?
I'm running ffmpeg 4.0.2 in windows 64bit.我在 Windows 64 位上运行 ffmpeg 4.0.2。 Options are:
选项是:
ffmpeg -i input.mp3 -codec:a libmp3lame -b:a 128k output.mp3
And no, -id3v2_version 3
did not help.不,
-id3v2_version 3
没有帮助。 It corrected TYER
problem, but not lyrics problem.它纠正了
TYER
问题,但不是歌词问题。
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.我无法用
ffmpeg
解决歌词问题,但能够将歌词从LYRICS-ENG
元数据字段复制到USLT
字段。
I used the Mp3tag tool for batch copying of the data.我使用Mp3tag工具批量复制数据。
It has the Actions feature for batch operations.它具有用于批处理操作的操作功能。
What I did:我做了什么:
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).我在 ffmpeg 和这个问题的第一个答案之间混合使用:由于下面的 cmd 循环,我首先转换了一个完整的文件文件夹(在这种情况下将 .flac 文件转换为 .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.
现在我正在改变我整个 iTunes 资料库的比特率,以减少它的位置,而 ffmpeg 确实改变了歌词的标签。 But using mp3tag and creating this action allows me to switch them back to a tag that iTunes knows.
但是使用 mp3tag 并创建此操作允许我将它们切换回 iTunes 知道的标签。 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! -metadata "lyrics-eng="
防止设置不正确的元数据,而-metadata "unsyncedlyrics=eng||{lyrics}"
设置正确的元数据,希望有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.