Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
970 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...