After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785558 - Broken metdata in ripped FLAC files
Broken metdata in ripped FLAC files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.12.3
Other Linux
: Normal blocker
: git master
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
: 789946 794165 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-07-29 12:57 UTC by Philipp Wolfer
Modified: 2018-03-16 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philipp Wolfer 2017-07-29 12:57:11 UTC
Ripping a CD as FLAC results in files with broken metadata block. I can playback the files, but software reading the metadata fails (see errors below).

Arch Linux
Gnome 3.24
Sound Juicer 3.24
gstreamer 1.12.2
flac 1.3.2


Here are various error messages I get:

Tracker reportes in journal:
tracker-extract[1231]: gst_mini_object_ref: assertion 'mini_object != NULL' failed

Running flac -wst on a file:
Disc 1 - 01 - Verboten.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

Disc 1 - 01 - Verboten.flac: ERROR while decoding data
                             state = FLAC__STREAM_DECODER_ABORTED

Mutagen (used from inside Picard) shows:
E: 14:31:01 Traceback (most recent call last):
  • File "/usr/lib/python2.7/site-packages/picard/util/thread.py", line 46 in run
    result = self.func()
  • File "/usr/lib/python2.7/site-packages/picard/file.py", line 116 in _load_check
    return self._load(filename)
  • File "/usr/lib/python2.7/site-packages/picard/formats/vorbis.py", line 55 in _load
    file = self._File(encode_filename(filename))
  • File "/usr/lib/python2.7/site-packages/mutagen/_file.py", line 49 in __init__
    self.load(*args, **kwargs)
  • File "/usr/lib/python2.7/site-packages/mutagen/_util.py", line 158 in wrapper
    return func(*args, **kwargs)
  • File "/usr/lib/python2.7/site-packages/mutagen/_util.py", line 129 in wrapper
    return func(self, h, *args, **kwargs)
  • File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 790 in load
    while self.__read_metadata_block(fileobj):
  • File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 722 in __read_metadata_block
    block = block_type(fileobj)
  • File "/usr/lib/python2.7/site-packages/mutagen/_vorbis.py", line 87 in __init__
    self.load(data, *args, **kwargs)
  • File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 351 in load
    super(VCFLACDict, self).load(data, errors=errors, framing=framing)
  • File "/usr/lib/python2.7/site-packages/mutagen/_vorbis.py", line 110 in load
    string = fileobj.read(length).decode('utf-8', errors)
  • File "/usr/lib/python2.7/site-packages/mutagen/flac.py", line 70 in read
    size, len(data))) error: file said 301989888 bytes, read 25005107 bytes

Comment 1 Philipp Wolfer 2017-07-29 12:59:23 UTC
I will try to provide a sample file, but I will be travelling the next two weeks.

Also I have seen the somehow similar issue https://bugzilla.gnome.org/show_bug.cgi?id=784092 , but for me all the files showed the same kind of corruption
Comment 2 christophe.vda 2017-09-04 21:12:01 UTC
Same here. I do not recieve any metadata when ripping to flac. All is 'unknown' (artist, album, title...). I can provide a sample file if needed, but I don't know if that would be ok legally.
Comment 3 Philipp Wolfer 2017-09-05 07:34:28 UTC
Here is a sample FLAC file with broken metadata I just ripped with sound-juicer:

https://drive.google.com/open?id=0B4YQhIuWC-gcakRIYy1xVUhyNDQ

Installed packages that might be relevant:

sound-juicer 3.24.0+2+gb8380d2d-1
gstreamer 1.12.2-1
flac 1.3.2-1

The song in the file is "15 Ghosts II" by Nine Inch Nails and is licensed under Creative Commons BY-NC-SA
Comment 4 Philipp Wolfer 2017-09-05 07:54:12 UTC
Downgrading to gstreamer 1.10 does not show this issue. This looks like a gstreamer issue unrelated to sound-juicer.
Comment 5 Philipp Wolfer 2017-09-20 06:01:27 UTC
Upgraded to gstreamer 1.12.3, issue still present.
Comment 6 Matthew Berg 2017-09-21 19:51:46 UTC
This is definitely a problem for me.  On Fedora 26 with:

  sound-juicer-3.24.0-1.fc26.x86_64
  gstreamer1-1.12.2-1.fc26.x86_64
  flac-libs-1.3.2-2.fc26.x86_64

