ZivaVatra/flac2all

Problem getting TAGs from FLAC file with embedded cover art

Closed this issue · 8 comments

What steps will reproduce the problem?
1. Rip a CD using the excellent DBPowerAmp tool, including the cover art
2. Use flac2all v3.48 or older to convert to mp3

We would expect the mp3 file to contain the important flac tags, but they do 
not. They only contain the "genre" tag, because it is set in the code. All 
other tags are empty.

I was able to fix the problem by changing the block in which the metaflac 
command has to look from 2 to 1. It appears that block 2 contains the coverart 
jpg file...

So I replace line 104 in release 48 of the stable code:
flacdata = os.popen("%smetaflac --list --block-number 2 %s" %
with
flacdata = os.popen("%smetaflac --list --block-number 1 %s" %

This solved the problem for me, but I guess this fix will brake functionality 
for files without embedded cover art. So a better fix is required for the 
general public.

What version of the product are you using? On what operating system?
Release 48 (but problem also occurs on v28 and v38)
Ubuntu server 12.04.3 LTS




Original issue reported on code.google.com by seys.ste...@gmail.com on 26 Jun 2014 at 10:47

I have been reading the FLAC format description and don't really see any ref to 
the fact that the song info has to be in block 2, so it could be that other 
ripping software will place it in even another block.

I guess this might fix the problem. Instead of selecting a specific block 
number, just select the block of type VORBIS_COMMENT

flacdata = os.popen("%smetaflac --list --block-type VORBIS_COMMENT %s" %


Original comment by seys.ste...@gmail.com on 26 Jun 2014 at 11:03

Yeah, block 2 was hard coded, because I based it on the reference flac encoder. 
As almost all OSS flac rippers/encoders use libflac, this has been the de-facto 
standard.

As I don't have DBPowerAmp, I will see about changing the code and testing it 
to make sure it works with my collection. Then if you can test it to make sure 
it works for you, then I'll publish a new version for everyone. 

Thanks for the report!


Original comment by i...@ziva-vatra.com on 19 Jul 2014 at 11:17

  • Changed state: Accepted
Issue 13 has been merged into this issue.

Original comment by i...@ziva-vatra.com on 19 Jul 2014 at 11:18

Issue 16 has been merged into this issue.

Original comment by i...@ziva-vatra.com on 13 Jan 2015 at 2:23

Right, I've got an example file, and I'll make the changes and run some tests. 
Will let you know when it is fixed. 

Original comment by i...@ziva-vatra.com on 13 Jan 2015 at 2:24

  • Changed state: Started
Alright, I've run tests with the example file, and tagging now works. Can you 
please check out revision 51 and let me know if you have any problems. 

Original comment by i...@ziva-vatra.com on 13 Jan 2015 at 4:28

  • Changed state: Fixed
I tried out revision 51 and it seems to work correctly with the files that 
caused problem in previous versions.

Original comment by alexis.s...@gmail.com on 15 Feb 2015 at 6:03

Awesome! Thanks for getting back to me about it. New stable release is in 
progress :)

Original comment by i...@ziva-vatra.com on 16 Feb 2015 at 7:17