问题
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)
回答1:
Possible bug. Did not investigate but ffmpeg
may be writing comment metadata as user text frame (TXXX
) instead of comment (COMM
).
For now I suggest using a different tool for comment tag. eyeD3
example:
eyeD3 --comment "added a comment" input.mp3
回答2:
Try this instead:
ffmpeg -i test.aac -c copy -metadata comment='this is test' -b:a 128k test.mp3
Here -b:a
is used for setting the audio bit-rate.
来源:https://stackoverflow.com/questions/61981314/cant-give-metadata-of-comment-to-mp3-file-using-ffmpeg