Discussion:
Embedding artwork in existing flac audio library
egd
2007-01-16 11:11:48 UTC
Permalink
Now that flac supports embedded artwork, is there an easy way to
traverse a directory tree and where folder.jpg exists in a folder,
embed it into all flac files present in said folder?

Ultimately I'd like to remove all non-embedded artwork so that all each
folder contains is the individual flac files and the album cue sheet
(renamed so as not to confuse slimserver).
--
egd

Linux and loving IT!
------------------------------------------------------------------------
egd's Profile: http://forums.slimdevices.com/member.php?userid=3425
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Kyle
2007-01-16 14:55:29 UTC
Permalink
I have been curious about this also, as I have the same setup as you.
I'm wondering, however, what is the benefit of embedding the artwork in
the individual flac files as opposed to leaving it as it is?
--
Kyle
------------------------------------------------------------------------
Kyle's Profile: http://forums.slimdevices.com/member.php?userid=2541
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Andy Hawkins
2007-01-16 15:46:35 UTC
Permalink
Hi,
Post by Kyle
I have been curious about this also, as I have the same setup as you.
I'm wondering, however, what is the benefit of embedding the artwork in
the individual flac files as opposed to leaving it as it is?
The knowledge that you have a complete copy of an album including tags,
artwork etc. in a single file.

Andy
gusi
2007-01-16 17:52:08 UTC
Permalink
Do you need to convert the existing flac files to a newer flac format to
do this?
--
gusi
------------------------------------------------------------------------
gusi's Profile: http://forums.slimdevices.com/member.php?userid=3801
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Andy Hawkins
2007-01-17 12:54:13 UTC
Permalink
Hi,
Post by gusi
Do you need to convert the existing flac files to a newer flac format to
do this?
To do what exactly?

You can embed cover art in two ways

1. Base64 encode it, and put it in a VORBIS comment called 'COVERART'

2. Store it in the new 'picture' metadata block. You need a new version of
FLAC to do this, but you don't have to re-encode (I don't think).

Andy
egd
2007-01-18 12:08:11 UTC
Permalink
Post by gusi
Do you need to convert the existing flac files to a newer flac format to
do this?
No. You can add cover art through the latest beta version of mp3tag,
much like you previously could for mp3 files. Unfortunately it won't
do the mass updating I'm after.
--
egd

Linux and loving IT!
------------------------------------------------------------------------
egd's Profile: http://forums.slimdevices.com/member.php?userid=3425
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Kyle
2007-01-17 14:42:45 UTC
Permalink
Hi,
In article <Kyle.2kiddz1168959602 (AT) no-mx (DOT)
forums.slimdevices.com>,
Kyle<Kyle.2kiddz1168959602 (AT) no-mx (DOT)
Post by Kyle
I have been curious about this also, as I have the same setup as you.
I'm wondering, however, what is the benefit of embedding the artwork
in
Post by Kyle
the individual flac files as opposed to leaving it as it is?
The knowledge that you have a complete copy of an album including tags,
artwork etc. in a single file.
Andy
Correct me if I'm wrong, but won't adding artwork to each individual
flac file add to the overall size of a music collection? What are the
specific benefits of doing it this way?
--
Kyle
------------------------------------------------------------------------
Kyle's Profile: http://forums.slimdevices.com/member.php?userid=2541
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
slimpy
2007-01-17 15:14:24 UTC
Permalink
Just find a script on the net that traverses a file structure on your
operating system, then add the following command for each directory:
Download and install the lastest flac release then issue the following
command within each album directory:
metaflac --import-picture-from="3|image/jpeg|||cover.jpg" *.flac
Replace cover.jpg with the name of your cover files if necessary.

You can find scripts on the net to traverse directory structures on you
operating system. Edit the script and add the above command. Also add
the appropriate delete command to the script if you want the original
image file removed.

This works independently of the flac version used to encode the file.
Re-encoding is not necessary. However the file needs to be re-written
to disk in most cases which usually takes a couple of seconds.
Yes, this adds to your library. The total size used for image data
multiplies with the number of songs in one album (if you use individual
files per track). But considering the average file size of cover images
compared to the total flac file size this is not really worth thinking
about.

