ffmpeg_china 发表于 2014-11-7 15:55:28

mp3中加入图片信息

研究了一下mp3加入图片信息,和大家分享一下。
(1)对mp3加入图片理论了解可以参考ID3的介绍。http://baike.baidu.com/view/66078.htm?fr=aladdin

(2)命令直接把ffmpeg官网一部分复制过来,讲的挺详细
The MP3 muxer writes a raw MP3 stream with the following optional features:
[*]An ID3v2 metadata header at the beginning (enabled by default). Versions 2.3 and 2.4 are supported, the id3v2_version private option controls which one is used (3 or 4). Setting id3v2_version to 0 disables the ID3v2 header completely.The muxer supports writing attached pictures (APIC frames) to the ID3v2 header. The pictures are supplied to the muxer in form of a video stream with a single packet. There can be any number of those streams, each will correspond to a single APIC frame. The stream metadata tags title and comment map to APIC description and picture type respectively. See http://id3.org/id3v2.4.0-frames for allowed picture types.Note that the APIC frames must be written at the beginning, so the muxer will buffer the audio frames until it gets all the pictures. It is therefore advised to provide the pictures as soon as possible to avoid excessive buffering.
[*]A Xing/LAME frame right after the ID3v2 header (if present). It is enabled by default, but will be written only if the output is seekable. The write_xing private option can be used to disable it. The frame contains various information that may be useful to the decoder, like the audio duration or encoder delay.
[*]A legacy ID3v1 tag at the end of the file (disabled by default). It may be enabled with the write_id3v1 private option, but as its capabilities are very limited, its usage is not recommended.
Examples:Write an mp3 with an ID3v2.3 header and an ID3v1 footer:ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3
To attach a picture to an mp3 file select both the audio and the picture stream with map:ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3

mingyuejingque 发表于 2018-1-31 17:28:25

墙裂顶起

ffmpeg-HD 发表于 2018-4-10 13:22:03

如果是MP4怎么加啊?
页: [1]
查看完整版本: mp3中加入图片信息