Kodi Community Forum
serious bug in .ape + .cue playback ? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: serious bug in .ape + .cue playback ? (/showthread.php?tid=125945)

Pages: 1 2


serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-03-19

Here's the scenario. Whenever I access individual tracks within an ".ape" format CD image (ie album_name.ape using album_name.cue) the tracks are clipped at the beginning (missing a fraction of the music in other words). To illustrate the point consider this hypothetical cue file:

PERFORMER "Artist Name"
TITLE "Great Music"
FILE "Album Name.ape" WAVE
TRACK 01 AUDIO
TITLE "Song 1"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "Song 2"
INDEX 00 03:38:66
INDEX 01 03:39:02
...etc

Let's say the album has 12 tracks in total. If i allow the tracks to play consecutively it does not exhibit this behaviour. But if i select a track as per the cue file, clipping occurs. (It might not be detectable on tracks with a moment of silence before the music but it's still happening). Strangely enough i can convert this same CD image to a FLAC format, attach the identical "cue file" and it works perfectly.

I have tested this exhaustively on Windows XP, Windows 7 (Dharma & Eden) and the IOS version with many permutations of cue files, .ape encoding etc. As it happens Foobar reads the track breaks perfectly so i'm at a loss to explain why XBMC does not. I was reluctant to report it as i could find no mention of anyone else having issues, but would welcome other users experiences. Perhaps a dev could test this for themselves?


RE: serious bug in .ape + .cue playback ? - DDDamian - 2012-03-19

I've been looking into another cuesheet issue and wondered if you could check whether this only occurs with cue files which have multiple Index entries per song (e.g. Index 00 03:38:66, Index 01 03:39:02, etc)....


RE: serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-03-19

thanks for the reply DDDamian. Unfortunately this behaviour occurs with all flavours of cue file (ie multiple or single index entries) but only in association with the .ape format. Additionally when the full track listing is displayed the final track length is missing. Are you able to confirm this on your rig?


RE: serious bug in .ape + .cue playback ? - DDDamian - 2012-03-19

Hi there - I don't have any .ape rips, but I'll create one and try to duplicate. I do know from looking at another issue that the missing final track length is due to another code issue where the duration of the entire file is not calculated (this occurs with DTS wav files as well due to an invalide wav header). The cue sheet parser has no way of reading in the total duration, so it relies on other code to determine the total file duration, and this appears to only work correctly on FLAC and wav based files.

I'll try get a sample .ape and keep this in mind while looking at the more general cue file issues.


RE: serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-03-19

cheers. It would definitely be a relief to have someone confirm these findings. Please update me if you get chance...


RE: serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-04-03

105,161 members on XBMC at last count and not one person has ever noted this behaviour? Shocked I thought .ape files were a popular format. Admittedly my motivation for posting this is selfish (basically I'm faced with the task of converting hundreds of ape files into flac) but i was hopeful other music lovers would have commented on this anomaly. Aside from any personal frustration this issue causes, i hate to see the XBMC experience undermined (even though i accept this is a nothing issue for many users).


RE: serious bug in .ape + .cue playback ? - jmarshall - 2012-04-04

They're not popular at all, no. Most users prefer flac and other similar open formats.

And yes, this has already been fixed by taxigps. Build yourself, or wait for a nightly (or convert your files - IMO the latter offers quite a few benefits, not least of which is a far greater variety of playback platforms).


RE: serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-04-04

thanks jmarshall. That fix you mentioned could be a life saver, although I agree FLAC is more versatile. Full support for .ape can only be a good thing though.


RE: serious bug in .ape + .cue playback ? - DDDamian - 2012-04-04

Found one other issue too - has to do with tracks which have multiple indexes per song, regardless of format. Will push a patch shortly. Given what I see of your sample cue above it should fix the issue.

Taxigps's patch fixes the issue where the total track length was not reported for ape files (currently an issue for dts files too) and the last track would show no duration as a result.


RE: serious bug in .ape + .cue playback ? - DDDamian - 2012-04-04

And yeah, lose the ape format - it really is a dead format - FLAC is number one for lossless and multichannel.


RE: serious bug in .ape + .cue playback ? - taxigps - 2012-04-04

This issue come with ape decoder change from APEcodec to DVDPlayerCodec. It's a bug of ffmpeg decocder. So we can't fix it now. See http://trac.xbmc.org/ticket/8740 and https://github.com/xbmc/xbmc/commit/bef663c89107d4b9f68b1a21bf8ef49ede8c0798


RE: serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-04-04

thanks for your feedback taxigps. Are you referring to the issue where the track breaks do not align? DDDamian indicated (a few posts back) that a fix might be possible for this. Do you guys compare notes?


RE: serious bug in .ape + .cue playback ? - DDDamian - 2012-04-04

Haven't spoken with taxigps on this (hi btw) but they are two distinct issues we're referring to (now three lol).

1) taxigps pushed a patch that provides the total time for the .ape file so the total time is known and thus the duration of the last track can be calculated.
2) taxigps refers above to an issue in ffmpeg where part of the start of the .ape file appears to play before the selected track (according to the ticket linked) and that ticket also leads to another distinct issue.
3) my statement/patch refers to when tracks have multiple indexes whether index 00 (pre-gap) or index 02, 03, etc for sub-songs where only the last index value is used in calculating the song duration.


RE: serious bug in .ape + .cue playback ? - GeneralDisarray - 2012-04-04

glad to see you back on this thread DDDamian. The .ape implementation is proving to be one tricky customer. My grasp of the technicalities is quite poor so please excuse me if i've misunderstood, but would any of your (or taxigps') proposals address the issue of track delineation? With or without multiple indexes per song that is?


RE: serious bug in .ape + .cue playback ? - DDDamian - 2012-04-05

Not unless there are multiple indexes in the affected tracks, no. I didn't follow all of the details in the trac ticket, and the one it referenced, but items 1) and 3) in my post above are all that is addressed by recent work, and it doesn't sound like that's your issue without seeing the affected files and cues.