如何使用ffmpeg从mp3中删除ID3音频标签图像(或元数据) [英] How to remove ID3 audio tag image (or metadata) from mp3 with ffmpeg

查看:1513
本文介绍了如何使用ffmpeg从mp3中删除ID3音频标签图像(或元数据)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

FFMPEG确实是一个很棒的工具.我知道它可以编辑ID3标签,甚至可以连续删除所有标签:

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

但即使在那之后,仍然有封面图片.

But even after that, there's still the cover image.

我不知道如何使用ffmpeg删除它.我知道还有其他软件可以做到这一点-例如eyed3-但是,如果ffmpeg也可以在编码音频的同时一行完成安装,那有什么意义呢?

I don't know how to remove it using ffmpeg. I know there's other soft out there that can do the job - like eyed3 - but what's the point to install it if ffmpeg can do it too, in one line, while encoding the audio ?

推荐答案

ffmpeg将封面图像/专辑封面视为视频流.要忽略它,可以使用-vn-map选项.

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

在此示例中,音频被流复制(重新混合),而不是被重新编码.这样速度更快,并且不会降低质量:

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

与上述相同,但使用的是-map而不是-vn

或者您可以使用 -map 选项显式选择流.使用-map 0:a告诉ffmpeg仅从输入0(您的情况下的第一个输入和唯一的输入)中选择音频流:

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

我更喜欢-map,因为它非常灵活.

I prefer -map because it is very flexible.

这篇关于如何使用ffmpeg从mp3中删除ID3音频标签图像(或元数据)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