Skip to content

ffmpeg conversion loses all metadata #53

@Fishhooks1945

Description

@Fishhooks1945

using linux
when using that one-liner you have linked to convert the wav to mp3, I get an notice from FFMPEG that it is ignoring the metadata because it found more suitable alternatives. However, the resultant mp3 lacks all metadata.

So I use this behemoth of a one-liner to do the conversion and have the metadata copied over. After the conversion, it deletes the wav:
for i in *.wav; do title="$(exiftool -s -s -s -Title "$i")"; artist="$(exiftool -s -s -s -Artist "$i")"; album="$(exiftool -s -s -s -Album "$i")"; date="$(echo "$PWD" | grep -oE '[0-9]{4}')"; track="$(echo "$i" | grep -oE '[0-9]+' | head -n 1)"; genre="$(exiftool -s -s -s -Genre "$i")"; lame --add-id3v2 --tt "$title" --ta "$artist" --tl "$album" --ty "$date" --tn "$track" --tg "$genre" "$i" "${i%.*}.mp3" && rm "$i"; done

To use this command: Make sure you specify Artist and Album per album splitter instructions. For folder, I had to use -o option and not the one in the readme, and have the year of the album first, for example:
python -m album_splitter -yt "https://www.youtube.com/watch?v=vV87qhEJOUQ" --album "Sonic Prayer - Remastered" --artist "Earthless" -o "2022 - Sonic Prayer - Remastered"
The reason why this is important, is because the one-liner that does mp3 conversion, gets the album year off of the folder name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions