Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Cue sheets (Read 23491 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Cue sheets

I have been reading these, and many other forums, about splitting mp3 files using cue sheets.  I must have tried pretty much every solution, and I'm getting tired of them now.
Whenever I try to split an mp3 from a cue file using any software, there are always mistakes and noises at the start of every track.  I am using besplit mainly now with the cue-splitter gui, and it works reasonably well apart from this problem.  The only way I have found to split the mp3 without getting the sounds at the start is either to burn the mp3 to a CD using cdrwin, and then rip back to the PC, or to convert the whole thing to wav, split it, and convert back.  I don't get the sounds then.

So, my question is, is it possible to split an mp3 without these noises at the start of each track?  Is there a cue splitter application that will split the files properly?

Thanks

Cue sheets

Reply #1
Quote
So, my question is, is it possible to split an mp3 without these noises at the start of each track?  Is there a cue splitter application that will split the files properly?
[a href="index.php?act=findpost&pid=306303"][{POST_SNAPBACK}][/a]


What decoder do you use for playback ?
Sounds like it chokes on incomplete bit reservoir buffers.

You see... MP3 frames are usually not independantly decodable due to the bit reservoir. So, if you split an MP3 file at a frame boundary the first frame of the 2nd file will most likely be indecodable. Most decoders just silence those first frames if they can not be decoded properly. Yours seem to try decoding frames with incomplete data as well and that's causing the noise.

There are several options. If the decoder is a software decoder just swap to a better one. In case you can't change that (ie hardware mp3 player) you should split the MP3 file properly (properly = accounting for the bitreservoir). Unfortunately I'm not aware of any mp3 splitter which produces all-decodable frames in case of bitreservoir usage. (This would require reformatting the stream. In possibly rare cases one has to insert one or more silence frames at the beginning which carry the necessary informations in the bitreservoir to overcome the frame size limitation. But in those cases you have to use a special mp3-merger, too (which removes those inserted frames) to get a big MP3 again which decodes to the same PCM file as the original one).


Sebi

Cue sheets

Reply #2
Decode to wav, then split. Shouldn't happen. MP3 frames share data with the preceeding and following frame, so clean splits are tricky without decoding first.

Cue sheets

Reply #3
Stupid questions: what's a cue sheet and do I want one and why? I googled, but this doesn't seem to be the same thing you guys are talking about.

I just plays my dumb flac files through my squeezebox, but wouldn't wanna "miss out" on some new experience.

Mark

Cue sheets

Reply #4
I am using mpg123 in winamp, but the default winamp decoder is the same, and its the same in windows media player.  It doesn't do this at the start of every track, or it's not noticable anyway.
Strangely, I cannot hear the noises when played in foobar2000, and that uses mpg123 doesn't it?
I do play music on my iPod, on which I can hear the sounds, so I need these files to be splitted properly.  Does anyone know of a splitter that produces all-decodable frames?  Or will I have to keep splitting them as wav?

Cue sheets

Reply #5
Quote
Decode to wav, then split. Shouldn't happen. MP3 frames share data with the preceeding and following frame, so clean splits are tricky without decoding first.
[a href="index.php?act=findpost&pid=306375"][{POST_SNAPBACK}][/a]


Great, looks like lots more hard drive/CDRW usage for me 

Cue sheets

Reply #6
Quote
I am using mpg123 in winamp, but the default winamp decoder is the same, and its the same in windows media player.  It doesn't do this at the start of every track, or it's not noticable anyway.
Strangely, I cannot hear the noises when played in foobar2000, and that uses mpg123 doesn't it?
[a href="index.php?act=findpost&pid=306381"][{POST_SNAPBACK}][/a]

I guess some players don't make use of the mpg123 library correctly. (really just a guess)

Quote
I do play music on my iPod, on which I can hear the sounds, so I need these files to be splitted properly.  Does anyone know of a splitter that produces all-decodable frames?  Or will I have to keep splitting them as wav?
[a href="index.php?act=findpost&pid=306381"][{POST_SNAPBACK}][/a]


There's a quick-and-dirty hack you can do if you're a programmer: Just make a copy of the last frame of the previous mp3-track and store it as first frame of the new mp3-track while zeroing the side-info block. This makes a silence frame containing the necessary bitreservoir informations for the next frame. You might want to mark this inserted silenceframe in order to be able to remove it automatically if you want to join the seperated tracks again. (Marking could be done via one of the 3 (stereo) or 5 (mono) private bits AFTER the mp3 header -- I guess the private bit in the header isn't really a safe place to put this information)

It's a quick hack 'cause you don't need any mp3 stream reformatting
It's a dirty hack 'cause it might only work in 99,9% of all cases.

Any volunteers ?
I'd do it myself but i'm rather busy right now


Sebi

edit: added remark about the 3/5 private bits after the header / fixed typos

edit2: since zeroing the side info block also requires recalcualtion of the CRC (if used) one could just set the protection bit in the header to 1 (1 = no CRC16 checksum). That'll simplify things.

 

Cue sheets

Reply #7
It would be great if someone could make a splitter that produces all-decodable frames, as I know from experiance that none of the current splitters do it properly.  I would be happy to use the extra (I'm guessing) time and cpu power to reformat the streams like you said, as anything is better than what I am currently doing.  Or even a tool that converts to wave, splits, and converts back on the fly would be a better, faster, and easier option.

I'd pay for it if someone did it anyway.

Cue sheets

Reply #8
You know what ?
Two years ago I already created a little app that may help you.

It's a tool that silences undecodable frames at the beginning of mp3 files. Since this is a destructive approach you won't be able to get the original mp3 back if you concatenate the tracks. But hey... at least you won't hear any noises. This is all I can offer for now.

grab it here

Sebi

Cue sheets

Reply #9
Have you tried using Foobar? Does it produce this problem as well?

Cue sheets

Reply #10
Quote
Have you tried using Foobar? Does it produce this problem as well?

Quote
Strangely, I cannot hear the noises when played in foobar2000, and that uses mpg123 doesn't it?
[a href="index.php?act=findpost&pid=306381"][{POST_SNAPBACK}][/a]


I tried that app, but it had no effect on the noise at the start of the file, which seems strange as shouldn't that tool fix it for good?  It appears that the tool does not detect any bit-reservoir errors - from the results when running the tool:

MP3brfix (bit-reservoir-fix) v0.94(beta) © 2003/02-03 by ZeBee

first frame:
  MPEG1 Layer3 128kbps 44100Hz J-Stereo
  Xing-Tag present
  flags: [fc] [bc] [toc] [vs]
  LAME-Tag present  ( LAME 3.96r )
mp3 frames: 15199, VBR (183.7 kbps)
Bit-Res errors: 0
no CRC protected frames found.
ready.


Also, would you be able to add batch support to that tool to fix a folder of mp3's?

I'm not bothered if the original gapless stream is unrecoverable, as long as it plays gapless on my PC, because I don't burn anything to CD any more.

Thanks for your help btw.

Cue sheets

Reply #11
I meant, have you tried track splitting using Foobar (not playing) and does it produce these problems as well?

Cue sheets

Reply #12
oh, sorry.

Forgive me    but i am new to foobar.  How would I do this? I've had a look around but can't find how to do it.

Listening to the track more closely in foobar and comparing it to the original track playing directly from the cue file, I can hear the difference.  So the splitters are actually making mistakes when splitting the files and creating these sounds, it's just foobar did a good job of hiding it.  It's way more obvious in winamp.

As I say, I have tried many cue splitting programs, and all I have tried have this problem.  So maybe foobar will be better to split it, when I find out how...

Cue sheets

Reply #13
Have you also tried http://mp3splt.sourceforge.net ?
I think its the most flexible splitter available, and I've never had the problem you describe.

Cue sheets

Reply #14
Just open up Foobar and load the cuesheet. Then go to the Foobar2000 menu--> Preferences. Next, look for "Diskwriter" and select it. You might not see this option if you didn't install the "Special" version of Foobar (which includes the diskwriter). Under Output Filename Formatting, I have:

Code: [Select]
%artist% - %album%\$num(%tracknumber%,2) - %artist% - %title%


but you can choose anything you like. Also, click on "Create subdirectories". Click on output presets and choose command line encoder: lame (the preset you want).
Then, click the edit button. This will open another window. In the "Encoder" textbox, browse to the location of lame.exe on your machine then click OK. Click Save All on the main preferences window and then close.

Then, select all tracks and right-click and choose "Convert-->Run Conversion". Choose the option you just edited (command line encoder: lame ...).

I think that's it!

Cue sheets

Reply #15
Now, that works very nicely, but I guessed it would when i started looking at it as it re-encodes it.  I will probably use this in future unless I can get mp3split that tycho mentioned working, as it would be better than re-encoding it, and faster.  Thanks though Ponchorage, I had heard about foobar being able to split Cues but never found how to do it or anywhere that told me!

cheers

Cue sheets

Reply #16
Quote
Now, that works very nicely, but I guessed it would when i started looking at it as it re-encodes it.  I will probably use this in future unless I can get mp3split that tycho mentioned working, as it would be better than re-encoding it, and faster.  Thanks though Ponchorage, I had heard about foobar being able to split Cues but never found how to do it or anywhere that told me!

cheers
[a href="index.php?act=findpost&pid=306639"][{POST_SNAPBACK}][/a]


Yeah, you're right, it reencodes. I hadn't thought of that. 

Cue sheets

Reply #17
Quote
Quote
Now, that works very nicely, but I guessed it would when i started looking at it as it re-encodes it.  I will probably use this in future unless I can get mp3split that tycho mentioned working, as it would be better than re-encoding it, and faster.  Thanks though Ponchorage, I had heard about foobar being able to split Cues but never found how to do it or anywhere that told me!

cheers
[a href="index.php?act=findpost&pid=306639"][{POST_SNAPBACK}][/a]


Yeah, you're right, it reencodes. I hadn't thought of that. 
[a href="index.php?act=findpost&pid=306649"][{POST_SNAPBACK}][/a]


Hey, it's a lot better than encoding to wav, splitting, then back to mp3 again.  If i can't get mp3split working or it still makes the noises, I will definately be using foobar.

Just one more thing - do I need to add the --nogap switch to the LAME commandline?  That switch isn't even in the documentation for lame - why?

Thanks

EDIT: I noticed that using the --nogap switch makes the first track of the conversion appear as 35 minutes long when it's only about 5.  Strange.

Cue sheets

Reply #18
MP3splt also makes the noises.  It couldn't be something specific to my computer could it?  I think I will try splitting on a different computer and see if it makes any difference.

Results:  Exactly the same.  Is there a codec that could be doing this?  I have the same codecs on both computers.

Edit:  Tried on a different PC that has the default windows codecs - same.

So, until someone makes an app that can split mp3's without these noises (and please tell me if you do), I'll use foobar.

Thanks

Cue sheets

Reply #19
hey dignick,

I saw this post and couldnt resist trying to do it.  let me know if it works.  I tried it on about 4 or 5 different cue/mp3 albums and didn't hear any problems, although I may have just gotten lucky  It rewrites the LAME header so foobar reports the correct track lenghts.

Anyway you can grab it here: http://cdtag.com/splitcue.zip

Go to the tag tab on the upper right, select your CUE and hit File, Split CUE Sheet

Let me know if there's a problem I'll try to fix it.

Cue sheets

Reply #20
I tried it.
At first, I thought it had worked, but when i got to track 11, the noises came clear again.  I really don't know why these noises are present, but they are.

Any thoughts?  Because I really would like to reslove this problem, otherwise it will keep bugging me

Thanks

Cue sheets

Reply #21
sorry, for the absence (vacation to Scotland).

@Jud: Did you account for the bitreservoir ?

@dignick: Could you describe how you've done the splitting/fixing exactly ? I'm specifically interested in the used splitter. BTW: You can try to run LAME as a decoder with "--decode". It'll give you the "can't step back xxx bits" error message if the bitreservoir is incomplete. If it does it can be fixed with the mp3brfix app.

edit: you didn't take the first track, did you ? Because the first track will most likely NOT contain bit res errors.

Quote
MP3brfix (bit-reservoir-fix) v0.94(beta) © 2003/02-03 by ZeBee

first frame:
  MPEG1 Layer3 128kbps 44100Hz J-Stereo
  Xing-Tag present
  flags: [fc] [bc] [toc] [vs]
  LAME-Tag present  ( LAME 3.96r )
mp3 frames: 15199, VBR (183.7 kbps)
Bit-Res errors: 0
no CRC protected frames found.
ready.
[a href="index.php?act=findpost&pid=306589"][{POST_SNAPBACK}][/a]


That's odd. The app used to work actually. Either the splitter accounts for the bitreservoir (somehow badly perhaps -- which would explain the clicks) or you just ran mp3brfix on the first track.


Sebi

Cue sheets

Reply #22
Using LAME to decode:

Quote
skipping initial 1105 samples (encoder+decoder delay)
Can't step back 78!
Frame# 17680/17681  256 kbps   MS


So yes, the bit reservoir is incomplete, but on the same track with mp3brfix:

Quote
MP3brfix (bit-reservoir-fix) v0.94(beta) © 2003/02-03 by ZeBee

first frame:
  MPEG1 Layer3 64kbps 44100Hz J-Stereo
  Xing-Tag present
  flags: [fc] [bc] [toc]
mp3 frames: 17682, VBR (213.6 kbps)
Bit-Res errors: 0
no CRC protected frames found.
ready.


The track doesn't change if I try to remove the bitreservoir errors, and decode with lame still gives the error.  And it's track 11 that I am doing this on.

Any cue splitter that I have used does this, for example besplit, or the tool that Jud suggested.  Using splitcue that jud suggested or besplit both give 0 bit-res errors in mp3brfix but I still get 'can't step back' errors when using lame.  I noticed that the 'Can't step back' values change for the different splitting tools.

If I use foobar to split/re-encode, there are no 'Can't step back xxx!' errors on the same track.
Looks like you hit on the reason for the noises sebastian, right from the start!

Cue sheets

Reply #23
Quote
@Jud: Did you account for the bitreservoir ?
[a href="index.php?act=findpost&pid=307537"][{POST_SNAPBACK}][/a]

Sebi,

I tried your method with using the last frame from the previous track and zero'ing the side information (32 bytes after the 4 byte header, assumg M1L3).  This produced a small but noticeable gap between tracks, and since I can't hear the difference when it just does a clean frame break I went with that method.

If you have any other suggestions I'd be willing to try them out if you're too busy.

Cue sheets

Reply #24
Quote
Quote
@Jud: Did you account for the bitreservoir ?
[a href="index.php?act=findpost&pid=307537"][{POST_SNAPBACK}][/a]

Sebi,

I tried your method with using the last frame from the previous track and zero'ing the side information (32 bytes after the 4 byte header, assumg M1L3).  This produced a small but noticeable gap between tracks, and since I can't hear the difference when it just does a clean frame break I went with that method.

If you have any other suggestions I'd be willing to try them out if you're too busy.
[a href="index.php?act=findpost&pid=307710"][{POST_SNAPBACK}][/a]


Is that not the gap that normally occurs between tracks, that can be removed with a mpg123 decoder?

Also, what player/decoder are you using to play the files Jud?

Could you not make
Quote
I tried your method with using the last frame from the previous track and zero'ing the side information (32 bytes after the 4 byte header, assumg M1L3)

an option?