slimserver
slimserver copied to clipboard
8.1.1 regression - multiple flac files w/embedded cuesheeets fail to play
hello -
thank you for continuing to support the squeezebox software ecosystem!
after upgrading from 7.9.3 to 8.1.1 i found that at least two flac files w/embedded cuesheets fail to play and another has started generating errors when scanning (there were no errors w/7.9.3). somewhat oddly, the flac that logs the errors in the below except from scanner.log appears to play properly. of more concern, the ones that i've noticed do not play do not log any errors while scanning. when queued up the tracks appear in the "Now playing" window but the player just skips through them all without actually playing any.
downgrading to 7.9.3 both eliminates the errors and allows the flacs to play. i've attached the relevant cuesheets, both exports of the embedded one and the external "playlist" cue file.
thanks in advance, please let me know if i can provide any additional information or logs.
[21-01-17 18:21:49.2312] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2322] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2333] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2342] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2350] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2358] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2626] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2634] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2642] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2649] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2656] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2663] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2671] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2718] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2726] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2734] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
[21-01-17 18:21:49.2741] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2748] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2755] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
[21-01-17 18:21:49.2761] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.
master_t.t._liangs_tai-chi_music.flac.embedded.cue.txt master_t.t._liangs_tai-chi_music.flac.cue.txt live_93_CD2.flac.cue.txt live_93_CD1.flac.cue.txt live_93_CD2.flac.embedded.cue.txt live_93_CD1.flac.embedded.cue.txt
HI @abezella - would you mind wrapping up the files with original file names in an archive and/or drop them to https://www.dropbox.com/request/T3RctyzGgNg0oFDubq6a? Above files need manual renaming, which is asking for even more problems...
sure thing... i uploaded the originally named files to to dropbox, thanks!
the ones above w/"embedded" in their names were generated w/ metaflac --export-cuesheet-to=[...] so one name is as good as another for them. the directory structure is:
/misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac
/misc/Music/master_t.t._liang-master_t.t._liangs_tai-chi_music/master_t.t._liangs_tai-chi_music.flac.cue
/misc/Music/the_orb-live_93/live_93_CD1.flac
/misc/Music/the_orb-live_93/live_93_CD1.flac.cue
/misc/Music/the_orb-live_93/live_93_CD2.flac
/misc/Music/the_orb-live_93/live_93_CD2.flac.cue
if it is helpful i can probably make all the files temporarily available for download
thanks again...
I'm sorry to say that I'm confused. I only see the cue sheets, none of the referenced Flac files. And if you have embedded CUE sheets, why would you have the external CUE sheets in addition?
sorry, my mistake: i didn't realize you wanted the flacs, too. i put everything up (temporarily) at: https://vm-home0.archive.org/~abezella/tmp/live_93_CD1.flac https://vm-home0.archive.org/~abezella/tmp/live_93_CD1.flac.cue https://vm-home0.archive.org/~abezella/tmp/live_93_CD2.flac https://vm-home0.archive.org/~abezella/tmp/live_93_CD2.flac.cue https://vm-home0.archive.org/~abezella/tmp/master_t.t._liangs_tai-chi_music.flac https://vm-home0.archive.org/~abezella/tmp/master_t.t._liangs_tai-chi_music.flac.cue
as regards to the internal and external cuesheets, gotta be honest i'm not 100% sure on the "why." (for decades now) i've used abcde as my tool of choice to encode the whole CD in a single file and that's what the result is. i've left the embedded cuesheets alone and used the external one for tagging tracks.
thanks for looking at this! please let me know when you've downloaded the flacs and i'll remove them.
i have the same behaviour with cue related files. Redownloaded from Deezer , but no change. I haven't included CUE data. This seems to be already included:
02-17 17:48:37.1666] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1673] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1693] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1696] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1714] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1717] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1720] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1725] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac [21-02-17 17:48:37.1750] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac. [21-02-17 17:48:37.1753] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac. [21-02-17 17:48:37.1776] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac. [21-02-17 17:48:37.1779] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac. [21-02-17 17:48:37.1782] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/02%20World%20on%20Fire%20-%20Sarah%20McLachlan.flac. [21-
@mamema please confirm your LMS version. If it isn't 8.1.2 or more recent, please update, rescan, confirm issue.
version is 8.2. Issue persists
[21-02-23 06:50:07.5491] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac [21-02-23 06:50:07.5495] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac [21-02-23 06:50:07.5499] Slim::Formats::Playlists::CUE::parse (517) Error: Couldn't get duration of filename here file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac [21-02-23 06:50:07.5503] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5508] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5513] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5515] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5518] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5523] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5533] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5536] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5558] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/end points for track file:///mnt/music/Sarah%20McLachlan/Afterglow/10%20Dirty%20Little%20Secret%20-%20Sarah%20McLachlan.flac. [21-02-23 06:50:07.5569] Slim::Formats::Playlists::CUE::parse (536) Error: Missing file or start/
I had noticed this issue with 8.1 recently and figured out that it appears to be a transcoding issue. I investigated further with 8.2 Docker instance and the following file types:
- WAV with external cuesheet
- FLAC with external cuesheet
- FLAC with a VORBIS_COMMENT (type 4) embedded cuesheet
- FLAC with a CUESHEET (type 5) embedded cuesheet and external cuesheet
The previously posted live_93_CD1 files fall under FLAC with a CUESHEET (type 5) embedded cuesheet and external cuesheet. LMS will parse tracks from a FLAC with only a CUESHEET (type 5) but the tracks will have no metadata; in practice,
CUESHEET is probably superfluous for music albums and either a VORBIS_COMMENT (type 4) or external cuesheet is required.
My music collection is primarily FLAC with a VORBIS_COMMENT (type 4) embedded cuesheet, so I'll be able to best analyze them. I believe all of these albums have been ripped with CUERipper or, previously, Exact Audio Copy.
I was able to play all tracks from all file formats when transcoding was disabled. The following behaviours occurred when transcoding was enabled:
WAV with external cuesheet
- Playing the first track works
- Playing any track except the first track shows the correct metadata but the audio is the first track of the album
- Seeking on any track shows the correct metadata but the first track's audio is played
FLAC with external cuesheet
- Playing the first track works.
- Seeking in the first track works.
- Playing any other track immediately skips the track. The following output is logged:
-: WARNING, don't have accurate sample count available for WAVE header.
Generated WAVE file will have a data chunk size of 0. Try
decoding directly to a file instead.
-: ERROR seeking while skipping bytes
state = FLAC__STREAM_DECODER_READ_FRAME
Unsupported number of channels: 0
FLAC with VORBIS_COMMENT (type 4) embedded cuesheet
Same as FLAC with external cuesheet
FLAC with CUESHEET (type 5) embedded cuesheet, external cuesheet
Same as FLAC with external cuesheet except playing and seeking on the first track sometimes works, depending on the album. I have not determined what allows this.
Hopefully I'll have time to dig in further soon.
I just updated to the latest version last night (Logitech Media Server Version: 8.2.0 - 1616690655 @ Thu Mar 25 18:13:31 CET 2021) and my music collection is now giving off this error:
Mar 27 03:02:09 lister squeezeboxserver[2669]: [21-03-27 03:01:59.9025] Slim::Formats::Playlists::CUE::parse (503) Error: Couldn't get duration of filename here
file:///mnt/music/Music/Amon%20Amarth/Jomsviking/10%20Back%20on%20Northern%20Shores.flac
Mar 27 03:02:09 lister squeezeboxserver[2669]: [21-03-27 03:01:59.9026] Slim::Formats::Playlists::CUE::parse (522) Error: Missing file or start/end points for track
file:///mnt/music/Music/Amon%20Amarth/Jomsviking/10%20Back%20on%20Northern%20Shores.flac.
I do use a combination of Banshee and Musicbrainz Picard to manage my library, so perhaps it's one of those two that is causing the parser some grief?
The CUE::parse errors like
[21-03-30 22:52:18.9056] Slim::Formats::Playlists::CUE::parse (519) Error: Couldn't get duration of filename here file:///music/master_t.t._liangs_tai-chi_music.flac
[21-03-30 22:52:18.9057] Slim::Formats::Playlists::CUE::parse (538) Error: Missing file or start/end points for track file:///music/master_t.t._liangs_tai-chi_music.flac.
appear to be from timestamps in the FLAC's CUESHEET_BLOCK being incorrectly extracted. Using the files @abezella posted and some extra debugging output, notice the valid MM.SS.FF timestamp format in live_93_CD1.flac but integers in master_t.t._liangs_tai-chi_music.flac:
[21-03-30 22:52:18.8484] Slim::Formats::FLAC::getTag (129) FLAC cuesheet {
cuesheet => [
"FILE \"/music/live_93_CD1.flac\" FLAC\n",
" TRACK 01 AUDIO\n",
" INDEX 00 00:00:00\n",
" INDEX 01 00:00:33\n",
" TRACK 02 AUDIO\n",
" INDEX 01 11:50:15\n",
" TRACK 03 AUDIO\n",
" INDEX 01 23:44:68\n",
" TRACK 04 AUDIO\n",
" INDEX 01 34:44:18\n",
" TRACK 05 AUDIO\n",
" INDEX 01 44:36:40\n",
" TRACK 06 AUDIO\n",
" INDEX 01 57:03:65\n",
"REM FLAC__lead-in 88200\n",
"REM FLAC__lead-out 170 190650180\n",
" REM END 4323.133",
],
}
...
[21-03-30 22:52:18.9126] Slim::Formats::FLAC::getTag (129) FLAC cuesheet {
cuesheet => [
"FILE \"/music/master_t.t._liangs_tai-chi_music.flac\" FLAC\n",
" TRACK 01 AUDIO\n",
" INDEX 01 0\n",
" TRACK 02 AUDIO\n",
" INDEX 01 39819360\n",
" TRACK 03 AUDIO\n",
" INDEX 01 70357140\n",
" TRACK 04 AUDIO\n",
" INDEX 01 75596808\n",
"REM FLAC__lead-in 88200\n",
"REM FLAC__lead-out 170 114064861\n",
" REM END 2586.504",
],
}
My suspicion is the INDEX 00 is triggering the correct timestamp parsing but I haven't verified that.
The good news is the external cuesheet is eventually parsed and used for creating the album, so this errors aren't critical to loading the albums.
I'm still only able to reproduce the no-playback issue when transcoding FLAC files. I've narrowed down the changes to a couple commits and I'll submit a PR, but I'd appreciate if anyone can confirm that non-transcoded files are working.
thank you for investigating this issue!
unfortunately i am currently having a hardware failure that prevents me from testing non-transcoded files on my squeezebox. hopefully this will be resolved in a week or two (new power supply is on order) and i will be able to do so then.
I verified that the flac => mp3 transcoding was working in 7.9.2 and bisected from HEAD to figure out what changed. The convert.conf switch to streaming FLACs in 0b0104bf8 broke the transcoding but those changes were reverted in 5da52c217 with the commit message "Fix FLAC playback with CUE sheets." Streamed FLACs were reintroduced as part of #462 and tweaked in #464, which helpfully linked to https://forums.slimdevices.com/showthread.php?113308-PCP-6-1-0-Issue-with-cue-(LMS-8-0) for context. I believe the streamed FLACs are to allow generic support for non-local FLAC sources in the future, limited to Tidal streaming for now.
I used a Docker instance of HEAD to diagnose the issue. The following flac error output is relevant:
-: WARNING, don't have accurate sample count available for WAVE header.
Generated WAVE file will have a data chunk size of 0. Try
decoding directly to a file instead.
When LMS is streaming cuesheet FLAC data to the flac transcoding pipeline, it will only include the FLAC header with STREAMINFO if it's the first track of the album (I'm ignoring complications like hidden zero tracks for now). If LMS is streaming any track but the first, LMS is sending the offset data and the STREAMINFO is missing. flac (the decoder) handles the missing STREAMINFO fine and converts the file to WAV only if it is writing the data to a file; if flac is streaming to stdout, the WAVE header is malformed and lame can't parse it. Oddly, if flac streams stdout to a file, lame can encode it if it's passed as a file but not if it's streamed into it.
I was able to test this theory by installing ffmpeg in the Docker container and replacing the flac command with ffmpeg -f flac -i - -f wav -, which worked. I tried a whole bunch of flac and sox commands to try and coax out the data for lame but didn't have any luck.
I also verified that I could remove the I in the flc mp3 transcoding rule and the previous functionality would work. I think I also split the flc mp3 transcoding into two rules, I without start support and F with it, but I've been poking for a while and my notes aren't as good as they should be.
My solutions all seemed like reverts or at least against the spirit of what's there, so I'm not sure what's the best way to tackle this. @michaelherger and @philippe44 (sorry for the spam), as you both were working on these commits, do you have any thoughts?
I wasn't able to figure out a way to get the FLAC stdin streaming with cuesheets. I ended up adding a custom-convert.conf without the stdin streaming capability:
flc mp3 * *
# FB:{BITRATE=--abr %B}T:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=--resample %D}
[flac] -dcs $START$ $END$ -- $FILE$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
Typical locations for custom-convert.conf are /etc/slimserver/custom-convert.conf or, for Docker, /lms/custom-convert.conf.
This rule will most likely break FLAC streaming from TIDAL.