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: pcutmp3 tool (Read 286339 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

pcutmp3 tool

Reply #50
why does it do this:

PCutMP3 -- Properly Cut MP3 v0.95b by Sebastian Gesemann

scanning "Essential Mix - Mylo - 10-APR-2005-2.mp3" ...
first frame header = MPEG1 Layer3 192kbps 44100Hz Stereo
Xing/Info tag present
bitrate = 192 kbps (CBR)
accurate length = no
157849344 samples (is NOT a multiple of 588)
writing "Essential Mix - Mylo - 10-APR-2005-2-01.mp3" ...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -10
        at de.zebee.mpa.ScannedMP3.getInt16(ScannedMP3.java:85)
        at de.zebee.mpa.ScannedMP3.getInt32(ScannedMP3.java:89)
        at de.zebee.mpa.ScannedMP3.getFrameFileOfs(ScannedMP3.java:103)
        at de.zebee.mpa.ScannedMP3.crop(ScannedMP3.java:329)
        at de.zebee.mpa.MainCLI.main(MainCLI.java:270)

pcutmp3 tool

Reply #51
Hmmm... looks like pcutmp3 is choking on your mp3 because it has already been cut by another tool. another tool which made the first franes undecodable. I'm not sure but I thought I tested pcutmp3 on those streams, too. Could you upload the first couple of kilobytes of this mp3 file and the CUE sheet anywhere ? It'd make things easier for me.

Sebi

pcutmp3 tool

Reply #52
first 10 seconds of the mp3: http://rapidshare.de/files/13607490/Essent...2005-2.mp3.html
cue: http://rapidshare.de/files/13607522/Essent...2005-2.cue.html

It makes sense that this was cut, because it's the second half of a 2 hour long radio mix that someone split so it would fit on 2 cds. I already tried rebuilding the header using foobar2000, but that didn't work.

pcutmp3 tool

Reply #53
A quick fix that might work: Fix the bit reservoir errors using mp3brfix. Actually pcutmp3 is supposed to fix these errors as well. But it didn't seem to work in your case for some reason. I'm going to check that.

later added:
If you have the first half you can try to reconstruct the original stream by
copy /b half1.mp3+half2.mp3 full.mp3
without applying mp3brfix on the 2nd half first.
This way you won't loose the start of the 2nd half due to the bitreservoir errors.


Sebi

pcutmp3 tool

Reply #54
Unfortunately i wasn't able to download the files you linked because someone already did it and the hoster only allows one download. Please PM me a link.

Sebi

pcutmp3 tool

Reply #55
is there any disadvantage of cutting a mp3 twice using this tool? Let's say I split a large file and then do the fine tunning? With disadvantage I mean for instance a higher enc_delay or enc_padding since that value is not interpreted correctly by all music players.

thanks
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'

pcutmp3 tool

Reply #56
No. There shouldn't be a problem.

Sebi

pcutmp3 tool

Reply #57
I use XBMC quite frequently and I noticed that it did not play tracks that had been split with pcutmp3 properly; it missed a few seconds off the start of each track.  So I posted it as a bug, which they fixed, but the problem was really with the mp3 files themselves.  Here is my bug report, note in particular the reply
Quote
The seektable in those files seem to be
incorrect.

Is this something that needs fixing?  Everything I play the files with works for me now, but I was just bringing up the problem.

pcutmp3 tool

Reply #58
I don't think Sebi is actively developing this great tool at the mo / anymore.  He made the source available for others to use / update / tweak, but I don't think anyone has.  Shame, cos it's a great tool.

pcutmp3 tool

Reply #59
dignick: Did you try the latest version? I thought I already fixed the seektable generation (see post#4)

The only pcutmp3 bug I know of is it may choke on previously "unproperly" cut files.

BTW: I was thinking of doing a partial rewrite when I've more time on my hands. The code where all the magic takes place (ScannedMP3.java) looks kinda messy currently.


Quote
So I posted it as a bug, which they fixed, but the problem was really with the mp3 files themselves
Quote

The seektable in those files seem to be incorrect.



Can you elaborate? I can't believe that incorrect seektables would cause the behaviour you described. It's probaby the usually higher "ENC_DELAY" values from the LAME header that cause XBMC to do weird stuff.

Sebi

pcutmp3 tool

Reply #60
I can't believe that incorrect seektables would cause the behaviour you described. It's probaby the usually higher "ENC_DELAY" values from the LAME header that cause XBMC to do weird stuff.

yep, iTunes does the same. I've cut a song where there is silence up in front, but iTunes plays the last few frames before the silent part. foobar is getting ir right though
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'

pcutmp3 tool

Reply #61
I have been using 0.94b, now I see the new jar is 0.95b, but you havn't updated the link title which still reads 'direct link to version 0.94 beta' so I didn't know there was a new version.  This has possibly fixed the problem but I can't check it as everything works anyway.  Shame I've been cutting all my mp3's with an old version though.
I could give you an mp3 that has been cut with the two different versions if you want.  I don't know in any more depth what the problem was with the files not playing properly, just that they weren't before it was fixed, and they are now.  If you could be bothered you might be able to find out from the xbmc cvs, it could have a reference to my bug report with respect to the changes made.

A small feature request would be to replace forbidden characters with a default character like _ or -, as I get errors a lot with this and I have to fiddle with the cue every time.

Please keep developing this sebi, your work is much appreciated!

pcutmp3 tool

Reply #62

I can't believe that incorrect seektables would cause the behaviour you described. It's probaby the usually higher "ENC_DELAY" values from the LAME header that cause XBMC to do weird stuff.

yep, iTunes does the same. I've cut a song where there is silence up in front, but iTunes plays the last few frames before the silent part. foobar is getting ir right though

This is simply iTunes not handling the LAME tag. As noted erlier the use of this tool is limited. If you mainly use players that don't support the LAME tag it doesn't make much sense to use pcutmp3.

I thought that by
Quote
it missed a few seconds off the start of each track
dignick meant the player skipped a few seconds of the start. The iTunes behaviour seems to be unrelated then.

BTW: I think the 0.95b version fixed the "illegal character" thing.

Sebi

pcutmp3 tool

Reply #63
SebastianG> Would it be too difficult for you to make a GUI version? Maybe something in LameGrop/OggDrop style. Just a very simple GUI, which would make life easier for a lot of people.

Maybe I can try to do it myself, I already started learning Java 2 times, but I never got enough time to produce anythig really usable. And then I  forgot most of what I've learned.

pcutmp3 tool

Reply #64
Just tried to cut a 48000hz mp3. It cut at the wrong times, just as it thought it was cutting a 44100hz mp3.
Is there a workaround for this?
Thanks for making this great tool anyway! 

pcutmp3 tool

Reply #65
Will pCutMP3 ever have a GUI? Command line is powerful for batch work, but what about ocassional splits where we don't know the frame number?

pcutmp3 tool

Reply #66
Just tried to cut a 48000hz mp3. It cut at the wrong times, just as it thought it was cutting a 44100hz mp3.
Is there a workaround for this?
Thanks for making this great tool anyway! 

how did you end up with those mp3's in the first place 

Will pCutMP3 ever have a GUI? Command line is powerful for batch work, but what about ocassional splits where we don't know the frame number?

I have a cue sheet that has three tracks in it. That way I can cut something from the end as well as from the beginning. I use foobar to listen to the cue sheet and then adjust the times on the cue sheet till I get the result I want. Works quite well
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'

pcutmp3 tool

Reply #67
Just tried to cut a 48000hz mp3. It cut at the wrong times, just as it thought it was cutting a 44100hz mp3.

Just out of curiosity: How did you specify the time?
(cue sheet, in samples, mm:ss.xxx?)

I believe the time in (CDDA-)frames from the cue sheet is directly multiplied with 588 samples (regardless of the sampling rate) which may explain the behaviour you've encountered. The time given in mm:ss.xxx should work as expected. (I may be wrong -- havn't verified it lately)

Sebi

pcutmp3 tool

Reply #68

Just tried to cut a 48000hz mp3. It cut at the wrong times, just as it thought it was cutting a 44100hz mp3.
Is there a workaround for this?
Thanks for making this great tool anyway! 

how did you end up with those mp3's in the first place 

 
1) Any pro audio source - hard disk recording, DAT, etc.
2) DVD rip
3) Recording at 48kHz since he has a Soundblaster or other card that forces onboard resampling to 48kHz

