3

According to FLAC Documentation, pictures can be stored in flac audio format, but lyrics (maybe lrc, srt, or even ass/ssa) isn't mentioned in that documentation.

So, how to delete the embedded picture from flac and add lyrics into flac by software run in Linux platform?

(FFmpeg/avconv are preferred.)

2 Answers 2

7

Assuming that the embedded artwork is in a flac standard PICTURE block then:

metaflac --remove --block-type=PICTURE flacfile.flac

...ought to do it.

If the artwork is in the old, non-standard b64 encoded format, then:

metaflac --remove-tag=COVERART flacfile.flac

..ought to do it. No idea about the lyrics though.

Source

Relevant: http://linux.die.net/man/1/metaflac

0

You can use metaflac to add lyrics as well. Assume that the lyrics to "Tomorrow Never Knows" are in file "2-06.lyrics":

$ ls
'Grateful Dead -- 2-06 - Tomorrow Never Knows.flac'   2-06.lyrics

$ metaflac --remove-tag="Lyrics" "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac"

$ metaflac --set-tag-from-file="Lyrics=2-06.lyrics" "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" 

$ metaflac --show-tag="Lyrics" "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" |more
Lyrics=Turn off your mind, relax
and float down stream
--More--

If you want to paste the lyrics into the terminal via STDIN (e.g., after a web search) followed by [CTRL-D]:

$ metaflac --set-tag="Lyrics=$(cat -)" "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac"
[paste lyrics]
^D

NB: You can do this in ffmpeg too. To read from file 2-06.lyrics:

$ ffmpeg -y -i "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" -codec copy -metadata "Lyrics=$(cat lyrics)" "~Grateful Dead -- 2-06 - Tomorrow Never Knows.flac"
$ mv "~Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac"

If you want to paste the lyrics into the terminal via STDIN followed by [CTRL-D]:

$ ffmpeg -y -i "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" -codec copy -metadata "Lyrics=$(cat -)" "~Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" 
[paste lyrics]
^D
$ mv "~Grateful Dead -- 2-06 - Tomorrow Never Knows.flac" "Grateful Dead -- 2-06 - Tomorrow Never Knows.flac"  

If you wanted to tag an entire directory, you could put that in a for loop:

$ for f in *flac; do metaflac --remove-tag="Lyrics"; printf 'Paste lyrics for %s followed by Control-D:\n' "$f"; metaflac --set-tag="Lyrics=$(cat -)" "$f"; done
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .