Menu

#198 CUE file track times on VBR MP3 streams incorrect

open
nobody
None
5
2009-09-10
2009-09-10
stoopidplox
No

Version: 1.64.6 & before

Problem Description: ripstream.c determines track time (or elapsed time) in secs using only the stream bitrate determined from the first frame, stream header etc. On VBR streams this calculation can be way off, thus resulting in a CUE file where all times are multiplied by the error between the average bitrate of the whole file and the 'determined' bitrate. It is fairly impossible to create accurate CUE files with this method.

Some-work-to-implement solution: use system timer to write cuesheet index times.

Code sample (v1.64.6):
/* Dump to artist/title to cue sheet */
secs = bytes_to_secs (rmi->cue_sheet_bytes, rmi->bitrate);
ret = filelib_write_cue (rmi, ti, secs);

meta-code patch: (like I can program...)
import multi-platform system timer access library etc
(streamripper already keeping track of elapsed total time for -l seconds option , hopefully not using just bitrate on this too!)

<if creating a new cue file>
cueStarttime = Timer

<when writing track change to cue file>
secs = Timer - cueStarttime
write_cue_track(secs)

Discussion


Log in to post a comment.