-s.
--
slimpy
------------------------------------------------------------------------
slimpy's Profile: http://forums.slimdevices.com/member.php?userid=1524
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
vandermerwe
2007-01-17 16:11:00 UTC
Permalink
I have used mp3tag ( v2.37d ) http://developer.mp3tag.de/ to embed the
folder artwork into each file. It does it automatically, without having
to use code, but I had to do each album individually. Each album takes
about 5 minutes, but I am writing to a NAS device.
I did not have to re-encode those files which were still in 1.1.2.
Overall file sizes did not increase (the artwork files are only about
10-80 kB in size.
--
vandermerwe
------------------------------------------------------------------------
vandermerwe's Profile: http://forums.slimdevices.com/member.php?userid=9300
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Kyle
2007-01-17 16:26:46 UTC
Permalink
Post by slimpy
Yes, this adds to your library. The total size used for image data
multiplies with the number of songs in one album (if you use individual
files per track). But considering the average file size of cover images
compared to the total flac file size this is not really worth thinking
about.
-s.
But what can I do that I can't do with the current structure of one
album art file in the album folder?
--
Kyle
------------------------------------------------------------------------
Kyle's Profile: http://forums.slimdevices.com/member.php?userid=2541
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Mark Lanctot
2007-01-17 19:00:52 UTC
Permalink
Post by Kyle
But what can I do that I can't do with the current structure of one
album art file in the album folder?
I guess you could flatten your directory structure and still keep album
art without having to rename all the cover.jpg files.

Although flattening out your directory when you have it in artist/album
structure doesn't make sense.

It would be good for individual files you download, rather than whole
albums, except that FLAC downloads are very rare.

So although it's nice that FLAC supports this now, I don't see where it
could really be used. It makes keeping track of album art through
mp3tag easier though.
--
Mark Lanctot
------------------------------------------------------------------------
Mark Lanctot's Profile: http://forums.slimdevices.com/member.php?userid=2071
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Josh Coalson
2007-01-17 19:41:59 UTC
Permalink
Post by Kyle
But what can I do that I can't do with the current structure of one
album art file in the album folder?
not much yet, but the FLAC PICTURE block has more info and can be used
in clever ways in the future. see:
http://flac.sourceforge.net/format.html#def_PICTURE
http://flac.sourceforge.net/format.html#metadata_block_picture

Josh




____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
JJZolx
2007-01-17 19:43:39 UTC
Permalink
Post by Kyle
But what can I do that I can't do with the current structure of one
album art file in the album folder?
With respect to SlimServer I can't think of any advantages. In fact, a
number of disadvantages. It makes it a lot more work to change a cover
image for an album. And makes it a lot tougher to simply view the
covers.

A good friend of mine often rips disks and includes high-res scans of
_all_ the artwork in the package. This might be as many as a dozen
large images from a booklet, plus scans of the CD and jewel box tray
insert. The only sane way to keep that artwork is in jpg files, maybe
all of them in a zip or rar file to reduce clutter. You certainly
wouldn't want to embed 20MB of graphics in each music file.

When I rip a disk I often find the best image I can find, but it's not
always very good. Some time later I'll go looking for a replacement
image and will find a much better one. I did this just yesterday -
When I ripped Santana's "Lotus" all I could find was an image that was
200x160 pixels. In SlimServer's gallery view this looks like hell,
since square (or neary square) covers are the norm. So yesterday I did
another search and found a beutiful 300x300 pixel image. Plonked it in
the album folder and was done. No need to break out a tagger or other
software to rewrite the files and embed a new image.
--
JJZolx

Jim
------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
egd
2007-01-18 12:16:39 UTC
Permalink
Post by slimpy
Just find a script on the net that traverses a file structure on your
operating system, then add the following command for each directory...
Thx for the help, much appreciated.

For anyone running some flavour of the misery bill saw fit to unleash
on the world, there's a program called catwalk.exe that will traverse
your directory structure and conditionally execute any commands you
configure it to. You should be able to find it via the Hydrogenaudio
Forums.
--
egd

Linux and loving IT!
------------------------------------------------------------------------
egd's Profile: http://forums.slimdevices.com/member.php?userid=3425
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Andy Hawkins
2007-01-17 20:14:48 UTC
Permalink
Hi,
Post by Kyle
Correct me if I'm wrong, but won't adding artwork to each individual
flac file add to the overall size of a music collection? What are the
specific benefits of doing it this way?
I rip each CD to *one* FLAC file, with an embedded CUE sheet (to resolve
individual tracks in the file), VORBIS comments for the tags, and the album
art as a VORBIS comment also.

Andy
egd
2007-01-18 12:03:51 UTC
Permalink
Post by Kyle
Correct me if I'm wrong, but won't adding artwork to each individual
flac file add to the overall size of a music collection? What are the
specific benefits of doing it this way?
My collection is comprised of individual FLAC files (representing
individuals songs) within folders named "artist - album".

You are correct that storing the jpg image in each FLAC file may
increase the overall size of the collection, however, whether or not
this increases the actual amount of disk space occupied by a FLAC file
is a different question, the answer to which depends on the file system
in use and the cluster size the disk was formatted to. Suffice it to
say that the increase in storage is in most cases probably negligible.
The benefits (to me) are:
- artwork, audio and tag info in one file
- songs readily available for burning to compilations for the car etc.
(as opposed to a FLAC album with embedded cue sheet)
- irrespective of where file goes, I know what it's source is.

If you're going to embed cover art, I'd use FLAC's preferred method
over the Vorbis comment method. The former is more likely to enjoy
widespread support with the passing of time.
--
egd

Linux and loving IT!
------------------------------------------------------------------------
egd's Profile: http://forums.slimdevices.com/member.php?userid=3425
View this thread: http://forums.slimdevices.com/showthread.php?t=31718
Josh Coalson
2007-01-18 23:45:14 UTC
Permalink
Post by egd
Post by Kyle
Correct me if I'm wrong, but won't adding artwork to each
individual
Post by Kyle
flac file add to the overall size of a music collection? What are
the
Post by Kyle
specific benefits of doing it this way?
My collection is comprised of individual FLAC files (representing
individuals songs) within folders named "artist - album".
You are correct that storing the jpg image in each FLAC file may
increase the overall size of the collection, however, whether or not
this increases the actual amount of disk space occupied by a FLAC file
is a different question, the answer to which depends on the file system
in use and the cluster size the disk was formatted to. Suffice it to
say that the increase in storage is in most cases probably
negligible.
also, most FLAC encoders include some padding for this eventuality
(used to be 4k, now 8k, or 64k for full albums). if the picture
is smaller than this, padding will be used and the file will not
grow. also the import will be very fast.

Josh




____________________________________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265

Continue reading on narkive:
Loading...