'using ffmpeg to convert flac to alac with cover art
I have seen a few discussions on this but none of them give the answer I was hoping for. I am trying to convert flac to alac while preserving all of the tags and the embedded cover image. I know we can manually set a cover image by passing a separate image file to ffmpeg.... but how do I use the one embedded in the flac file? dbpoweramp does this automatically, but I would rather use ffmpeg so that I can automate my workflow with a bash script.
Solution 1:[1]
Fixed by adding a source that has a newer version...
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
...And using @logan command...
ffmpeg -i input.flac -c:v copy -c:a alac output.m4a
Thanks
Solution 2:[2]
ffmpeg -i input.flac -c:v copy -c:a alac output.m4a
Solution 3:[3]
I was unable to get the jonathon ppa to work on my rig so you can use "-vcodec copy
"
"$FILE" -vcodec copy -acodec alac "$NEW_FILE"
to copy the image over to the new file.
However, I do see that file names with "()" sometimes don't convert. I don't get an error in my script it just moves on. without the copy. Would be nice if anyone know how to fix that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Chris |
Solution 2 | llogan |
Solution 3 | MB13 |