Convert .flac to .mp3 with ffmpeg, keeping all metadata

后端 未结 8 902
暗喜
暗喜 2020-12-22 17:38

How can I convert .flac to .mp3 with ffmpeg, keeping all metadata (that is converting Vorbis comment in .flac files to ID3v2 metadata of .mp3)?

8条回答
  •  渐次进展
    2020-12-22 18:19

    One-liner to convert all .flac files to .mp3 in a single directory, keeping most metadata:

    for file in *.flac; do ffmpeg -i $file -q:a 0 ${file:r}.mp3; done

    (Note: ${file:r} removes the extension of the given filepath)

提交回复
热议问题