Bug 397184 - Amarok corrupts ogg files
Summary: Amarok corrupts ogg files
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: VHI critical
Target Milestone: kf5
Assignee: Amarok Developers
URL: https://bugzilla.gnome.org/show_bug.c...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-05 17:25 UTC by jeromecmoi
Modified: 2024-08-07 11:50 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen record to show the problem + Amarok debug log (3.85 MB, application/zip)
2018-08-05 17:25 UTC, jeromecmoi
Details
Music ogg file for testing (3.24 MB, audio/ogg)
2018-08-05 17:30 UTC, jeromecmoi
Details
Ogginfo files for original and corrupted music (60.72 KB, application/zip)
2018-08-06 19:07 UTC, jeromecmoi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeromecmoi 2018-08-05 17:25:24 UTC
Created attachment 114306 [details]
Screen record to show the problem + Amarok debug log

Hi,

I checked bug#159384. However I believe my problem is somehow different.

I use Debian Stable, Gnome desktop, kernel 4.9.0-7-amd64. Amarok version from the repository is 2.8.0.
Sorry if the bug has already been fixed, but I don't really want to upgrade my Debian for now.

Some (not every - 40%) ogg files get corrupted after Amarok played them once. They become unreadable either by Amarok, VLC, or MPlayer.

After a few tests, I know the problem appears on ogg files that have a high-quality cover picture (embedded in their metadata).


How to reproduce:
-Tick the box to write metadata to files in Amarok's preferences
-Add an ogg file that shows the problem to your Amarok library
-Play it
-Play another music
-Try to play the ogg file again. It has been corrupted


Fortunately I keep a backup of my songs so I did not lose them definitely
Comment 1 jeromecmoi 2018-08-05 17:30:40 UTC
Created attachment 114308 [details]
Music ogg file for testing
Comment 2 Nate Graham 2018-08-06 02:00:29 UTC
This is a bug in GStreamer that was fixed in a 1.12.x bugfix release. see https://bugzilla.gnome.org/show_bug.cgi?id=784530

If Debian's version is older than that, you might ask them to backport the fix.
Comment 3 jeromecmoi 2018-08-06 07:55:00 UTC
Thanks! I will try to ask them.

However, "incorrectly framed headers" in the bug case you linked makes me believe Amarok actually corrupts the headers of those ogg files after the first playback, doesn't it?
This fix on GStreamer is aimed to play corrupted files…
Comment 4 Nate Graham 2018-08-06 12:51:04 UTC
Clementine (a fork of an older version of Amarok) has the same issue, BTW: https://github.com/clementine-player/Clementine/issues/5524
Comment 5 jeromecmoi 2018-08-06 17:14:18 UTC
I confirm it is the same issue ;)

And I am formal: Amarok corrupts the headers.

The GStreamer issue you linked only solves the question "how to play corrupted files?" but it does not solve the source issue which is "Why does Amarok corrupt ogg files?".
So, maybe we should re-open this bug case?
Comment 6 Tristan Miller 2018-08-06 17:28:32 UTC
(In reply to Nate Graham from comment #2)
> This is a bug in GStreamer that was fixed in a 1.12.x bugfix release. see
> https://bugzilla.gnome.org/show_bug.cgi?id=784530
> 
> If Debian's version is older than that, you might ask them to backport the
> fix.

I am the reporter of the GStreamer bug.  This Amarok bug is not the same.  As far as I know, the GStreamer bug only affects how Vorbis files are read.  This bug is about Amarok corrupting files (i.e., writing to them) when they are played.
Comment 7 Nate Graham 2018-08-06 17:30:16 UTC
Thanks Tristan. You are correct, but they are somewhat related (GStreamer is now more tolerant and can read the corrupted files).
Comment 8 Heiko Becker 2018-08-06 18:12:47 UTC
I can't reproduce the problem with the attached file and the VLC Phonon backend.

Additionally 2.8.0 isn't supported anymore. Can you please try to update to 2.9.0 and see if the problem persists?
Comment 9 jeromecmoi 2018-08-06 19:07:43 UTC
Created attachment 114341 [details]
Ogginfo files for original and corrupted music

2.8.0 isn't supported anymore… but it is the most recent from Debian Stable repo… (and no 2.9.0 backport)
So, I'm sorry but I can't do what you ask without upgrading my whole Debian :/

If any of you guys can try to reproduce the problem…

@Heiko Becker: Did you try the ogginfo command?
Here is the output of my ogginfo with both the original and corrupted files
Did you tick the box to sync metadata with file?
Comment 10 Heiko Becker 2018-08-07 05:42:05 UTC
(In reply to jeromecmoi from comment #9)
> @Heiko Becker: Did you try the ogginfo command?
> Here is the output of my ogginfo with both the original and corrupted files
> Did you tick the box to sync metadata with file?

Yes and ogginfo looks sane:
"Processing file "/home/heiko/Musik/test-file.ogg"...

New logical stream (#1, serial: e1a36eda): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20070622 (1.2.0)
Channels: 2
Rate: 44100

Nominal bitrate: 128.000000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows
..."
Comment 11 jeromecmoi 2018-09-26 11:00:13 UTC
Hi,

I upgraded my whole debian in order to install the latest version of Amarok.

The bug is still there!

Configuration:
Debian testing 4.18.0-1-amd64 #1 SMP Debian 4.18.6-1 (2018-09-06) x86_64 GNU/Linux
$ amarok --version
Qt: 4.8.7
KDE Development Platform: 4.14.38
Amarok: 2.9.0

gstreamer1.0-gtk3:
  Installé : 1.14.3-1
  Candidat : 1.14.3-1
 Table de version :
 *** 1.14.3-1 500
        500 http://ftp.fr.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
libgstreamer1.0-0:
  Installé : 1.14.3-1
  Candidat : 1.14.3-1
 Table de version :
 *** 1.14.3-1 500
        500 http://ftp.fr.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status


What info do you need?
Comment 12 Nate Graham 2018-09-27 13:42:49 UTC
Actually it looks like this was a TagLib bug that was fixed in version 1.11.1: https://github.com/clementine-player/Clementine/issues/5524#issuecomment-417370333

Distros need to adopt that version of TagLib (or later) or cherry-pick https://github.com/taglib/taglib/commit/9336c82da3a04552168f208cd7a5fa4646701ea4


Can you confirm the version of TagLib on your Debian machine?
Comment 13 Heiko Becker 2018-09-27 14:00:11 UTC
(In reply to Nate Graham from comment #12)
> Actually it looks like this was a TagLib bug that was fixed in version
> 1.11.1:
> https://github.com/clementine-player/Clementine/issues/5524#issuecomment-
> 417370333
> 
> Distros need to adopt that version of TagLib (or later) or cherry-pick
> https://github.com/taglib/taglib/commit/
> 9336c82da3a04552168f208cd7a5fa4646701ea4

Interesting. That patch isn't in 1.11.1 though.
Comment 14 jeromecmoi 2018-09-27 18:59:01 UTC
TagLib is not installed on my machine…
Do I need to install any version and test if it solves the problem?

$ aptitude search taglib
p   libtaglib-cil-dev               - CLI library for accessing audio and video 
p   libtaglib-ocaml                 - OCaml bindings for the TagLib Audio Meta-D
p   libtaglib-ocaml:i386            - OCaml bindings for the TagLib Audio Meta-D
v   libtaglib-ocaml-23pn7           -                                           
v   libtaglib-ocaml-3yr81:i386      -                                           
v   libtaglib-ocaml-alcq9           -                                           
p   libtaglib-ocaml-dev             - OCaml bindings for the TagLib Audio Meta-D
p   libtaglib-ocaml-dev:i386        - OCaml bindings for the TagLib Audio Meta-D
v   libtaglib-ocaml-dev-23pn7       -                                           
v   libtaglib-ocaml-dev-3yr81:i386  -                                           
v   libtaglib-ocaml-dev-alcq9       -                                           
v   libtaglib-ocaml-dev-nish6:i386  -                                           
v   libtaglib-ocaml-nish6:i386      -                                           
p   libtaglib2.1-cil                - CLI library for accessing audio and video 
p   libtaglibs-standard-impl-java   - Apache JSP Standard Taglib Implementation 
p   libtaglibs-standard-jstlel-java - Apache JSP Standard Taglib 1.0 EL Support 
p   libtaglibs-standard-spec-java   - Apache JSP Standard Taglib Specification A
p   liquidsoap-plugin-taglib        - langage de flux audio –⋅greffon Taglib    
p   liquidsoap-plugin-taglib:i386   - langage de flux audio –⋅greffon Taglib    
p   monodoc-taglib-manual           - compiled XML documentation for taglib-shar
p   python3-taglib                  - Python3 bindings for the TagLib audio meta
p   python3-taglib:i386             - Python3 bindings for the T
Comment 15 Nate Graham 2018-09-27 19:01:01 UTC
Interesting, thanks for checking. I'm not familiar enough with Amarok's codebase to continue triaging at this point, so I'll hand the show over to the Amarok devs!
Comment 16 Heiko Becker 2018-09-27 19:13:47 UTC
Taglib is a hard dep of amarok.

I'm not familiar with Debian's packages names but according to https://packages.debian.org/sid/amarok taglib is apparently named libtag

But as I said before the mentioned patch isn't part of a release yet.
Comment 17 jeromecmoi 2018-09-27 21:28:15 UTC
Right, it seems to be named libtag :)

$ apt policy libtag1v5
libtag1v5:
  Installé : 1.11.1+dfsg.1-0.2+b1
  Candidat : 1.11.1+dfsg.1-0.2+b1
 Table de version :
 *** 1.11.1+dfsg.1-0.2+b1 500
        500 http://ftp.fr.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
     1.11.1+dfsg.1-0.1 500
        500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages

$ apt policy libtag-extras1 
libtag-extras1:
  Installé : 1.0.1-3.1
  Candidat : 1.0.1-3.1
 Table de version :
 *** 1.0.1-3.1 500
        500 http://ftp.fr.debian.org/debian buster/main amd64 Packages
        500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status
Comment 18 Sylvain 2019-02-09 05:33:16 UTC
jonaski's Strawbs, a fork of Clementine itself a fork of Amarok, seems to have fixed this : https://github.com/clementine-player/Clementine/issues/5524#issuecomment-417370333
Comment 19 Bug Janitor Service 2024-03-23 10:15:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/62
Comment 20 Tuomas Nurmi 2024-03-23 12:10:49 UTC
Git commit c9c4a673c9a8e05afd6a0743bfa01e3e7af6ec02 by Tuomas Nurmi.
Committed on 23/03/2024 at 10:14.
Pushed by carlschwan into branch 'master'.

Fine-tune required TagLib version.

Contrary to what I initially assessed, the 2.0 compatibility changes are
actually compatible with earlier TagLib versions, too. However, as there is
a potential Ogg corruption bug in TagLib versions pre-1.12, this is an
excellent opportunity to ensure the fixing of that bug.

M  +1    -1    CMakeLists.txt
M  +1    -1    README

https://invent.kde.org/multimedia/amarok/-/commit/c9c4a673c9a8e05afd6a0743bfa01e3e7af6ec02