There are MANY other sources in the world for digital audio than just CDs...
"Not sure what the question is, but the answer is probably no."

pcutmp3 tool

Reply #69
I used this cuesheet on a 48000hz mp3 file:
Code: [Select]
FILE "05 I'm a Big Sister, and I'm a Girl, and I'm a Princess, and this is my Horse.mp3" MP3

  TRACK 01 AUDIO
    INDEX 01 00:00:00

  TRACK 02 AUDIO
    INDEX 01 10:03:38

  TRACK 03 AUDIO
    INDEX 01 14:41:70

  TRACK 04 AUDIO
    INDEX 01 18:35:19

  TRACK 05 AUDIO
    INDEX 01 28:12:44

...which gave me this result. To me it seems that pcutmp3 thinks this is a 44100hz file which could explain the strange behaviour. I wonder if this is similar with other samplerates.
how did you end up with those mp3's in the first place 

  My favourite band Underworld did some "download-only" releases lately. Their last one, which was released on Monday, was accidently encoded at 48000hz. They have fixed that in the meantime though.

pcutmp3 tool

Reply #70
seems that pcutmp3 thinks this is a 44100hz file which could explain the strange behaviour.

It correctly detects the sampling rate but the CDDA-frame numbers given in "MSF"-format in a CUE sheet are just translated to sample offsets by multiplication by 588. All other methods of specifying the time (non-CUE sheet mode) should work as expected. A quick fix should be easy (replacing 588 by samplingrate/75 in the source code).

