- Status Closed
- Percent Complete
- Task Type Bugs
- Category Music playback
- Assigned To No-one
- Operating System All players
- Severity Medium
- Priority Very Low
- Reported Version Release 3.15
- Due in Version Undecided
-
Due Date
Undecided
-
Votes
1
- Berthold Lorke (2021-03-02)
- Private
Opened by Berthold Lorke - 2021-02-17
Last edited by Willliam W - 2021-03-03
FS#13266 - Some FLAC Files Have Glitched Playback
For some FLAC files, the playback is glitchy. I get sharp high pitched short noises here and there. The sound artifacts are always exactly the same at the exact same times when I try over and over again. I have tried redownloading the files, deleting them and putting them on my player again, different SD cards. It always has the exact same sound artifacts. On my PC with various playback software, the sound is completely normal. The problems arose on my Xduoo X3, but I tested it with the rockbox simulator on my PC, too, and had the exact same sound artifacts, so it should be independent of my device.
It only happened with a single album for me. When I converted it to wav, the problems were gone (but this isn’t a good solution because then there is no tagging support). When I converted it back to FLAC, it miraculously played back without any glitches.
On the IRC, speachy suggested that it could have to do with the fact that the FLAC code in Rockbox is pretty old, and that converting it back “repacks” the data differently and regenerates the indices, and that specific sequences of bits don’t get handled correctly. So somehow, that one album I downloaded was converted/packed to FLAC in a weird or unorthodox way.
In the attached sound file, it happens throghout. An example is right at the 2:35 mark.
I should add: This happens with multiple albums I got from Bandcamp. Maybe the way Bandcamp produces the FLACs is weird, and this weird way is what Rockbox can't play back correctly.
As said, if I convert to WAV and then make it into a FLAC myself, it gets encoded/compressed (what it the right term here?) in such a way that the FLAC doesn't have glitched playback on Rockbox.
And yeah, so I bet this glitch could therefore affect a lot of people since I am probably not the only one who gets music from Bandcamp. Taht's basically all I wanted to say: It happens with multiple albums I got from Bandcamp.
I can confirm the file does indeed have glitches
While investigating the difference between thw current implementation
and upstream ffmpeg I found the culprit..
https://github.com/FFmpeg/FFmpeg/commit/3ab1311aba74a28cebfc22985cd9250fda93e6cf#diff-1a0fbfc8798d513146af801ac181b0c186740390304442b19ea2e338a28b9bce
gerrit: g#3149
Daily Builds now have the fixed flac decoder testing encouraged
am testing, so far so good, i haven't heard any glitches so far!
Awesome!
Thanks for the excellent report WITH sample file
gonna mark this as solved