Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg conversion loses all metadata #53

Open
Fishhooks1945 opened this issue Mar 17, 2023 · 1 comment
Open

ffmpeg conversion loses all metadata #53

Fishhooks1945 opened this issue Mar 17, 2023 · 1 comment

Comments

@Fishhooks1945
Copy link

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

@Fishhooks1945
Copy link
Author

Fishhooks1945 commented Mar 17, 2023

I guess i should note that you have to have exiftool and lame installed.

If there is another way to do this with ffmpeg, i'm down to learn, but after 2 hours i just gave up. ffprobe wouldn't read the metadata on the WAV, so I just assumed it was not compatible with ffmpeg no matter what i do, and switched to lame and exiftool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant