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

后端 未结 8 879
暗喜
暗喜 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

    Perfect answer above. I use it together with find to add all FLAC files in a subtree to iTunes with this command

    find . -name "*.flac" -exec ffmpeg -i {} -ab 160k -map_metadata 0 -id3v2_version 3 {}.mp3 \;
    

    To automatically add the resulting files to iTunes, get the iTunes import directory with

    find ~/Music/ -name "Automatically Add*"
    

    result e.g.

    /Users/sir/Music//iTunes/iTunes Media/Automatically Add to iTunes.localized
    

    Then run e.g.

    find . -name "*.mp3" -exec mv {} "/Users/sir/Music//iTunes/iTunes Media/Automatically Add to iTunes.localized/" \;
    

    To automatically add all the converted tracks to iTunes.

提交回复
热议问题