Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
902 views
in Technique[技术] by (71.8m points)

shell - Can't give metadata of comment to MP3 file using ffmpeg

I want to covert a AAC to MP3 and give metadata of comment to the MP3 file using ffmpeg.
But -metadata comment doesn't work and ffmpeg doesn't return any error.

My code is ffmpeg -i "test.aac" -ab 128k -metadata comment='this is test' "test.mp3"

I tried -metadata description='this is test' and also update ffmpeg. Other function such as -metadata artist and -metadata album works well.

What's wrong with this code?

Output

Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'test.mp3':
  Metadata:
    description     : this is test
    TSSE            : Lavf58.29.100
    Stream #0:0: Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.54.100 libmp3lame

Environment
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.59)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Possible bug. ffmpeg is writing comment metadata as user text frame (TXXX) instead of the expected comment (COMM).

For now I suggest using a different tool for comment tag. eyeD3 example:

eyeD3 --comment "added a comment" input.mp3

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...