Not a single file I encode appears to pass a "flac -t". The current batch I'm looking at is 559 tracks from 28 different discs.  The files also fail to decode with "flac -d" and will sometimes fail with other tools (e.g. "ffmpeg -i foo.flac foo.mp3").

I can play the files back with gstreamer-based applications, and if I run through decode and encode again I can produce usable files (though with an empty VORBIS_COMMENT block)

filesrc location=foo.flac ! decodebin ! flacenc ! filesink location=foo_new.flac

Though some small number of those files seem to end up with bad MD5 signatures in the STREAMINFO block.

Since I have only recently been having trouble I checked some previous encoded files, and all of them test okay.  I'm not sure exactly what version I was using at the time, but it may have been Fedora 25 (date on the newest files is May).  Interestingly none of these files actually set the MD5 signature in STREAMINFO; a flac -t produces the follow message:

WARNING, cannot check MD5 signature since it was unset in the STREAMINFO
Comment 7 Phillip Wood 2017-09-29 15:32:27 UTC
I think this is related to changes in gst-plugins-good commit adeee44b07 - flacparse: fix header rewriting being ignored. Ironically that was supposed to fix a bug reported in sound-juicer that the MD5 was not written properly. Reverting that commit fixes the tags in the flac file but leaves the MD5 broken.

The relavent gstreamer bug is https://bugzilla.gnome.org/show_bug.cgi?id=727802
Comment 8 Tim-Philipp Müller 2017-09-29 18:18:13 UTC
Seems to be a regression, marking as blocker.
Comment 9 christophe.vda 2017-10-24 20:28:12 UTC
Hello guys, currently running Arch linux,

gstreamer 1.12.3-1
rhythmbox 3.4.2+4+ge123ad533-1
flac 1.3.2-1

Ripping a CD still gives flac files without any artist/title/album. I am currently waiting to rip my cd collection until this is resolved. Thank you very much!
Comment 10 Jan Claeys 2017-11-04 22:27:19 UTC
Same issue on Ubuntu 17.10 (gstreamer 1.12.3 / sound-juicer 3.24.0)

All files seem to be corrupt one way or another after ripping.

----
Not sure if it's relevant, but when starting sound-juicer with --gst-debug-level=2 it shows the following warnings:

0:00:12.210857340 30017 0x555a40f02140 WARN         audio-resampler audio-resampler.c:274:convert_taps_gint16_c: can't find exact taps
0:00:12.214416926 30017 0x555a40fd9ca0 WARN           gio_base_sink gstgiobasesink.c:217:gst_gio_base_sink_event:<file_sink> ignored SEGMENT event in time format
Comment 11 Tim-Philipp Müller 2017-11-05 20:06:40 UTC
We should probably revert the offending commit for the time being until someone has time to look at what goes wrong with it.
Comment 12 Phillip Wood 2017-11-06 12:29:29 UTC
(In reply to Tim-Philipp Müller from comment #11)
> We should probably revert the offending commit for the time being until
> someone has time to look at what goes wrong with it.

Yes, that would avoid the worst effects, but the files created would still not have a valid MD5. For sound-juicer I'm considering special casing flac encoding to just use flacenc directly until this is resolved. We do this for mp3 files already as encodebin creates vbr files without an xing header
Comment 13 gkrithi8 2017-11-06 22:13:42 UTC
[Rhythmbox bug]: https://bugzilla.gnome.org/show_bug.cgi?id=789946
Comment 14 Jonathan Matthew 2017-11-06 22:52:59 UTC
*** Bug 789946 has been marked as a duplicate of this bug. ***
Comment 16 gkrithi8 2017-12-07 17:01:47 UTC
Great !

Should be available in gst-plugins-good 1.12.4, when ready.
Comment 18 sam tygier 2017-12-17 14:20:40 UTC
Thanks. Patch fixes it for me.
Comment 19 Sebastian Dröge (slomo) 2018-03-16 10:03:43 UTC
*** Bug 794165 has been marked as a duplicate of this bug. ***