Sebi

pcutmp3 tool

Reply #71
Hi Sebi. First of all, thank you for this tool!

Have you considered working any more on the "rejoin" feature you hinted at in your initial post?
It should be possible to rejoin files losslessly (not yet implemented).

Here is the thought process which prompts the question:

If someone has a live recording (picture an outdoor festival...) that was encoded with L.A.M.E., and which plays gaplessly in players that support the L.A.M.E. tag, it should be possible - assuming one can losslessly rejoin those MP3s - to enclose the rejoined MP3 in an MP4/M4A container, add chapter stops, and play the result gaplessly on an iPod.

Yes, I realize Rockbox can play this source gaplessly without having to enclose anything in an M4A container... but this is for my wife's iPod. She is a Mac fanatic, she uses iTunes, and I'm not about to ask her to switch. 

    - M.

pcutmp3 tool

Reply #72
Have you considered working any more on the "rejoin" feature you hinted at in your initial post?
...
If someone has a live recording (picture an outdoor festival...) that was encoded with L.A.M.E., and which plays gaplessly in players that support the L.A.M.E. tag, it should be possible - assuming one can losslessly rejoin those MP3s - to enclose the rejoined MP3 in an MP4/M4A container, add chapter stops, and play the result gaplessly on an iPod.

"rejoining" will only work if the mp3 stream has been split using pcutmp3. It won't do the trick if you have seperately encoded MP3 files (even when they play back gaplessly). Regarding wrapping it into an MP4 container: I simply don't have the resources to do that nor I'm willing to invest too much time on a feature that will hardly be used by anyone. Sorry. TBH, I very rarely use pcutmp3 itself which kind of explains the lack of motivation to improve it any further for now. It's in a usable state and serves its main purpose. However I do have a little TO-DO list for pcutmp3 which I intend to work through (rewrite of the core, enabling rejoining (to mp3))

Sebastian

pcutmp3 tool

Reply #73
"rejoining" will only work if the mp3 stream has been split using pcutmp3. It won't do the trick if you have seperately encoded MP3 files (even when they play back gaplessly).

Oh... well, thank you for clarifying. Guess I somehow assumed you'd found a way to concatenate a L.A.M.E.-encoded set and eliminate the encoder gap.

    - M.

pcutmp3 tool

Reply #74
Sebi: if you think you can rejoin only pcutmp3 files, then could the following be done:
- use pcutmp3 to (quoting you here) "mark the silence frame (which only carries data in its main data section) as such and include some meta information. This allows rejoining of files automatically (in the future)"

What I'm getting at is: apply pcutmp3 to 'normal' mp3s (using some sort of samllest 'cut' time frame or maybe just the bit that marks the silence frame [and anything else that's required]) and then they should be available to rejoin.

I was just trying to apply a bit of lateral thinking to it.  Of course, getting pcutmp3 to do this might not be possible.