HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - General => Topic started by: SebastianG on 2005-07-18 12:05:16

Title: pcutmp3 tool
Post by: SebastianG on 2005-07-18 12:05:16
Hi !

I got quite a few PMs about the mp3 splitter (read more  here (http://www.hydrogenaudio.org/forums/index.php?showtopic=35612&view=findpost&p=314141)). Because of that and the fact that it seems to be doing what it's supposed to I decided to make the current beta version public.

A Java Runtime Environement 1.4 or higher.is needed. You can call the application in the commandline via:
java -jar pcutmp3.jar <parameters>
(Leave parameters blank to see a help screen)

Splitting with a cue sheet is pretty simple. Here's an example:
java -jar pcutmp3.jar --cue something.cue something.mp3

WARNING:
Your player needs to properly support the LAME tag. If it doesn't you'll hear gaps. I tested it with Foobar 0.8.3 and Foobar 0.9 beta 5. Unfortunately the older one ignores encoder delay values above 1152 in the LAME tag (edit: see post #5 for Foobar 0.8.3). Since pcutmp3 usually creates mp3 files with encoder delays of around 2000 samples it won't work in Foobar 0.8.3. In combination with Foobar 0.9 beta 5 it works like charm. WinAMP + otachan's in_mpg123 + some good output-plug probably also works fine. So, use this app only if it makes sense to use it. The number of players which properly interpret the LAME tag is pretty low !! If your player does you can use pcutmp3 to do sample granular cuts.

How it works:
This app analyzes the source mp3 file and its Xing/Info/LAME tag and allows cutting it at *any* positions through the use of the LAME tag's encoder_delay/padding fields. It generates for each track you crop out of the large source file a new Xing/Info/LAME tag frame filled appropriately and resolves the problem of missing bitreservoir data via a "silence frame" (holding the missing data) that directly follows the Xing/Info/LAME tag frame. This additional delay (due to this "silence frame") is also compensated via the encoder_delay setting which explains the high values it produces (576...2879). It should be possible to rejoin files losslessly (not yet implemented).

Sebi

direct link to version 0.95 beta (http://homepages.upb.de/sgeseman/pcutmp3.jar) (I'm sorry, this is a dead link)
Feedback is appreciated.
Title: pcutmp3 tool
Post by: Peter on 2005-07-18 12:11:34
Try zipping it, allowed upload file extensions are restricted to specific list.
Title: pcutmp3 tool
Post by: SebastianG on 2005-07-18 12:26:56
Quote
Try zipping it, allowed upload file extensions are restricted to specific list.
[a href="index.php?act=findpost&pid=314306"][{POST_SNAPBACK}][/a]


Okay. Thank you for the tip.
I finally took the chance to activate my university homepage.
The link should work.

Sebi
Title: pcutmp3 tool
Post by: SebastianG on 2005-07-18 14:38:22
0.91b -> 0.92b:
- fixed seek table generation (VBR tag)
Title: pcutmp3 tool
Post by: SebastianG on 2005-07-20 14:06:03
For those who use Foobar 0.8.3 and want it to be tolerant enough (in terms of enc_delay values) so that mp3 files that pcutmp3 produced are supported:

Close Foobar 0.8.3 if it's open
Grab a hex editor and open foo_input_std.dll
At offset  767f (hex) there's "80 04 00 00" (if not you've probably the wrong version. Stop here!)
Change it to "40 0B 00 00"
Save it
Start Foobar 0.8.3

That did it for me. (Yay!)
(You probably have to reload file infos to get the correct enc_dlay/padding values)

Code: [Select]
before:
00007670:  E6 04 C1 E0  08 03 CE 03  C2 85 C9 7C  21 81 F9 80
00007680:  04 00 00 7F  19 85 C0 7C  15 3D 00 09  00 00 7F 0E
afterwards:
00007670:  E6 04 C1 E0  08 03 CE 03  C2 85 C9 7C  21 81 F9 40
00007680:  0B 00 00 7F  19 85 C0 7C  15 3D 00 09  00 00 7F 0E


The relevant lines of code are (mp3.cpp):
Code: [Select]
if (enc_delay>=0 && enc_delay<=1152 && enc_padding>=0 && enc_padding <= 2304)
{
       pTagData->enc_delay=enc_delay;
       pTagData->enc_padding=enc_padding;
}
else
{
       pTagData->enc_delay = -1;
       pTagData->enc_padding = -1;
}

By chaning "80 04" in the hex editor to "40 0B" you are replacing the 1152 in the if-statement with 2880. This seems to be some kind of validity test to prevent misinterpreting data which IMHO should be done via checking the LAME-tag's CRC16 checksum.

Please don't blame me if something goes wrong. Do it at your own risk.

Sebi
Title: pcutmp3 tool
Post by: jaybeee on 2005-07-20 14:25:22
Excellent work SebastianG.  I look forward to having a play with this beta version, and amending foobar.

A few things:

(1) Does the 'crop' functionality work now (sorry, I'm at work and cannot d/l this yet)?

(2) If you could losslessly rejoin these split/cut files then that would be great too.

(3) Re. your 'Warning 2' statement in your first post: I think you should make it override it whenever it doesn't find 'index 01 00:00:00', but add an option for the user not override it if they prefer.

Many thanks for this.
Title: pcutmp3 tool
Post by: SebastianG on 2005-07-20 14:39:02
Quote
(1) Does the 'crop' functionality work now (sorry, I'm at work and cannot d/l this yet)?
[a href="index.php?act=findpost&pid=314876"][{POST_SNAPBACK}][/a]

Yes.
Quote
(2) If you could losslessly rejoin these split/cut files then that would be great too.
[a href="index.php?act=findpost&pid=314876"][{POST_SNAPBACK}][/a]

Will come. But don't expect this feature too soon.

Quote
(3) Re. your 'Warning 2' statement in your first post: I think you should make it override it whenever it doesn't find 'index 01 00:00:00', but add an option for the user not override it if they prefer.
[a href="index.php?act=findpost&pid=314876"][{POST_SNAPBACK}][/a]

OK.

Sebi
Title: pcutmp3 tool
Post by: kode54 on 2005-07-20 14:53:10
Quote
This seems to be some kind of validity test to prevent misinterpreting data which IMHO should be done via checking the LAME-tag's CRC16 checksum.[a href="index.php?act=findpost&pid=314872"][{POST_SNAPBACK}][/a]

VBR tag usually has the CRC disabled.

Another method of validation is to check for the "LAME" or "GOGO", like the VBR tag parser I borrowed for the example splitter I posted before... Hmm... (Although, this would break older tags, since this field is supposed to identify the encoder, and since foobar2000 does not assume the encoder when generating a new VBR tag, it leaves the entire string null.)
Title: pcutmp3 tool
Post by: SebastianG on 2005-07-20 16:03:52
Quote
Quote
This seems to be some kind of validity test to prevent misinterpreting data which IMHO should be done via checking the LAME-tag's CRC16 checksum.[a href="index.php?act=findpost&pid=314872"][{POST_SNAPBACK}][/a]

VBR tag usually has the CRC disabled.

Another method of validation is to check for the "LAME" or "GOGO", like the VBR tag parser I borrowed for the example splitter I posted before... Hmm... (Although, this would break older tags, since this field is supposed to identify the encoder, and since foobar2000 does not assume the encoder when generating a new VBR tag, it leaves the entire string null.)
[a href="index.php?act=findpost&pid=314882"][{POST_SNAPBACK}][/a]


I guess we agree on that there isn't a good way of determining wheter a LAME tag is present or not.
My proposal would be to verify the CRC16. But I'm aware of that Foobar's FixMP3 header plugin creates an all-zero "LAME tag" with only enc_delay/padding set.

Sebi
Title: pcutmp3 tool
Post by: kode54 on 2005-07-23 16:35:39
Quote
My proposal would be to verify the CRC16. But I'm aware of that Foobar's FixMP3 header plugin creates an all-zero "LAME tag" with only enc_delay/padding set.
[a href="index.php?act=findpost&pid=314897"][{POST_SNAPBACK}][/a]

There is no way to verify the CRC16 if the tagger does not create a packet which uses it, and I am not aware of any tagger which creates a packet with CRC16 enabled for the VBR header. I am not even sure if LAME does this if you explicitly enable CRC during encoding.
Title: pcutmp3 tool
Post by: SebastianG on 2005-07-24 14:16:49
Quote
Quote
My proposal would be to verify the CRC16. But I'm aware of that Foobar's FixMP3 header plugin creates an all-zero "LAME tag" with only enc_delay/padding set.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=314897")

There is no way to verify the CRC16 if the tagger does not create a packet which uses it, and I am not aware of any tagger which creates a packet with CRC16 enabled for the VBR header. I am not even sure if LAME does this if you explicitly enable CRC during encoding.
[a href="index.php?act=findpost&pid=315522"][{POST_SNAPBACK}][/a]


I think you got something wrong. I was talking about the LAME tag's CRC16 checksum (the last 16 bit of the tag - ALWAYS present in a LAME tag) which covers all previous bytes including the frame header. LAME always produces a "correct" CRC (though you have to do things differently compared to the optional CRC16 which folows directly the frame header (if the protection bit is zero) and only covers the last 2 bytes of the header and the side info section).

There's no way of signalling whether this field is valid or not (via a flag somewhere). It's either correct or not. To prevent misinterpreting data I proposed that this CRC16 checksum should be checked. This seems to be the best approach. I don't like the idea of testing the first four characters of the LAME tag if it matches "LAME" or "GOGO" since the specification only says that these four characters are just identifying the encoder and are NOT a static marker (indicating the presence of a LAME tag) . It could be anything.

[a href="http://gabriel.mp3-tech.org/mp3infotag.html]http://gabriel.mp3-tech.org/mp3infotag.html[/url]

BTW: Since pcutmp3 almost always produces an additional silenceframe as first music frame (containing important main data bytes for the following frame) I forced creation of such a frame for all situations (not yet released) carrying some more meta informations (10 bytes don't hurt). Identifying such a frame is simple. Right behind the side info block this is following:

4 ASCII charactsers: "PCUT"
1 byte: PCUT tag revision (currently zero)
5 bytes: 40 bit big-endian integer named "absolute start sample"
  (identifying the absolute start sample in the original encoding)
(variable amount of bytes) padding via ASCII character 'x'
(variable amount of bytes) main-data bytes for the following frame

bye,
Sebi
Title: pcutmp3 tool
Post by: phwip on 2005-08-20 00:07:13
Thanks for this little program, could prove to be very useful.  I too would love the lossless rejoin feature if possible.

I've noticed that it seems to write weird values in the ATH type field in the LAME tag.  These don't match the value from the original mp3 file.

I would agree that checking for the strings LAME or GOGO to identify the existence of the LAME tag is not a great idea.  Particularly because ACMEnc (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_3.html) also writes LAME tags and this will write anything into those four bytes, whatever the user specifies to identify the codec they have used.  It is a shame that foobar2000 doesn't write the Info Tag CRC at the end of the LAME tag because everything else I know of that writes a LAME tag sets this value so it might otherwise make a good test for the existence of a LAME tag.
Title: pcutmp3 tool
Post by: SebastianG on 2005-08-20 11:36:39
Quote
I've noticed that it seems to write weird values in the ATH type field in the LAME tag.  These don't match the value from the original mp3 file.
[a href="index.php?act=findpost&pid=321211"][{POST_SNAPBACK}][/a]


If you're right, then it's due to a bug. The only thing that I intend to change is the encoder delay / padding and the RG data. What tool did you use to check that ?

Sebi
Title: pcutmp3 tool
Post by: phwip on 2005-08-20 12:05:46
I used LameTag.exe (http://phwip.f2o.org/).  On the file I tested the following were changed: ATH Type, Encoder Delay and Padding, Music Length and InfoTag CRC, all of which make sense except for the ATH Type.  The RG wasn't changed but it wasn't set in the file I tested anyway.
Title: pcutmp3 tool
Post by: SebastianG on 2005-08-20 13:07:13
OK. I found the bug. (I'm also trying to set the no-gap bits which are located in the same byte the ATH setting is stored in to zero. The lower 6 bit have been taken from one of the lame tag CRC bytes instead of the original ATH byte)

I'll soon anounce an update in this thread.

Thank you, phwip, for reporting this.

Sebi
Title: pcutmp3 tool
Post by: SebastianG on 2005-08-21 13:04:31
changes (0.92b -> 0.93b)

- fixed lame tag bug (ATH meta information was wrong)
- proper handling of the no-gap meta informations in the LAME tag
- marks the silence frame (which only carries data in its main data section) as such and includes some meta informations. This allows rejoining of files  automatically (in the future)
- if mp3 source file is not given the file reference in the cue sheet is evaluated
- added option "--dir" to specify the output directory
- when splitting mp3 files according to a cue sheet the first track will now also always include the part prior index 1 (if greater than 00:00:00)
- error message (could not open source mp3) is now telling you the filename
  of the file it tried to open.

http://homepages.upb.de/sgeseman/pcutmp3.jar (http://homepages.upb.de/sgeseman/pcutmp3.jar)

@moderators: This thread should probably be moved to some other forum.

Sebi
Title: pcutmp3 tool
Post by: Mr_Rabid_Teddybear on 2005-08-21 13:38:54
Commandline still says v0.92b.
Title: pcutmp3 tool
Post by: SebastianG on 2005-08-21 13:53:53
Damn ...
(I havn't correctly updated the symbolic link, sorry!)

It should work now.

Sebi
Title: pcutmp3 tool
Post by: dignick on 2005-09-24 17:16:11
Are you still working on this sebi?
I've got quite a few things waiting to be split, but I'd really like the tagging done for me, because it can get quite tiresome entering it all by hand.  And as far as I know, your still the only one who has made a splitter that does its job properly 
Thats my only request atm, I can manage without a gui

Thanks
Title: pcutmp3 tool
Post by: The Link on 2005-09-24 17:24:19
Quote
Are you still working on this sebi?
I've got quite a few things waiting to be split, but I'd really like the tagging done for me, because it can get quite tiresome entering it all by hand.
Thats my only request atm, I can manage without a gui

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

If you are a foobar2000 user, just load the cue sheet with the tags in a new playlist then put the files from the splitted image file below (in the correct order), select the whole playlist and right click>Tagging>copy info (in fb2k0.9beta).
Title: pcutmp3 tool
Post by: dignick on 2005-09-24 17:50:54
Quote
Quote
Are you still working on this sebi?
I've got quite a few things waiting to be split, but I'd really like the tagging done for me, because it can get quite tiresome entering it all by hand.
Thats my only request atm, I can manage without a gui

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

If you are a foobar2000 user, just load the cue sheet with the tags in a new playlist then put the files from the splitted image file below (in the correct order), select the whole playlist and right click>Tagging>copy info (in fb2k0.9beta).
[a href="index.php?act=findpost&pid=329301"][{POST_SNAPBACK}][/a]


Thanks, that will help a lot!  This splitter should be all over instead of the many that only do half a job.  Anyway.  Thanks again.
Title: pcutmp3 tool
Post by: SebastianG on 2005-09-25 16:15:56
Quote
Are you still working on this sebi?
I've got quite a few things waiting to be split, but I'd really like the tagging done for me, because it can get quite tiresome entering it all by hand.  And as far as I know, your still the only one who has made a splitter that does its job properly 
Thats my only request atm, I can manage without a gui

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


Hi! To answer your first question: No, currently not. I agree that ID3 / APEv2 tag support would be a great idea and the implementation of it should not be too complicated (just a bit time consuming). I'll probably look after it the next week-end.

bye,
Sebi
Title: pcutmp3 tool
Post by: jaybeee on 2005-09-25 18:40:41
Available options in v.93b are:
  --cue cue-filename      split source mp3 via cue sheet
  --crop t:s-e[,t:s-e[]]  crop tracks manually, t = track#
                          s = start sample (inclusive)
                          e = end sample (exclusive)
  --out "sheme"            specify custom naming sheme where
                          %s = source filename (without extension)
                          %t = tracknumber (leading zero)
                          Default is "%s-%t"
  --dir <directory>        specify destination directory
                          Default is the current working directory

It would be great if the 'crop' option allowed the user to enter a time in minutes &/or seconds. 

Thanks Sebi
Title: pcutmp3 tool
Post by: SebastianG on 2005-09-30 15:01:24
changed 0.93b -> 0.94b (not heavily tested)

- now interpreting of PERFORMER and TITLE commands in CUE sheets
- ability to write ID3 tags (only ID3v1.1, tag(s) of source file is/are currently ignored)
- new variables for naming sheme (artist, album and title, note: tracknumber %t changed to %n)
- ability to set/override artist and album via commandline
- ability to specify the start/end time via [XXm]YY[.ZZ]s as well when cropping manually

All the links point to the new version now.


Sebi
Title: pcutmp3 tool
Post by: Synthetic Soul on 2005-09-30 15:33:10
Very minor point:

Code: [Select]
--out <sheme>           specify custom naming sheme where
                        %s = source filename (without extension)
                        %n = track number (leading zero)
                        %t = track title (from CUE sheet)
                        %p = track performer (from CUE sheet)
                        %a = album name (from CUE sheet)
                        Default is "%s-%n"


"sheme" should be "scheme".  Two separate uses.

Thanks for this tool.
Title: pcutmp3 tool
Post by: dignick on 2005-10-02 09:53:17
Thanks sebi.  Any plans to add ID3V2?
Title: pcutmp3 tool
Post by: SebastianG on 2005-10-02 13:33:33
Quote
Thanks sebi.  Any plans to add ID3V2?
[a href="index.php?act=findpost&pid=331005"][{POST_SNAPBACK}][/a]


If I manage to find a good implementation of ID3v2 in Java, then it should be a matter of a few minutes to add ID3v2 support. Frankly, I wasn't that pleased with the things I found when I looked for ID3 code in Java (might be me not looking at the right places) so I quickly wrote some simple ID3v1.1 stuff.

BTW: The source code is always included in the JAR package. So, if someone feels like improving MainCLI.java and/or adding ID3v2 / APEv2 support I'd be fine with it.

@Synthetic Soul: thanks for pointing out that I should've used "scheme". I already silently updated the 0.94b version two days ago.

Sebi
Title: pcutmp3 tool
Post by: dignick on 2005-10-04 17:50:02
Quickly looking around, the most stable project written in java appears to be MP3Info (http://sourceforge.net/projects/mp3info/).  Don't know if this helps.  Foobar works fine to copy the tags until you include id3v2 in pcutmp3, so i'm not trying to put pressure on you, it would just be nice to see it.

One feature request that I have though, particularly if you do include id3v2 support, is the ability to save preferences.  Would be much easier to just type java -jar pcutmp3.jar --cue "file" and it to split using pre-specified options, for example the file naming scheme.

Thanks again sebi, wicked app. 

EDIT: Stupid me, don't need preferences when you can type a batch file!

EDIT2:  On some characters i get things like
Code: [Select]
writing "c:\edit\Cut\05 - Roman Flugel - GehtÆs Noch?.mp3" ...
Exception in thread "main" java.io.FileNotFoundException: c:\edit\Cut\05 - Roman
Flugel - GehtÆs Noch?.mp3 (The filename, directory name, or volume label syntax
is incorrect)
       at java.io.FileOutputStream.open(Native Method)
       at java.io.FileOutputStream.<init>(Unknown Source)
       at java.io.FileOutputStream.<init>(Unknown Source)
       at de.zebee.mpa.MainCLI.main(MainCLI.java:241)

Could pcutmp3 ignore this file or replace the problem character with a user-specified or default character so it doesn't interupt processing?

Thanks
Title: pcutmp3 tool
Post by: SebastianG on 2005-10-04 20:44:12
Quote
EDIT2:  On some characters i get things like
Code: [Select]
writing "c:\edit\Cut\05 - Roman Flugel - GehtÆs Noch?.mp3" ...
Exception in thread "main" java.io.FileNotFoundException: c:\edit\Cut\05 - Roman
Flugel - GehtÆs Noch?.mp3 (The filename, directory name, or volume label syntax
is incorrect)
       at java.io.FileOutputStream.open(Native Method)
       at java.io.FileOutputStream.<init>(Unknown Source)
       at java.io.FileOutputStream.<init>(Unknown Source)
       at de.zebee.mpa.MainCLI.main(MainCLI.java:241)

Could pcutmp3 ignore this file or replace the problem character with a user-specified or default character so it doesn't interupt processing?

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

Oh, I did not think about characters (like '?' and '*') some operating systems don't like in filenames. This will be fixed of course soon.

bye,
Sebi
Title: pcutmp3 tool
Post by: dignick on 2005-10-17 15:56:18
Forgotten to mention this before, if you burn tracks you split with pcutmp3 to an audio cd using foobar, it plays back gapless, which is good, and the only reason I can see that you would want to merge tracks back together for.
Title: pcutmp3 tool
Post by: jaybeee on 2005-12-06 10:41:10
Sebi - been using the tool for a while now and it's very useful and very good; esp now with the ability to specify time in the 'crop' fucntion.  Any future enhancements planned, like the id3v2 support?

Thanks
Title: pcutmp3 tool
Post by: senab on 2005-12-18 20:23:31
There's only one thing that annoys me with this tool....

The fact it makes CBR files VBR. For instance when cutting a 192kbits CBR mp3, the first frame is 128kbits and the rest is 192kbits. This messes up my Rio Karma as for some reason it can't read the MP3 length properly...  If anyone else would like to test this out. Btw I used Encspot to look at the file bitrates.

Other than that, great tool Seb 


//EDIT... Spelling
Title: pcutmp3 tool
Post by: SebastianG on 2005-12-19 17:34:04
Quote
There's only one thing that annoys me with this tool....

The fact it makes CBR files VBR. For instance when cutting a 192kbits CBR mp3, the first frame is 128kbits and the rest is 192kbits. This messes up my Rio Karma as for some reason it can't read the MP3 length properly...   If anyone else would like to test this out. Btw I used Encspot to look at the file bitrates.
[a href="index.php?act=findpost&pid=351050"][{POST_SNAPBACK}][/a]


I can't test pcutmp3 at the moment, but I think I know what's going on. It's most likely the consequence of both (pcutmp3 and your Karma-mp3-decoder) behaving a bit incompatible.

Yes, pcutmp3 currently produces a first audio frame which is usually very small followed by a subset of the original frames. This first frame solely contains some main data filling the bitreservoir for the next frame. But pcutmp3 fills the header frame (imho) appropriately (frame count, size of all audio frames in bytes, "INFO" tag indicating a CBR file.

The Karma firmware seems to get the bitrate informations from the first audio frame (when a header frame with a "INFO" tag is present). They could have also just evaluated the frame-count field of the header which won't lead to the problem you are experiencing.

A quick hack of pcutmp3 is possible to make most of the cases work with your Karma (making this reservoir filler frame as large as the other ones if possible). My time is currently very limited. This change may take a while.

However, the Karma firmware developer team should (imho) think about a better way of determining the bitrate / length (ie using the frame count from the header frame)

Sebi
Title: pcutmp3 tool
Post by: Shade[ST] on 2005-12-19 18:32:55
The karma dev team will not be developing a discontinued product, I think.
Title: pcutmp3 tool
Post by: senab on 2005-12-20 16:41:36
Quote
There's only one thing that annoys me with this tool....

The fact it makes CBR files VBR. For instance when cutting a 192kbits CBR mp3, the first frame is 128kbits and the rest is 192kbits. This messes up my Rio Karma as for some reason it can't read the MP3 length properly...   If anyone else would like to test this out. Btw I used Encspot to look at the file bitrates.

Other than that, great tool Seb 


//EDIT... Spelling
[a href="index.php?act=findpost&pid=351050"][{POST_SNAPBACK}][/a]



It works fine with native VBR mp3's, just not CBR. I'll try and have a look at Pcut and see if I can hack it and change it. 
Title: pcutmp3 tool
Post by: SebastianG on 2005-12-21 08:16:00
Quote
It works fine with native VBR mp3's, just not CBR. I'll try and have a look at Pcut and see if I can hack it and change it. 
[a href="index.php?act=findpost&pid=351457"][{POST_SNAPBACK}][/a]


Let me give you a starting point how one can fix that:
Goal: Increasing the size of the bit reservoir filler frame to match the CBR bitrate.
How 2 carry it out: Let the for loop in constructReservoirFrame start at the appropriate bitrate-index in case of isVBR being false. This index could be derived via the field avgBitrate (in kbps).

Although this would not be too time consuming I can't handle it myself right now.

Your help is appreciated

Sebi
Title: pcutmp3 tool
Post by: jaybeee on 2005-12-21 12:15:58
he he, I asked Sebi a similar question the other day too.

Quote
Quote

About your pcutmp3 tool.  I've been using it some more and have even recommended it to a few others on another forum; although I have told them that they should use this at their own risk.  Anyway, I've noticed that when I crop an mp3 encoded via fhg the lame_version gets set to 'LAME', when of course it shouldn't be, as it was never LAME to begin with.

Quote
Understood. The thing is: Sample accurate splicing only works in conjunction with the "LAME tag". So, in order to cut accurately a LAME tag is inserted into the first frame of each of the generated mp3 files. Unfortunately the LAME devs designed this tag as they did -- meaning there's no good way of telling whether this tag is presend or not. So, in order to make pcutmp3 produce mp3 files so that most players recognize this tag it's necessary to embedd the character string "LAME" in there. Though, this may lead some applications to think that this file has been encoded by LAME.

IMHO the only GOOD way of checking the presence of the LAME tag is to check the CRC16 checksum of the tag. PCUTMP3 produces a *correct* CRC16 checksum according to the LAME tag specification whereas Foobar2K's fix-VBR-header-plugin *DOES NOT* -- just to mention that...


Quote
I suspect you're a busy man, but I'd be happy to host your tool on my site if a couple of fixes/enhancements could be made: id3v2 support & the lame_version thing.

Quote
Can't do. Time is really limited atm. Feel free to distribute the tool. Source code is included in the JAR archive. The part where all the magic is in (ScannedMP3.java) is a bit messy but I cleaned most of the other stuff. It should be easy to write your own interface or to add ID3v2 support.
Sebi


@Sebi - hope you don't mind me quoting you.  If you do mind, let me know and I'll remove it.

So senab, if you are up for enhancing this little tool then I'd be very happy too.
Title: pcutmp3 tool
Post by: senab on 2005-12-21 14:19:31
OK, let me have a look and I'll post what I've done later...


Just a quick question Sebi, in ScannedMP3.java, in the for loop in constructReservoirFrame, what is the variable bri?
Title: pcutmp3 tool
Post by: SebastianG on 2005-12-21 16:25:22
Quote
OK, let me have a look and I'll post what I've done later...


Just a quick question Sebi, in ScannedMP3.java, in the for loop in constructReservoirFrame, what is the variable bri?
[a href="index.php?act=findpost&pid=351658"][{POST_SNAPBACK}][/a]


bri = bit rate index ... this is an index into the well known bitrate table.
This index is part of the 32 bit frameheader and defines the frame's size in conjunction with the padding bit. IIRC there's a FrameHeader class which might be helpful here.


Sebi
Title: pcutmp3 tool
Post by: Jojo on 2006-01-06 01:51:27
does it also work when cutting CBR non Lame files? Let's say FhG? Will those files get a Lame Header or what?

thanks

Edit: works great with VBR files. However, I noticed that the Music CRC doesn't match with the actual Music CRC. The original file is fine. The Lame-Header CRC matches...
Title: pcutmp3 tool
Post by: PzyMazter on 2006-01-06 05:44:09
I cannot seem to get files I split using this tool to play in the Karma correctly at all, they seem to skip the first frame entirely (sounds like it skips a whole second).

Has anyone figured out why? I guess I'm not very technically understanding of how the Karma works..
Title: pcutmp3 tool
Post by: jaybeee on 2006-01-06 09:08:30
Quote
does it also work when cutting CBR non Lame files? Let's say FhG? Will those files get a Lame Header or what?

thanks

Edit: works great with VBR files. However, I noticed that the Music CRC doesn't match with the actual Music CRC. The original file is fine. The Lame-Header CRC matches...
[a href="index.php?act=findpost&pid=354942"][{POST_SNAPBACK}][/a]

Jojo - see my post on Dec 21 2005, 12:15 PM. 
It does cut CBR files ok (and FhG), but as I say, and as Sebi says too, it 'changes' the file to VBR, and adds the values 'LAME' to the lame_version data field.

It's a shame Sebi hasn't got time to look at this tool some more to maybe make it into a real contender for splitting files.  I mean I still use it and like it, but maybe a few tweaks to add id3v2 support & sort out the the lame_version thing would be really useful and perhaps can more appreciation from a wider audience.

senab said he was gonna have a look at the code.  If anyone else with java coding experience would like to have a play I'm sure many peeps would be happy
Title: pcutmp3 tool
Post by: markanini on 2006-01-06 12:46:15
Also if someone could make a GUI that would be nice.
Title: pcutmp3 tool
Post by: Jojo on 2006-01-06 23:44:36
Quote
Thanks sebi.  Any plans to add ID3V2?
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=331005")

i don't think that is the most important task for now, since there are plenty of other programs out there you can use for that purpose.

Quote
It does cut CBR files ok (and FhG), but as I say, and as Sebi says too, it 'changes' the file to VBR, and adds the values 'LAME' to the lame_version data field.
[a href="index.php?act=findpost&pid=354991"][{POST_SNAPBACK}][/a]

thanks. What about the CRC issue I've reported? I'd like to know if that is a bug (most likely it is), because I wanted to split a bunch of stuff...

Quote
Also if someone could make a GUI that would be nice.
[a href="index.php?act=findpost&pid=355014"][{POST_SNAPBACK}][/a]

I second that.

@ all
has someone tried [a href="http://mp3splt.sourceforge.net/]http://mp3splt.sourceforge.net/[/url]
Title: pcutmp3 tool
Post by: jaybeee on 2006-01-07 23:21:32
Quote
Quote
Thanks sebi.  Any plans to add ID3V2?
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=331005")

i don't think that is the most important task for now, since there are plenty of other programs out there you can use for that purpose.

True
Quote
Quote
It does cut CBR files ok (and FhG), but as I say, and as Sebi says too, it 'changes' the file to VBR, and adds the values 'LAME' to the lame_version data field.
[a href="index.php?act=findpost&pid=354991"][{POST_SNAPBACK}][/a]

thanks. What about the CRC issue I've reported? I'd like to know if that is a bug (most likely it is), because I wanted to split a bunch of stuff...

I'll have a play and see what I find.
Quote
@ all
has someone tried [a href="http://mp3splt.sourceforge.net/]http://mp3splt.sourceforge.net/[/url]
[a href="index.php?act=findpost&pid=355157"][{POST_SNAPBACK}][/a]

Yep.  It's good.  It was the first lossless splitter I used.  No install on the command line version - which I prefer actually. But I don't think it's quite as good as Sebi's frame splitting code, i.e. not as accurate.  But it is much more stable/tested/experienced etc.
Title: pcutmp3 tool
Post by: Jojo on 2006-01-17 00:36:52
here is another little bug: pcutmp3 assumes that every cue sheet starts at 0:00.00,  therefore, if you have a cue sheet that starts at 0:05.00 for instance, pcutmp3 will still start to cut @ 0:00.00
Title: pcutmp3 tool
Post by: SebastianG on 2006-01-17 09:05:29
Hello y'all !

Quote
does it also work when cutting CBR non Lame files? Let's say FhG? Will those files get a Lame Header or what?
[a href="index.php?act=findpost&pid=354942"][{POST_SNAPBACK}][/a]

Yes. pcutmp3 simply defaults to an encoder delay of 576 samples and writes the LAME tag. The LAME tag is really an intergral part of the whole pcutmp3 idea ... So, it's added if it wasn't there before and this is being done with the "LAME" string as some kind of LAME-tag marker for maximum support. This of course might fool some applications to think the mp3 has been encoded via LAME. As I said before, I don't think there's a better way of doing things here because of the LAME tag format specification not specifying any good way of determining its presence.

Quote
Edit: works great with VBR files. However, I noticed that the Music CRC doesn't match with the actual Music CRC. The original file is fine. The Lame-Header CRC matches...
[a href="index.php?act=findpost&pid=354942"][{POST_SNAPBACK}][/a]

This is intentional. According to the LAME tag specification the Music CRC is something that should not be altered. If we don't alter it, this Music CRC serves as an ID with which it is possible to automatically gather pieces of the same original track. This and the special PCUT tag together allows automatic rejoining. Something for the future development.

Quote
here is another little bug: pcutmp3 assumes that every cue sheet starts at 0:00.00,  therefore, if you have a cue sheet that starts at 0:05.00 for instance, pcutmp3 will still start to cut @ 0:00.00
[a href="index.php?act=findpost&pid=357704"][{POST_SNAPBACK}][/a]

This is intentional as well. I'm not a fan of throwing anything away. The CUE split function was supposed to partition the original mp3 without loosing the pregap. This I thought makes most sense, doesn't it ?

Sebi
Title: pcutmp3 tool
Post by: Jojo on 2006-01-18 05:59:54
thanks for your answer.
Quote
Quote
here is another little bug: pcutmp3 assumes that every cue sheet starts at 0:00.00,  therefore, if you have a cue sheet that starts at 0:05.00 for instance, pcutmp3 will still start to cut @ 0:00.00
[a href="index.php?act=findpost&pid=357704"][{POST_SNAPBACK}][/a]

This is intentional as well. I'm not a fan of throwing anything away. The CUE split function was supposed to partition the original mp3 without loosing the pregap. This I thought makes most sense, doesn't it ?
[a href="index.php?act=findpost&pid=357743"][{POST_SNAPBACK}][/a]

I guess it does make sense, however, I changed a cue sheet and just wanted portions of a song. That is no problem when being done in the middle of the file, however, since it was at the beginning I ran into trouble. I ended up adding an extra track to the cue sheet and that worked like a charm.

Anyway, heads up for your great program. Thank you.
Title: pcutmp3 tool
Post by: dignick on 2006-02-07 14:57:32
Nice to see this is staying alive.  It's great even without id3v2 tagging, and yes I just create the tags from the filename afterwards, it takes me about an extra 10 seconds, so it isn't particularly important for me.
I use it for all my cue's, a batch file in the context menu cuts any cue with one click.
I hope it gets improved by someone else and gets the recognition it deserves because it beats eveything else IMO.
Thanks again sebi and anyone else who may be working on it 
Title: pcutmp3 tool
Post by: markanini on 2006-02-08 00:47:21
Could accuracy of the cut itself, that is, letting it be shifted around in time, be sacrifised for getting smaller padding values?
Title: pcutmp3 tool
Post by: pokecapn on 2006-02-19 02:59:25
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)
Title: pcutmp3 tool
Post by: SebastianG on 2006-02-19 05:56:29
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
Title: pcutmp3 tool
Post by: pokecapn on 2006-02-19 08:51:25
first 10 seconds of the mp3: http://rapidshare.de/files/13607490/Essent...2005-2.mp3.html (http://rapidshare.de/files/13607490/Essential_Mix_-_Mylo_-_10-APR-2005-2.mp3.html)
cue: http://rapidshare.de/files/13607522/Essent...2005-2.cue.html (http://rapidshare.de/files/13607522/Essential_Mix_-_Mylo_-_10-APR-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.
Title: pcutmp3 tool
Post by: SebastianG on 2006-02-20 07:59:31
A quick fix that might work: Fix the bit reservoir errors using mp3brfix (http://www.hydrogenaudio.org/forums/index.php?showtopic=34865). 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
Title: pcutmp3 tool
Post by: SebastianG on 2006-02-20 14:23:15
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
Title: pcutmp3 tool
Post by: Jojo on 2006-04-17 01:36:00
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
Title: pcutmp3 tool
Post by: SebastianG on 2006-04-17 02:38:09
No. There shouldn't be a problem.

Sebi
Title: pcutmp3 tool
Post by: dignick on 2006-05-17 13:55:06
I use XBMC (http://www.xboxmediacenter.com) 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 (https://sourceforge.net/tracker/?func=detail&atid=581838&aid=1468564&group_id=87054) 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.
Title: pcutmp3 tool
Post by: jaybeee on 2006-05-17 15:06:23
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.
Title: pcutmp3 tool
Post by: SebastianG on 2006-05-17 18:12:22
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
Title: pcutmp3 tool
Post by: Jojo on 2006-05-20 05:53:45
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
Title: pcutmp3 tool
Post by: dignick on 2006-05-21 17:37:00
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!
Title: pcutmp3 tool
Post by: SebastianG on 2006-05-22 08:02:19

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
Title: pcutmp3 tool
Post by: vlada on 2006-05-31 16:19:27
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.
Title: pcutmp3 tool
Post by: Raiden on 2006-06-05 14:51:55
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! 
Title: pcutmp3 tool
Post by: Matyas on 2006-06-07 20:44:06
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?
Title: pcutmp3 tool
Post by: Jojo on 2006-06-07 23:11:30
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
Title: pcutmp3 tool
Post by: SebastianG on 2006-06-08 09:16:39
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
Title: pcutmp3 tool
Post by: mixminus1 on 2006-06-08 14:25:44

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...
Title: pcutmp3 tool
Post by: Raiden on 2006-06-08 15:04:19
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 (http://img58.imageshack.us/img58/5114/length0fq.png) 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 (http://www.underworldlive.com/index/shop.html) lately. Their last one, which was released on Monday, was accidently encoded at 48000hz. They have fixed that in the meantime though.
Title: pcutmp3 tool
Post by: SebastianG on 2006-06-08 16:32:21
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
Title: pcutmp3 tool
Post by: M on 2006-06-20 23:01:06
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.
Title: pcutmp3 tool
Post by: SebastianG on 2006-06-21 08:24:23
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
Title: pcutmp3 tool
Post by: M on 2006-06-21 11:50:09
"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.
Title: pcutmp3 tool
Post by: jaybeee on 2006-06-21 18:02:36
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.
Title: pcutmp3 tool
Post by: odyssey on 2006-06-23 07:42:23
How do I correctly compile pcutmp3 to an executable exe working on all machines even without java? I tried compiling with Excelsior, and it works on any PC with java installed, but yesterday i got an error telling me to use Jet II or something like that.
Title: pcutmp3 tool
Post by: SebastianG on 2006-06-23 09:11:11
How do I correctly compile pcutmp3 to an executable exe working on all machines even without java? I tried compiling with Excelsior, and it works on any PC with java installed, but yesterday i got an error telling me to use Jet II or something like that.


Please consult the customer support of xlsoft (http://www.xlsoft.com/en/products/jet/index.html) or have a look at this page -- it may be of help (http://schmidt.devlib.org/java/native-compilers.html).
Since I don't use the "Reflection API" or load *.class files manually/dynamically native compilation should be possible in theory (otherwise it'd be somewhere between tricky and impossible). But I never tried any native Java compiler before and can't help you on this one any further.

edit: this is part of the Excelsior JET FAQ:
Quote
What is Excelsior JET?

Excelsior JET is a toolkit and complete runtime environment for acceleration, protection, and deployment of Java applications.

What Excelsior JET is not?

Excelsior JET is not a packager of Java applications into Windows EXE/Linux binaries. It really compiles your Java class files into native Intel x86 instructions. The resulting executables need the Excelsior JET Runtime to run, but not the Sun JRE.

So, it seems that the compiler outputs a small EXE file that needs some DLL libraries (the Excelsior JET Runtime). So, if you copy just the EXE file to another computer which doesn't have the Excelsior JET Runtime libraries you can't run the application. -- just my interpretation


Sebastian
Title: pcutmp3 tool
Post by: odyssey on 2006-06-23 10:16:40
Quote

What is Excelsior JET?

Excelsior JET is a toolkit and complete runtime environment for acceleration, protection, and deployment of Java applications.

What Excelsior JET is not?

Excelsior JET is not a packager of Java applications into Windows EXE/Linux binaries. It really compiles your Java class files into native Intel x86 instructions. The resulting executables need the Excelsior JET Runtime to run, but not the Sun JRE.

So, it seems that the compiler outputs a small EXE file that needs some DLL libraries (the Excelsior JET Runtime). So, if you copy just the EXE file to another computer which doesn't have the Excelsior JET Runtime libraries you can't run the application. -- just my interpretation

Damn, I always forget to read the small words... Sorry then
Title: pcutmp3 tool
Post by: SebastianG on 2006-06-26 08:37:50
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.


The problem is that MP3s still are made out of an integral number of frames. Sample accurate cutting through pcutmp3 only works by keeping an integral number of frames and signalling the decoder how many samples at the start / end to discard. Joining two (accurate-length-) streams (without introducing a little delay or a skip at the boundary) only works on a special condition regarding enc_delay/padding of the preceding track and enc_delay of the following track. Since 1152 (samples/mp3-frame) is not a multiple 588 (samples/cd-frame) chances are very low for seperately encoded MP3s that they can be joined "properly".

S
Title: pcutmp3 tool
Post by: jaybeee on 2006-06-26 17:37:49
Thanks for the reply Sebi.  It was just a thought that's all.
Title: pcutmp3 tool
Post by: Hancoque on 2006-07-04 03:10:22
I found out that pcutmp3 throws an exception if it tries to write files that contain characters that cannot be used in filenames (< and > on Windows for example).
Title: pcutmp3 tool
Post by: dignick on 2006-08-16 18:53:20
I found out that pcutmp3 throws an exception if it tries to write files that contain characters that cannot be used in filenames (< and > on Windows for example).


It doesn't with the newest version.  Although sebi hasn't changed his page 1 post, the version it links to is actually 0.95b, which fixes the problem and simply removes the characters.
Title: pcutmp3 tool
Post by: krazy on 2006-08-30 11:23:50
Thankyou very much for this tool, Sebastian. Does exactly what it says on the box, and does it perfectly. 

In case anyone else is looking for cuesheets to match their albums, Cuesheet Heaven (http://www.regeert.nl/cuesheet/search.php?search=archive) worked for me.
Title: pcutmp3 tool
Post by: Skates on 2006-09-26 02:30:01
The program has worked great, but the non-ID3v2 support has been a pain at times.  Sebastian have you found a library that you would like to use?

Sorry if it sounds like I am bugging you, it's the only drawback that is keeping this program from being PERFECT!
Title: pcutmp3 tool
Post by: Rochey on 2006-09-27 10:25:58
Hello guys,

I am just wondering if anyone has used this tool and then listened to the new (single track) mp3's with itunes 7? I am just curious to see what anyones results are.
I tried this morning and it seems that there is a very minor click (almost seemless) with the new mp3's, alot better than any other tool I've used.

If anyone has got any better results I would love to hear how you achieved them.

Also if anyone has any info on manually changing some settings (with pcutmp3) I would love to be a guinea pig and try them out.

Just for info the latest Ipod also had this very minor clicks.

Cheers

Rochey
Title: pcutmp3 tool
Post by: enigmahi on 2006-12-15 11:46:23
Sorry, but todays is not my day...

Could anyone be so kind to post a batch file, for putting it into the "Send to" folder to execute automatic the pcutmp3.jar file?
All my tries with giving the parameters to the batch file via send to... ended up in a mess.

THX
Title: pcutmp3 tool
Post by: enigmahi on 2006-12-15 17:48:05
Hmm, Codepage Problem on the morning... 

Here comes a batch file for the "Send to" Menu.
Select File -> Send to -> Batch File
Customize for your one needs.
Output will be the source folder of the cue file.

Code: [Select]
@echo off
title pcutmp3
cd /d "C:\Programme\pcutmp3"
java -jar pcutmp3.jar --cue %1 --out "Track %%n" --dir "%~dp1
pause
exit
Title: pcutmp3 tool
Post by: dekaliber on 2007-01-25 15:33:09
This might be a dead topic, but I thought I'd give it a try anyway...

I've been quite pleased with pcutmp3.  I've since re-split all of my files originally cut with mp3splt and smile every time tracks transition seamlessly being played back in foobar.

I own a Squeezebox and haven't been so lucky.  Their newest version 6.5.1 with firmware 57 purports to support gapless MP3 playback using LAME headers, but I haven't been able to get it to work.  Has anyone else experienced this problem?

Any help or advice would be greatly appreciated!
Title: pcutmp3 tool
Post by: mixminus1 on 2007-01-25 16:47:06
This might be a dead topic, but I thought I'd give it a try anyway...

I've been quite pleased with pcutmp3.  I've since re-split all of my files originally cut with mp3splt and smile every time tracks transition seamlessly being played back in foobar.

I own a Squeezebox and haven't been so lucky.  Their newest version 6.5.1 with firmware 57 purports to support gapless MP3 playback using LAME headers, but I haven't been able to get it to work.  Has anyone else experienced this problem?

Any help or advice would be greatly appreciated!

From SebastianG's original post:
Quote
WARNING:
Your player needs to properly support the LAME tag. If it doesn't you'll hear gaps. I tested it with Foobar 0.8.3 and Foobar 0.9 beta 5. Unfortunately the older one ignores encoder delay values above 1152 in the LAME tag (edit: see post #5 for Foobar 0.8.3). Since pcutmp3 usually creates mp3 files with encoder delays of around 2000 samples it won't work in Foobar 0.8.3. In combination with Foobar 0.9 beta 5 it works like charm. WinAMP + otachan's in_mpg123 + some good output-plug probably also works fine. So, use this app only if it makes sense to use it. The number of players which properly interpret the LAME tag is pretty low !! If your player does you can use pcutmp3 to do sample granular cuts.

How it works:
This app analyzes the source mp3 file and its Xing/Info/LAME tag and allows cutting it at *any* positions through the use of the LAME tag's encoder_delay/padding fields. It generates for each track you crop out of the large source file a new Xing/Info/LAME tag frame filled appropriately and resolves the problem of missing bitreservoir data via a "silence frame" (holding the missing data) that directly follows the Xing/Info/LAME tag frame. This additional delay (due to this "silence frame") is also compensated via the encoder_delay setting which explains the high values it produces (576...2879). It should be possible to rejoin files losslessly (not yet implemented).
emphasis mine

My guess is that the Squeezebox (as well as iTunes, in reference to an earlier post) can't deal with the unusually large delay values, just as Foobar2000 0.8.3 couldn't.
Title: pcutmp3 tool
Post by: KungFuJesus on 2007-04-01 11:23:39
I'm no expert on the details of how this program works, but I do know that it isn't used by more people because it's a command line app. I wrote a GUI for it so you can tell your friends that they don't have to fiddle with XP and Vista's annoying command line, just double-click and it should work. All the backend stuff is the same, and if Sebastian releases new versions in the future it should be a simple file swap.

(http://img217.imageshack.us/img217/8569/pcutguinp8.th.jpg) (http://img217.imageshack.us/my.php?image=pcutguinp8.jpg)

Right now it only supports CUE splitting. There is no overriding artist names or custom split points. Those will be implemented later. It also requires Java 6 for the time being. Sorry, but the class I used to implement multi-threading is Java 6 exclusive and it didn't say that anywhere. Thanks, Java docs! If you don't want to upgrade, I'll forgive you.

So you load the cue file you want. The program is smart and will look for the mp3 file. If it finds it, it fills it in so you don't have to browse for it. It defaults the output directory to the same directory the cue is in so you may want to be wary of that.

This is like the second revision I made, so I'm sure it's a little rough yet.
Download here (http://proteankungfu.com/things/pcutmp3gui-0.2.jar)

Feedack is always appreciated.
Title: pcutmp3 tool
Post by: senab on 2007-04-01 11:39:20
Nice and simply GUI.  I actually wrote one just like this, as a Java/Swing practise, should have released it really. Recently I've just been using a batch file listed above
Title: pcutmp3 tool
Post by: j7n on 2007-04-01 16:30:35
Very useful info about patching Foobar 0.8.3. This "value too big" error has been bugging me for a while, almost to the point that I installed 0.9 just to do gapless correction (but it didn't work anyway). Thank you, Sebastian. 

While we're here, it's handy to patch 2 more offsets in order to enable manual entry of large delay and padding values.

80 04 00 00 8B D8 89 55 -> FF 0F 00 00 8B D8 89 55     (entry)
00 09 00 00 7F 04 3B CB -> FF 0F 00 00 7F 04 3B CB
80 04 00 00 33 C0 2B 5D -> FF 0F 00 00 33 C0 2B 5D     (what to do if greater than allowed)
Title: pcutmp3 tool
Post by: Jojo on 2007-04-01 22:29:03
I'm no expert on the details of how this program works, but I do know that it isn't used by more people because it's a command line app. I wrote a GUI for it so you can tell your friends that they don't have to fiddle with XP and Vista's annoying command line, just double-click and it should work.

thanks. is there any way to get a .exe ?
Title: pcutmp3 tool
Post by: Hancoque on 2007-04-01 22:45:44
thanks. is there any way to get a .exe ?

Just create a batch file, which is a text file with a .bat or .cmd extension and insert the following line:
Code: [Select]
@java -jar pcutmp3gui-0.2.jar
Title: pcutmp3 tool
Post by: KungFuJesus on 2007-04-02 03:02:47
If you have Java installed it should associate itself with jar files and run when you double-click them.

Also I found bugs, such as the program not writing to where you say to. Here's a fixed version:
Download v0.3 (http://proteankungfu.com/things/pcutmp3gui-0.3.jar)
Title: pcutmp3 tool
Post by: senab on 2007-04-02 08:43:45
I find Jar's load quicker when launched with batch files anyway.
Title: pcutmp3 tool
Post by: cheatz on 2007-07-30 11:45:57
So i have a .bat file with the code "@java -jar pcutmp3gui-0.2.jar" and pcutmp3gui-0.3.jar in the same folder. I double clicked the bat file and nothing happen.

Can we please get a noobie guide or the gui with an exe

Thanks
Title: pcutmp3 tool
Post by: Hancoque on 2007-07-30 22:42:49
Using a batch file doesn't change that it's still a command line tool. Therefore it just closes immediately after being started if supplied with no further arguments. You need to start it from a command prompt that's already open (e.g. starting "cmd.exe" from the "Run..." menu item in the start menu).
Title: pcutmp3 tool
Post by: cheatz on 2007-08-01 13:52:22
Using a batch file doesn't change that it's still a command line tool. Therefore it just closes immediately after being started if supplied with no further arguments. You need to start it from a command prompt that's already open (e.g. starting "cmd.exe" from the "Run..." menu item in the start menu).

I honestly have no clue when it comes to these things. I'm just gonna wait til someone can get this on exe 
Title: pcutmp3 tool
Post by: Synthetic Soul on 2007-08-01 15:38:21
Using a batch file doesn't change that it's still a command line tool. Therefore it just closes immediately after being started if supplied with no further arguments. You need to start it from a command prompt that's already open (e.g. starting "cmd.exe" from the "Run..." menu item in the start menu).
Not so - the batch file, when double-clicked, should launch the GUI, sit there blank, and then close when the GUI is closed.

I honestly have no clue when it comes to these things. I'm just gonna wait til someone can get this on exe 
Try changing your bat file to:

Code: [Select]
@java -jar "C:\Path\To\pcutmp3gui-0.3.jar"

pause

.. and see what is returned.  I just had to upgrade from 1.5.0_06 to 1.6.0 to get the GUI to run (pcutmp3 worked fine with 1.5).

NB: you can type (or add it as a line in the batch file):

Code: [Select]
java -version

... at the command promt to see what version you have installed - or open the Java item in your Control Panel.  You can update from the Control Panel by the looks of it.
Title: pcutmp3 tool
Post by: cheatz on 2007-08-03 13:57:44
Ah i got it working all i had to do was double click the jar file not the bat file.

When it splits files it only saves ID3v1 tags. ID3v1 doesn't capture the full filename so i'm left with half a filename even though the information on the cue sheet supplies the full filename.

Is there a fix for this?
Title: pcutmp3 tool
Post by: SebastianG on 2007-09-27 14:33:15
When it splits files it only saves ID3v1 tags. ID3v1 doesn't capture the full filename so i'm left with half a filename even though the information on the cue sheet supplies the full filename.


The problem with pcutmp3 development is that even if it supported all kinds of nice features the userbase would still be very small. Honestly, I'm not a pcutmp3 user myself because I simply don't need it. So, my only concern is its main functionality. However, that doesn't mean that I wouldn't welcome patches. So, if any of you feel the urge to hack some Java code feel free to send patches. The source code of pcutmp3 has always been part of the JAR file.

Cheers!
SG
Title: pcutmp3 tool
Post by: senab on 2008-05-30 21:25:07
pcutmp3 with ID3v2 Support

After quite a while since I said I was going to add ID3v2 support, i've finally done it. I've used the Jaudiotagger (http://www.jthink.net/jaudiotagger/) library, which is really good and licensed under the LGPL.

Changes
Download
I've packaged pcutmp3 in two ways:There is a small "problem" with the tag library in that it is very verbose. There's no easy way to make it less verbose but i've done what I can for now. It doesn't affect the end result at all. Also the library has made the program much bigger (40k to ~900k) but I think the increase in file size is worth the functionality.

Title: pcutmp3 tool
Post by: SebastianG on 2008-05-31 10:27:42
Nice! Good timing, too because my university homepage doesn't exist anymore.

Thanks for the effort.

Cheers,
SG
Title: pcutmp3 tool
Post by: senab on 2008-05-31 11:35:31
After my exams finish next week, i'm thinking of going through the code to bring it upto date. At the moment it's written for Java 1.4, i'm also going to refactor it a bit aswell to make it a bit more OO.

Sebastian: What license are you releasing this under?

And if anyone has any ideas for features, let me know
Title: pcutmp3 tool
Post by: jetpower on 2008-06-01 08:50:41
Hi,
I would like to ask for a feature: chop file into same-length parts.
Example: An audiobook mp3 is 120 minutes long -> chop it to 24 parts, each with 5 minutes of length.
I can do it with 'crop' command already but this way it'll be automatic and much less typing.
Title: pcutmp3 tool
Post by: mezenga on 2008-06-01 15:48:14
Hi,
I would like to ask for a feature: chop file into same-length parts.

I suppose you want to strip mp3s just like some archives do (7z, rar, ...).
Different from the archive, where you need all the strips, the striped audio parts can be evaluated alone. I don´t think it´s a good idea. This kind of feature would fit better in a GUI (IMO). Anyway, a simple spreadsheet can save you the typing.

A more powerful feature is the acceptance of .cue files already implemented.

Edit: wrong information rectified.
Title: pcutmp3 tool
Post by: jaybeee on 2008-06-01 17:07:17
Nice! Good timing, too because my university homepage doesn't exist anymore.

Thanks for the effort.

Cheers,
SG
If anyone still wants Sebi's last version of pcutmp3, then you can grab it from here: pcutmp3 v0.95b (http://jaybeee.themixingbowl.org/other/pcutmp3.jar)
Title: pcutmp3 tool
Post by: dubpistol on 2008-06-01 18:06:23
And if anyone has any ideas for features, let me know

Yes, this one:
[...] It should be possible to rejoin files losslessly (not yet implemented). [...]
Title: pcutmp3 tool
Post by: jetpower on 2008-06-01 18:37:17
Hi,
I would like to ask for a feature: chop file into same-length parts.

I suppose you want to strip mp3s just like some archives do (7z, rar, ...).
Different from the archive, where you need all the strips, the striped audio parts can be evaluated alone. I don´t think it´s a good idea. This kind of feature would fit better in a GUI (IMO). Anyway, a simple spreadsheet can save you the typing.

A more powerful feature is the acceptance of .cue files already implemented.

Edit: wrong information rectified.

Well the idea is certainly good for me. I'll explain.
Its for my phone. My phone plays mp3 but is very slow at seeking in audio files. Also one cannot jump to a certain point in long audio (for example to start where you left it the other day) and you have to fast forward which takes time, is annoying and drains the battery. With, say 5 minute file the seeking is fast and luckily phone jumps to next audio chunk automatically (when they are in order), so I can listen and relax:)

Can you give an example of this spreadsheet you mentioned?
What I want is not a hard feature to implement, I think and I would happy if anyone could code it in.
Title: pcutmp3 tool
Post by: jaybeee on 2008-06-01 21:10:00
And if anyone has any ideas for features, let me know

Yes, this one:
[...] It should be possible to rejoin files losslessly (not yet implemented). [...]

I'm almost certain that this is with files only previously cut using pcutmp3. But still, a potentially useful feature, altho tbh I can't when I'd use it.
Title: pcutmp3 tool
Post by: senab on 2008-06-02 10:40:27
[...] It should be possible to rejoin files losslessly (not yet implemented). [...]
Sorry but this is one I can't do, I don't know the file format of MP3 so it's a dead start.


Jetpower I quite like you're idea, i've had to do similar in the past because I haven't been able to find a cue. I'm thinking of implementing it with:
Code: [Select]
--split-every s

Where s is the size of tracks in seconds (except the last). I've had a look at the code and i'm going to do it over the next few days. I've got quite a bit of refactoring to do to make it a bit easier to do though.
Title: pcutmp3 tool
Post by: jetpower on 2008-06-02 17:36:28
Quote
I'm thinking of implementing it with:
Code: [Select]
--split-every s

Thanks Senab. I like this command, its simple and clear. But you may also consider permitting here the full time format as in 'crop' command.

Quote
Where s is the size of tracks in seconds (except the last).

This got me thinking what to do in extreme cases where the last part is going to be very short. it's not very important for me but there could be some tolerance (couple seconds maybe) before writing yet another part.
Title: pcutmp3 tool
Post by: mezenga on 2008-06-03 05:18:45
Well the idea is certainly good for me.
 
Can you give an example of this spreadsheet you mentioned?

Code: [Select]
;;file;x;.mp3;;;
;;total time (s);150;;splitting factor;=D2/D3;=G2-INT(G2)
;;splitting length (s);60;;;;

;;splitting result;=INT(G2);pieces of;=D3;s;
;;;=SE(H2>0,1,0);pieces of;=D3*H2;s;

Copy the following lines to a batch file:;;Auxiliary math:;;;;;

=CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C10,"-",D10," --out ",D$1,"-p",E10);;0;=SE(D2<D3,D2,D3*E10);1;;;
=SE(F11=1,"",CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C11,"-",D11," --out ",D$1,"-p",E11));;=SE(F11=1,"",D10+1);=SE(F11=1,"",SE(E10=D$5,D10+F$6,D$3*E11));2;=SE(E10>=D$5+D$6,1,0);;
=SE(F12=1,"",CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C12,"-",D12," --out ",D$1,"-p",E12));;=SE(F12=1,"",D11+1);=SE(F12=1,"",SE(E11=D$5,D11+F$6,D$3*E12));3;=SE(E11>=D$5+D$6,1,0);;
=SE(F13=1,"",CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C13,"-",D13," --out ",D$1,"-p",E13));;=SE(F13=1,"",D12+1);=SE(F13=1,"",SE(E12=D$5,D12+F$6,D$3*E13));4;=SE(E12>=D$5+D$6,1,0);;
1) Paste this text in notepad and save with ".csv" extension.
2) Open in MS Excel and: a) subst "," with ";" b) fix the size of columns A and C
3) Play 
4) Remember that it is totally untested. So, be kind when complaining that it doesn´t work 

What I want is not a hard feature to implement, I think and I would happy if anyone could code it in.
Again, pcutmp3 GUI (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=35654&view=findpost&p=482526) would be a better place for this feature (IMO).
Title: pcutmp3 tool
Post by: jetpower on 2008-06-03 13:34:59
Code: [Select]
;;file;x;.mp3;;;
;;total time (s);150;;splitting factor;=D2/D3;=G2-INT(G2)
;;splitting length (s);60;;;;

;;splitting result;=INT(G2);pieces of;=D3;s;
;;;=SE(H2>0,1,0);pieces of;=D3*H2;s;

Copy the following lines to a batch file:;;Auxiliary math:;;;;;

=CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C10,"-",D10," --out ",D$1,"-p",E10);;0;=SE(D2<D3,D2,D3*E10);1;;;
=SE(F11=1,"",CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C11,"-",D11," --out ",D$1,"-p",E11));;=SE(F11=1,"",D10+1);=SE(F11=1,"",SE(E10=D$5,D10+F$6,D$3*E11));2;=SE(E10>=D$5+D$6,1,0);;
=SE(F12=1,"",CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C12,"-",D12," --out ",D$1,"-p",E12));;=SE(F12=1,"",D11+1);=SE(F12=1,"",SE(E11=D$5,D11+F$6,D$3*E12));3;=SE(E11>=D$5+D$6,1,0);;
=SE(F13=1,"",CONCATENAR("@java -jar pcutmp3 ",D$1,E$1," --crop t:",C13,"-",D13," --out ",D$1,"-p",E13));;=SE(F13=1,"",D12+1);=SE(F13=1,"",SE(E12=D$5,D12+F$6,D$3*E13));4;=SE(E12>=D$5+D$6,1,0);;

wow, very nice, thanks. I managed to get it working - yet another surprise thing Excel can do. You might try not to use Portuguese(?) commands next time though, struggled a bit with these:).


What I want is not a hard feature to implement, I think and I would happy if anyone could code it in.
Quote
Again, pcutmp3 GUI (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=35654&view=findpost&p=482526) would be a better place for this feature (IMO).

This spreadsheet works nicely but I still prefer to have this sort of functionality integrated (whether in GUI or cmdline). Available MP3 splitter programs include also splitting by size (kb) and some even have silence detection (for e.g. audiobook chapters). Combining best possible mp3 cutting with these features (and nice GUI) would make the ultimate splitter:)
Title: pcutmp3 tool
Post by: senab on 2008-06-03 14:25:09
Again, pcutmp3 GUI (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=35654&view=findpost&p=482526) would be a better place for this feature (IMO).


Why? The GUI should do nothing more than call commands on the program, anything other than simple logic should be in the program. Lookup partioning and layering in Software Engineering.

How is the GUI supposed to know how long the MP3 is? Without that piece of information your solution will not work as it won't know when to stop adding crop commands.
Title: pcutmp3 tool
Post by: SebastianG on 2008-06-04 13:14:34
What license are you releasing this under?

Let's say BSD.

Regarding the joining of files: This only applies to files which have been previously cut by pcutmp3 where the end of one file is exactly the start of the following and so on. I didn't feel like implementing it because of its very rare usecases.

Cheers,
SG
Title: pcutmp3 tool
Post by: mezenga on 2008-06-05 04:27:44
wow, very nice, thanks. I managed to get it working - yet another surprise thing Excel can do. You might try not to use Portuguese(?) commands next time though, struggled a bit with these:).
Sorry, I forgot this detail... Glad you made it work.
Why? The GUI should do nothing more than call commands on the program, anything other than simple logic should be in the program. Lookup partioning and layering in Software Engineering.
I just thought that getting some information about the mp3 file and doing the crop math would fit in the "simple logic" category you mentioned. My point is that pcutmp3 already has the basic commands and that the GUI would use these existent commands to provide more options.
How is the GUI supposed to know how long the MP3 is? Without that piece of information your solution will not work as it won't know when to stop adding crop commands.
Well, if such a function (getting some information about the mp3) represents too much code redundancy between the GUI and the application your approach is better. Otherwise mine may worth.
Title: pcutmp3 tool
Post by: Peddy on 2008-11-16 04:34:33
pcutmp3 with ID3v2 Support

After quite a while since I said I was going to add ID3v2 support, i've finally done it. I've used the Jaudiotagger (http://www.jthink.net/jaudiotagger/) library, which is really good and licensed under the LGPL.

Changes
  • Added ID3v2 writing support.
  • Changed default naming scheme
Download
I've packaged pcutmp3 in two ways:
  • JAR file. Same as how Sebastian packaged his version and can be used as a direct replacement (source is included). Download (http://christopher.banes.googlepages.com/pcutmp3.jar).
  • EXE file. I've packaged the JAR using JSmooth (http://jsmooth.sourceforge.net/) to create an executable file. Basically use this version if you're using Windows, it means you can call the exe directly without going through java -jar. Source is not included. Download (http://christopher.banes.googlepages.com/pcutmp3.exe).
There is a small "problem" with the tag library in that it is very verbose. There's no easy way to make it less verbose but i've done what I can for now. It doesn't affect the end result at all. Also the library has made the program much bigger (40k to ~900k) but I think the increase in file size is worth the functionality.



Doesn't cut properly in Linux, it creates a 200byte file (depending on the tag size) with the contents at the bottom of this post.  I've used multiple Linuxes, same problem. Could you PLEASE fix this? Here's a little snippet of a failed cut:

Code: [Select]
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.ID3v24Tag write
INFO: Writing tag to file
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.ID3v24Frame write
INFO: Writing frame to file:TRCK
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Writing frame body forTRCK:Est Size:0
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Written frame body forTRCK:Real Size:3
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.ID3v24Frame write
INFO: Writing frame to file:TIT2
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Writing frame body forTIT2:Est Size:0
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Written frame body forTIT2:Real Size:28
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.ID3v24Frame write
INFO: Writing frame to file:TPE1
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Writing frame body forTPE1:Est Size:0
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Written frame body forTPE1:Real Size:7
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.ID3v24Frame write
INFO: Writing frame to file:TALB
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Writing frame body forTALB:Est Size:0
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.framebody.AbstractID3v2FrameBody write
INFO: Written frame body forTALB:Real Size:36
16/11/2008 5:22:43 PM org.jaudiotagger.tag.id3.ID3v1Tag write
INFO: Saving file


And here's what's created.

Code: [Select]
$cat 02\ -\ Tomorrow\ Never\ Comes.mp3 
ID3MTRCK2TIT2Tomorrow Never ComesTPE1ArnejTALB$A State of Trance 377 [06-11-2008] TAGTomorrow Never ComesArnejA State of Trance 377 [06-11-2?


Thanks
Title: pcutmp3 tool
Post by: senab on 2008-11-22 23:08:11
@Peddy: I'm going to look at this, this week
Title: pcutmp3 tool
Post by: FigBug on 2008-12-02 18:38:57
@Peddy: I'm going to look at this, this week


Is it possible to compile the latest version of pcutmp3 with java 1.5? I tried, but got a bunch of errors. I'm guess ing java 1.6 features are used.

My idea was to write a gui for pcutmp3 for the mac. However, the mac only has java 1.6 on 64-bit intel macs. And that would be very limiting to my user base.

I think 0.95b was java 1.5. How much has changed since then?
Title: pcutmp3 tool
Post by: senab on 2008-12-04 21:57:59
PCutMP3 0.97

Right, after the mess that was my last version of PCutMP3, here is a much nicer packaged version with ID3v2 support. It now uses a different ID3 library called JID3 (http://jid3.blinkenlights.org/). Although the library hasn't been updated in a while, I chose it on the basis that it works, it's quick and fairly simply written unlike the previously used library.

Download
pcutmp3.jar (http://christopher.banes.googlepages.com/pcutmp3.jar)
jid3.jar (http://christopher.banes.googlepages.com/jid3.jar)

By default jid3.jar must be in the same directory as pcutmp3.jar, although you can change that via the classpath. All the source is included in the JARs.

Extra points
I have included an patch (http://bugs.gentoo.org/show_bug.cgi?id=220245) in JID3 that fixed the UTF-16 support. I've also made UTF-16 the default.


@Peddy: I've tested this on various Linux machines and works fine, although I didn't have any problems with the previous version. Let me know if this doesn't work.

@FigBug: PCutMP3 is actually written against Java 1.4. The reason you got all the "errors" (they're actually warnings) is because you must be compiling with 1.5+. As the code was written for 1.4 it makes no use of Generics which is why the warning comes up. Doesn't mean there's anything wrong though.

I may update the code to bring it to 1.5 soon, and also do a bit of cleanup of the code. Off the top of my head I'd start making use of Generics, and get rid of using Vector (use ArrayList instead).
Title: pcutmp3 tool
Post by: FigBug on 2008-12-04 22:45:50
@FigBug: PCutMP3 is actually written against Java 1.4. The reason you got all the "errors" (they're actually warnings) is because you must be compiling with 1.5+. As the code was written for 1.4 it makes no use of Generics which is why the warning comes up. Doesn't mean there's anything wrong though.


Bizarre. It works now. The last version I downloaded gave me the following errors when I tried to run it:
Code: [Select]
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)


Maybe something in the ID3 stuff didn't like Java 1.5?

Anyway, I'm glad I checked this thread again, because I was just about to write code to check the java version and warn the user to upgrade.

Thanks!
Title: pcutmp3 tool
Post by: FigBug on 2008-12-05 17:28:21
I just noticed that when using a cue file to cut the mp3 the track number is no longer set in the ID3 tag. I seem to remember this working in the last version.
Title: pcutmp3 tool
Post by: FigBug on 2008-12-05 19:48:41
Ok, my mac gui is done. It requires OS X 10.4
It is simple, all it does is take a mp3 and cut and cuts it up. But it saves time in that you don't have to deal with the console.

Enjoy:
http://rabien.com/software/CueCut.dmg (http://rabien.com/software/CueCut.dmg)
Title: pcutmp3 tool
Post by: FunkyBrewster on 2008-12-15 06:50:09
Hi,
  I'm using pcutmp3 v0.97 with IDv2 tag support and I'm having the following issues.
  When I use it from the command prompt, the track numbers are not put in the cutted mp3 files' tags (other tag information is OK).  There's no parameter option for this listed.
  When I use the gui (pcutmp3gui-0.3.jar), the track numbers are included in the tags, but the filenames don't show up as "1. Artist - Trackname" which is the default for the command line.  They only come out as "VA - Compilation Name-01", "VA - Compilation Name-02", etc..
  It's weird that the track numbers aren't put in the tags when run from the command line but are from the GUI.    The GUI is great, but is there a way to tell it name the output files using the default naming scheme ("%n. %p - %t")?

  Thanks a lot to everyone working on this tool.  I've tried several different programs and this is the only one that actually works properly.
Title: pcutmp3 tool
Post by: senab on 2008-12-15 11:32:53
I'm using pcutmp3 v0.97 with IDv2 tag support and I'm having the following issues. When I use it from the command prompt, the track numbers are not put in the cutted mp3 files' tags (other tag information is OK).  There's no parameter option for this
This is my fault, I forgot to add the track number tag method. This is fixed and will be up soon. I have some free time this week so want to do some other changes aswell

When I use the gui (pcutmp3gui-0.3.jar), the track numbers are included in the tags, but the filenames don't show up as "1. Artist - Trackname" which is the default for the command line.  They only come out as "VA - Compilation Name-01", "VA - Compilation Name-02", etc..
I have no idea about the GUI, but the program is that simple I use shell scripts/batch files.

I'm guessing you're on Windows so a simple batch file containing:
Code: [Select]
java -jar "path to jar" --cue %1

Just drag and drop your cue file onto the batch file.
Title: pcutmp3 tool
Post by: FunkyBrewster on 2008-12-16 15:10:39
This is my fault, I forgot to add the track number tag method. This is fixed and will be up soon. I have some free time this week so want to do some other changes aswell

Cool, that's nice that it wasn't something I was doing wrong.   

Quote
I have no idea about the GUI, but the program is that simple I use shell scripts/batch files.

I've been using the GUI and a batch file, depending on whether it's easier to rename the files or edit the tag info.  The GUI is nice, just too bad you can't specify command line switches manually (esp. set the output filename format).
Title: pcutmp3 tool
Post by: alexcavaco on 2008-12-27 13:39:31
Hi!

Senab, how about adding this to an open-source repository, like for example, SourceForge?
It would as least be easier to know what the latest version is.

Any news on the track number tag method implementation?

Thanks,
Alexandre
Title: pcutmp3 tool
Post by: Ryo94 on 2009-01-10 22:10:21
Just a couple of issues that I found in pcutmp3:
 
* Issue at time to deal with cbr files without Xing/Lame tag
  - pcutmp3 creates the Xing/Lame tag with default and unreal info. Would be great if pcutmp3 could just avoid the creation of the Xing/Lame tag when deals with input cbr files without these info in the first frame.
 
* Isue when cut vbr files
  - The "music crc" is not recalculated in output files, as result, the 2nd crc in the Lame tag (the tag crc itself)  is calculated wrongly.

I'm using pcutmp3 0.95b + GUI 0.3, JRE 1.6 under WinXP SP3
Title: pcutmp3 tool
Post by: Ryo94 on 2009-01-11 02:10:05
Does the following frame (the second one on each ouput file) have any particular function in the files?

(http://i44.tinypic.com/acfq5h.jpg)

If not and it works just like a "sign", wouldn't be better to leave a comment on the ID3 tag instead add an additional frame? Some programs could find some problems at time to deal with this frame, for example Vbrfix can't work on vbr files created by pcutmp3 for this reason.

I would like to suggest drag&drop support for the GUI.

Thanks for your work, kind regards.
Title: pcutmp3 tool
Post by: SebastianG on 2009-01-11 14:01:41
Does the following frame (the second one on each ouput file) have any particular function in the files?

(http://i44.tinypic.com/acfq5h.jpg)

Yes, it does.
The 'x's are just padding that separates the pcut header from the bitreservoir data.

You may also have noticed that the LAME's CRC checksum is the same over all tracks. Together with the 48bit time codes it is theoretically possible to autmoatically identify tracks from the same original MP3 and join them in the correct order.

Some programs could find some problems at time to deal with this frame, for example Vbrfix can't work on vbr files created by pcutmp3 for this reason.

I doubt that this it to blame on pcutmp3. The 2nd frame is -- like the first one -- a 100% valid MP3 frame which is intended to be decoded to silence. Its presence is required because the following frame requires bits from the bit reservoir which would otherwise be missing. It's true that early versions of pcutmp3 produced bogus VBR seek tables. So, if you want to fix this try another tool. If you have the original MP3 you might want to try pcutmp3 again. The VBR seek table bug has been fixed for quite some time.

Cheers!
SG
Title: pcutmp3 tool
Post by: Ryo94 on 2009-01-11 17:28:56
Thanks a lot for reply SG,

If the addition of the 2nd frame and the keep of the music crc from the original track are there in part for an eventual rejoin of the tracks, would pcutmp3 offer this join function in a near future?
Title: pcutmp3 tool
Post by: SebastianG on 2009-01-12 13:50:20
[...] would pcutmp3 offer this join function in a near future?

Probably not unless somebody else implements it. I don't see it as a big use case.

Cheers!
SG
Title: pcutmp3 tool
Post by: FunkyBrewster on 2009-01-20 09:55:09
Just wondering if there's been any progress made on the track number tagging issue when using the command line.  Without track numbers to keep them in order, splitting the file doesn't really do any good.  I tried using Foobar to autonumber the output tracks as a workaround, but iTunes can't deal with the resulting tags for some reason and since I'm trying to get the music onto my iPod that option is out.

The tags come out fine when I use the GUI, which doesn't make sense unless the GUI's jar file has the pcut code built into it. The problem with just using the GUI is that then the file names don't come out right (no artist or track info) and I can't change any other parameters either.

By the way, here's the my new batch file I hope to use when the track number problem is fixed.  It'll put the files into a new subdirectory for you.

Code: [Select]
@echo off
title pcutmp3
cd /d "%~dp1"
md cutted
cd /d "C:\Unregistered Programs\pcutmp3"
java -jar pcutmp3.jar --cue %1 --dir "%~dp1\cutted\
pause
exit
Title: pcutmp3 tool
Post by: alexcavaco on 2009-01-20 15:56:57
Just wondering if there's been any progress made on the track number tagging issue when using the command line.  Without track numbers to keep them in order, splitting the file doesn't really do any good.  I tried using Foobar to autonumber the output tracks as a workaround, but iTunes can't deal with the resulting tags for some reason and since I'm trying to get the music onto my iPod that option is out.

The tags come out fine when I use the GUI, which doesn't make sense unless the GUI's jar file has the pcut code built into it. The problem with just using the GUI is that then the file names don't come out right (no artist or track info) and I can't change any other parameters either.

By the way, here's the my new batch file I hope to use when the track number problem is fixed.  It'll put the files into a new subdirectory for you.

Code: [Select]
@echo off
title pcutmp3
cd /d "%~dp1"
md cutted
cd /d "C:\Unregistered Programs\pcutmp3"
java -jar pcutmp3.jar --cue %1 --dir "%~dp1\cutted\
pause
exit


Hi!

I've fixed the track number tag issue and also added an option (using --m3u) to generate a simple playlist of the output files.

I changed it to version 0.98 and you can get it here:
http://www.kreativenergy.org/downloads/cod...cutmp3_0.98.zip (http://www.kreativenergy.org/downloads/code/pcutmp3/pcutmp3_0.98.zip)


I'm also making a GUI, it's already working but I still want to add some features to it before releasing it. Maybe next month, as I currently don't have the time right now.

Cheers,
Alexandre
Title: pcutmp3 tool
Post by: senab on 2009-01-22 20:33:56
After messing around with pcutmp3 for a while, I thought it would be best if I got some actual code hosting for it.

It is now uploaded onto Google Code: http://code.google.com/p/pcutmp3/ (http://code.google.com/p/pcutmp3/)

I have uploaded 0.97.1 for now, which is 0.97 with a code fix to add the track numbers to the files, and also the ability to automatically create directories when using --dir. There's a couple of things I'm going to do with pcutmp3 but time isn't permitting me at the moment.

@alexcavaco: Feel free to add your --m3u support to the SVN. PM me your google account for commit access.
Title: pcutmp3 tool
Post by: FunkyBrewster on 2009-01-27 08:42:32
Great!  That's working much better now.  With 0.98 I get a "file not found" error from java when using the --m3u option.  There seems to be an extra \ added to the path of the source mp3 file for some reason.  But the tagging is working and that's the main thing.
Title: pcutmp3 tool
Post by: SebastianG on 2009-01-27 09:26:04
After messing around with pcutmp3 for a while, I thought it would be best if I got some actual code hosting for it.
It is now uploaded onto Google Code: http://code.google.com/p/pcutmp3/ (http://code.google.com/p/pcutmp3/)

Nice! Good idea! I should have thought of that before.

Cheers!
SG
Title: pcutmp3 tool
Post by: alexcavaco on 2009-01-27 14:42:26
Great!  That's working much better now.  With 0.98 I get a "file not found" error from java when using the --m3u option.  There seems to be an extra \ added to the path of the source mp3 file for some reason.  But the tagging is working and that's the main thing.


Hello, I don't have the code here right now, but I'll into it soon.

By the way, instead of having different versions around, I'll ask Senab for access to Google Code and integrate the code into his version.
Title: pcutmp3 tool
Post by: Raph on 2009-02-16 13:49:37
Hi  everyone, first thanks to everyone here for putting all this time in creating this tool - its awesome

We should up the windows and mac gui on the google code page what do you guys think ? Maybe we could start using their bug tracking tool too so i could start punching some bugs/feature requests in

Keep up the good work
Title: pcutmp3 tool
Post by: senab on 2009-02-16 14:52:21
We should up the windows and mac gui on the google code page what do you guys think ? Maybe we could start using their bug tracking tool too so i could start punching some bugs/feature requests in


Unfortunately I can't add the Java GUI to the repository as it's not clear what license it's released under. Regarding the OSX GUI, I don't use OSX so can't develop it, therefore with all this in mind, I will probably create a new Java GUI soon. As it's Java it will be cross platform, etc. First of all I need to get pcutmp3 in the vague shape of a library, which will make it easier to interface with then. This of course takes time, and won't really show any results to the user.

I'm hoping to have this done soon though! 

When this refactoring is done, and the GUI is up in a usable way. I will release V1 (timescale: 1-2 months).
Title: pcutmp3 tool
Post by: senab on 2009-02-16 22:02:28
Just so people know, you can keep track of what is being down on pcutmp3 via the Update Feed on Google Code. I try to keep my commit messages short but you still get the idea.

http://code.google.com/p/pcutmp3/updates/list (http://code.google.com/p/pcutmp3/updates/list)

I've managed to get a lot of the refactoring done tonight, something which I thought would take a lot longer. It's now more Object Oriented, which has also allowed me to optimize the code a bit and remove some unneeded calls. Hopefully pcutmp3 will be a much more maintainable state by this weekend. I will also be creating an API for pcutmp3 which will mean other Java programs can use pcutmp3 directly, this will also help with GUI and CLI development.
Title: pcutmp3 tool
Post by: Mar2zz on 2009-02-26 11:50:45
Is it possible to cut radiostreams to a local dir (when they are different tracks like last.fm radio?) I thought I read this somewhere, but can't find it.
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-02-28 14:20:37
Does this programm needs the input mp3 file only wirh ACCURATE Length tag? Or only Lame MP3?
I can't split mp3 with MP3 CBR (like foobar shows) codec
Title: pcutmp3 tool
Post by: lvqcl on 2009-02-28 15:19:53
Does this programm needs the input mp3 file only wirh ACCURATE Length tag? Or only Lame MP3?
I can't split mp3 with MP3 CBR (like foobar shows) codec

What version do you use? I tested 0.95b (don't have newer versions) and it works fine.
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-02-28 16:26:06
I use GUI v0.3 and tried to use commandline http://pcutmp3.googlecode.com/files/pcutmp3.jar (http://pcutmp3.googlecode.com/files/pcutmp3.jar)

This is from gui:

Loaded CUE sheet "ASOT.cue"
Loaded MP3 file "ASOT.mp3"
scanning "C:\\ASOT.mp3" ...
first frame header = MPEG1 Layer3 192kbps 44100Hz J-Stereo
no Xing/Info/LAME tag present
bitrate = 192 kbps (CBR)
accurate length = no
321691392 samples (is NOT a multiple of 588)
writing "C:\ASOT-01.mp3" ...

-it writes file with 627 bites size
Title: pcutmp3 tool
Post by: 2E7AH on 2009-02-28 17:21:56
i tried two files with missing %__mp3_accurate_length%
one which reports error in foobar about it's length and the other which is ok
also one of them wasn't LAME encoded
in both cases pcutmp3 output, resulted in correct mp3 cuts

so your problem is something else
can you use foo_utils to correct the file and see if you can get output?

[edit]
scanning "C:\\ASOT.mp3" ...

you may want context menu command with foo_run:

[font= "Courier New"]cmd /k "java.exe -jar "<insert path to pcutmp3.jar>pcutmp3.jar" --cue "$replace(%path%,%filename_ext%,)%filename%.cue" --dir "$replace(%path%,'\'%filename_ext%,)" "$replace(%path%,%filename_ext%,)%filename%.mp3""[/font]
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-02-28 19:05:14
i tried two files with missing %__mp3_accurate_length%
one which reports error in foobar about it's length and the other which is ok
also one of them wasn't LAME encoded
in both cases pcutmp3 output, resulted in correct mp3 cuts

so your problem is something else
can you use foo_utils to correct the file and see if you can get output?

[edit]
scanning "C:\\ASOT.mp3" ...

you may want context menu command with foo_run:

[font= "Courier New"]cmd /k "java.exe -jar "<insert path to pcutmp3.jar>pcutmp3.jar" --cue "$replace(%path%,%filename_ext%,)%filename%.cue" --dir "$replace(%path%,'\'%filename_ext%,)" "$replace(%path%,%filename_ext%,)%filename%.mp3""[/font]


I checked file using foobar... is showed that reported duration is wrong. Then I select Fix VBR Mp3 Header and now foobar reports no problems. But I have same error when trying to split this mp3 using pcutmp3 gui or pcutmp3.jar + bat file
Title: pcutmp3 tool
Post by: 2E7AH on 2009-02-28 19:07:19
try suggested command for foo_run
is seems to me that the problem is in your command line
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-02-28 19:49:53
Same error...

Exception in thread "main" java.lang.NoClassDefFoundError: org/blinkenlights/jid
3/MediaFile
Caused by: java.lang.ClassNotFoundException: org.blinkenlights.jid3.MediaFile
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: de.zebee.mpa.MainCLI. Program will exit.

C:\Program Files\foobar2000>


And... What is jid3.jar???
Title: pcutmp3 tool
Post by: lvqcl on 2009-02-28 20:56:03
Quote
And... What is jid3.jar???


Put it in the same folder where you placed pcutmp3.jar.
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-03-01 07:50:38
Another error


C:\>java -jar pcutmp3.jar --cue "ASOT.cue" "ASOT.mp3"

PCutMP3 -- Properly Cut MP3 v0.97.1

scanning "ASOT.mp3" ...
first frame header = MPEG1 Layer3 192kbps 44100Hz J-Stereo
Xing/Info tag present
bitrate = 192 kbps (CBR)
accurate length = no
321691392 samples (is NOT a multiple of 588)
writing "01. A State of Trance - Intro.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:283)
Title: pcutmp3 tool
Post by: SebastianG on 2009-03-01 10:57:34
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:283)


This is probably an MP3 that has been cut previously by a program that messed up the bit reservoir.  pcutmp3 just assumes that your MP3 is fine and doesn't lack important bits from the bit reservoir.  In that respect pcutmp3 isn't really tolerant / as forgiving as it could be.  You can solve this by "fixing" your MP3 with mp3brfix (http://www.hydrogenaudio.org/forums/index.php?showtopic=34865).

As for compatibility with non-LAME encoded MP3s: Yes, pcutmp3 supports those and just assumes the encoder delay to be 576 samples.

Cheers!
SG
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-03-01 12:26:44
I fixed mp3 using this tool, but I see the same error again:

C:\>java -jar pcutmp3.jar --cue "ASOT.cue" "ASOTfix.mp3"

PCutMP3 -- Properly Cut MP3 v0.97.1

scanning "ASOTfix.mp3" ...
first frame header = MPEG1 Layer3 192kbps 44100Hz J-Stereo
Xing/Info tag present
bitrate = 192 kbps (CBR)
accurate length = no
321691392 samples (is NOT a multiple of 588)
writing "01. A State of Trance - Intro.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:283)


Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-03-04 12:56:26
Does anyone can help me????
Title: pcutmp3 tool
Post by: Ryo94 on 2009-03-06 03:29:40
Does anyone can help me????


If it's a vbr file, did you try to fix it first with Vbrfix? VbrFix (http://download.gna.org/vbrfix/vbrfixwin1jbeta.zip) is way better than foobar's fix.
Title: pcutmp3 tool
Post by: ExUser on 2009-03-06 07:00:12
If it's a vbr file, did you try to fix it first with Vbrfix? VbrFix (http://download.gna.org/vbrfix/vbrfixwin1jbeta.zip) is way better than foobar's fix.
[citation needed]
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-03-13 12:19:22
Let's leave this problem.. none of these tools helped me to solve the problem
Now I have another question. About Foobar's foo_run plugin and pcutmp3
This is my comand line for foo_run:


cmd /k "java.exe -jar "C:\pcutmp3.jar" --cue "%path%" "$replace(%path%,%filename_ext%,)%__referenced_file%""


But in this case output folder is Foobar's folder o_O
I need the output folder to be "<source folder>\%album%\" or (if previous is impossible) "<source folder>\cutted\"
Also I want that output scheme will be "%track% %artist% - %title%"
The first problem is that source file folder contains cyrilic characters: "D:\Моя Музыка\" and if I specify --dir $replace(%path%,%filename_ext%,)  , I have output directory "D:\Моя\"
(

Second problem is that when I specify:
--out "%n %a - %t"
I have error:

The usage of either %n or %t is mandatory in the naming
scheme if you want to extract more than one track!

Could you help me to realize All the above-mentioned?
Title: pcutmp3 tool
Post by: senab on 2009-03-13 13:34:18
Now I have another question. About Foobar's foo_run plugin and pcutmp3
This is my comand line for foo_run:

cmd /k "java.exe -jar "C:\pcutmp3.jar" --cue "%path%" "$replace(%path%,%filename_ext%,)%__referenced_file%""

But in this case output folder is Foobar's folder o_O

I need the output folder to be "<source folder>\%album%\" or (if previous is impossible) "<source folder>\cutted\"
Also I want that output scheme will be "%track% %artist% - %title%"
The first problem is that source file folder contains cyrilic characters: "D:\??? ??????\" and if I specify --dir $replace(%path%,%filename_ext%,)  , I have output directory "D:\???\"

The fact that it outputs to Foobar2000 folder is expected. I'm not totally sure on why the --dir isn't working but I'll look at this now. As a workaround for now you could use:

Code: [Select]
cd /d "some tagz scripting to produce path" && cmd /k "java.exe -jar "C:\pcutmp3.jar" --cue "%path%" "$replace(%path%,%filename_ext%,)%__referenced_file%""


Second problem is that when I specify:
--out "%n %a - %t"
I have error:

The usage of either %n or %t is mandatory in the naming
scheme if you want to extract more than one track!

Try using --out "%%n %%a - %%t"
Title: pcutmp3 tool
Post by: senab on 2009-03-13 13:58:21
PCutMP3 0.98 Beta
http://pcutmp3.googlecode.com/files/pcutmp3_098b.jar (http://pcutmp3.googlecode.com/files/pcutmp3_098b.jar)

Here's a beta of 0.98:

Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-03-13 14:54:34
Try using --out "%%n %%a - %%t"


Thank you, it works. But it numerates tracks like "1,2,3,4...", when I prefer numbers with leading zero like "01,02..." for correct sorting of files by name. How can I turn on this numeration scheme?? And why it uses numbers without leading zero, when indexes in cue file are "01,02,03..."?

And... where can I see full list of parameters for current version?
Title: pcutmp3 tool
Post by: senab on 2009-03-13 18:19:17
But it numerates tracks like "1,2,3,4...", when I prefer numbers with leading zero like "01,02..." for correct sorting of files by name. How can I turn on this numeration scheme?? And why it uses numbers without leading zero, when indexes in cue file are "01,02,03..."?
This is a known problem, and will be fixed in the final 0.98.

And... where can I see full list of parameters for current version?

Just run pcutmp3 with no parameters.

i.e. java -jar pcutmp3.jar
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-03-14 15:50:47
I've found another way of specifying of output folder...

Code: [Select]
cmd /k "java.exe -jar "C:\Program Files\foobar2000\pcutmp3.jar" --cue "%path%" "$directory_path(%path%)\%__referenced_file%" --dir "$directory_path(%path%)\%album%" --out "%%n %%p - %%t"


Traks are saved to <source folder>\<album title>\ 

It would be great if you will fix error with track numbers....
Title: pcutmp3 tool
Post by: Peddy on 2009-05-02 10:27:20
@Peddy: I've tested this on various Linux machines and works fine, although I didn't have any problems with the previous version. Let me know if this doesn't work.


I'm cutting an A State of Trance episode using a .cue sheet, and pcutmp3 cuts the song files as 600 byte files similar to the one that I posted about before. This happens in both Linux and Windows. I've used mp3brfix on the MP3.

Any idea why this could be happening?
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-05-13 16:15:21
@Peddy: I've tested this on various Linux machines and works fine, although I didn't have any problems with the previous version. Let me know if this doesn't work.


I'm cutting an A State of Trance episode using a .cue sheet, and pcutmp3 cuts the song files as 600 byte files similar to the one that I posted about before. This happens in both Linux and Windows. I've used mp3brfix on the MP3.

Any idea why this could be happening?


Try this:

cmd /k "java.exe -jar "mp3brfix.jar"  -f $directory_path(%path%)\%__referenced_file%"

(for Foobar2000 foo_run plugin, mp3brfix.jar must be in foobar's directory)
Title: pcutmp3 tool
Post by: Steve Forte Rio on 2009-05-31 12:00:42
Why mp3brfix don't want to create separate file and only replaces original file????
Title: pcutmp3 tool
Post by: alexcavaco on 2009-07-13 14:08:25
Just wondering if there's been any progress made on the track number tagging issue when using the command line.  Without track numbers to keep them in order, splitting the file doesn't really do any good.  I tried using Foobar to autonumber the output tracks as a workaround, but iTunes can't deal with the resulting tags for some reason and since I'm trying to get the music onto my iPod that option is out.

The tags come out fine when I use the GUI, which doesn't make sense unless the GUI's jar file has the pcut code built into it. The problem with just using the GUI is that then the file names don't come out right (no artist or track info) and I can't change any other parameters either.

By the way, here's the my new batch file I hope to use when the track number problem is fixed.  It'll put the files into a new subdirectory for you.

Code: [Select]
@echo off
title pcutmp3
cd /d "%~dp1"
md cutted
cd /d "C:\Unregistered Programs\pcutmp3"
java -jar pcutmp3.jar --cue %1 --dir "%~dp1\cutted\
pause
exit


Hi!

I've fixed the track number tag issue and also added an option (using --m3u) to generate a simple playlist of the output files.

I changed it to version 0.98 and you can get it here:
http://www.kreativenergy.org/downloads/cod...cutmp3_0.98.zip (http://www.kreativenergy.org/downloads/code/pcutmp3/pcutmp3_0.98.zip)


I'm also making a GUI, it's already working but I still want to add some features to it before releasing it. Maybe next month, as I currently don't have the time right now.

Cheers,
Alexandre


Hello,

Since senab continued this project and already integrated the fixes in his version, I removed the above version from the site. This way there are no more two 0.98 versions, which was confusing.

Alexandre
Title: pcutmp3 tool
Post by: Jojo on 2009-08-10 20:18:21
I fixed mp3 using this tool, but I see the same error again:

C:\>java -jar pcutmp3.jar --cue "ASOT.cue" "ASOTfix.mp3"

PCutMP3 -- Properly Cut MP3 v0.97.1

scanning "ASOTfix.mp3" ...
first frame header = MPEG1 Layer3 192kbps 44100Hz J-Stereo
Xing/Info tag present
bitrate = 192 kbps (CBR)
accurate length = no
321691392 samples (is NOT a multiple of 588)
writing "01. A State of Trance - Intro.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:283)



I've the same problem with the 0.98 release. I went back to the 0.95 version it everything is working again.
Title: pcutmp3 tool
Post by: 2E7AH on 2009-08-13 19:25:09
Something is wrong with new beta version (notice totally wrong filesize and cuts in Beta version):

Correctly done:
Code: [Select]
PCutMP3 -- Properly Cut MP3 v0.97.1

scanning "C:\Temp\rip\CDImage.mp3" ...
first frame header = MPEG1 Layer3 128kbps 44100Hz J-Stereo
Xing/Info and LAME tag present
bitrate = 173.64375 kbps (VBR)
accurate length = yes
211450092 samples (is a multiple of 588)
writing "C:\Temp\rip\01. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3" ...
writing "C:\Temp\rip\02. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n░6.mp3" ...
writing "C:\Temp\rip\03. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3" ...
writing "C:\Temp\rip\04. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\05. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\06. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3" ...
writing "C:\Temp\rip\07. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3" ...
writing "C:\Temp\rip\08. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3" ...
writing "C:\Temp\rip\09. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n░5 en mi mineur, III. Valse....mp3" ...
writing "C:\Temp\rip\10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3" ...
writing "C:\Temp\rip\11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3" ...
writing "C:\Temp\rip\12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3" ...
writing "C:\Temp\rip\13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3" ...
writing "C:\Temp\rip\14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n░I op.18 en Fa majeur, III. Scherzo.mp3" ...
writing "C:\Temp\rip\15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n░3 avec orgue en ut mineur op.78....mp3" ..
.
done.

C:\Program Files\foobar2000>cd\

C:\>cd temp\rip

C:\Temp\rip>dir
 Volume in drive C has no label.
 Volume Serial Number is E88F-2219

 Directory of C:\Temp\rip

13.08.2009  20:10    <DIR>          .
13.08.2009  20:10    <DIR>          ..
13.08.2009  20:10        12.015.104 01. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3
13.08.2009  20:10        7.675.667 02. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n°6.mp3
13.08.2009  20:10        5.410.620 03. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3
13.08.2009  20:10        3.091.070 04. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:10        2.329.955 05. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:10        6.944.897 06. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3
13.08.2009  20:10        3.828.923 07. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3
13.08.2009  20:10        5.975.041 08. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3
13.08.2009  20:10        8.190.068 09. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n°5 en mi mineur, III. Valse....mp3
13.08.2009  20:10        9.098.676 10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3
13.08.2009  20:10        14.067.179 11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3
13.08.2009  20:10        8.707.708 12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3
13.08.2009  20:10        5.716.780 13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3
13.08.2009  20:10        4.293.268 14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n°I op.18 en Fa majeur, III. Scherzo.mp3
13.08.2009  20:10        6.761.159 15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n°3 avec orgue en ut mineur op.78....mp3
13.08.2009  20:01            2.764 CDImage.cue
25.12.2007  21:06      104.075.161 CDImage.mp3
              17 File(s)    208.184.040 bytes
              2 Dir(s)  330.037.747.712 bytes free

C:\Temp\rip>
Badly done:
Code: [Select]
PCutMP3 -- Properly Cut MP3 v0.98 BETA

scanning "C:\Temp\rip\CDImage.mp3" ...
first frame header = MPEG1 Layer3 128kbps 44100Hz J-Stereo
Xing/Info and LAME tag present
bitrate = 173.64375 kbps (VBR)
accurate length = yes
211450092 samples (is a multiple of 588)
writing "C:\Temp\rip\1. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3" ...
writing "C:\Temp\rip\2. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n░6.mp3" ...
writing "C:\Temp\rip\3. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3" ...
writing "C:\Temp\rip\4. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\5. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\6. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3" ...
writing "C:\Temp\rip\7. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3" ...
writing "C:\Temp\rip\8. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3" ...
writing "C:\Temp\rip\9. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n░5 en mi mineur, III. Valse....mp3" ...
writing "C:\Temp\rip\10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3" ...
writing "C:\Temp\rip\11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3" ...
writing "C:\Temp\rip\12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3" ...
writing "C:\Temp\rip\13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3" ...
writing "C:\Temp\rip\14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n░I op.18 en Fa majeur, III. Scherzo.mp3" ...
writing "C:\Temp\rip\15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n░3 avec orgue en ut mineur op.78....mp3" ..
.
done.

C:\Program Files\foobar2000>cd\

C:\Temp\rip>dir
 Volume in drive C has no label.
 Volume Serial Number is E88F-2219

 Directory of C:\Temp\rip

13.08.2009  20:01    <DIR>          .
13.08.2009  20:01    <DIR>          ..
13.08.2009  20:01        12.015.147 1. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3
13.08.2009  20:01              827 10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3
13.08.2009  20:01        78.605.197 11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3
13.08.2009  20:01        8.707.751 12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3
13.08.2009  20:01        5.716.823 13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3
13.08.2009  20:01        4.293.311 14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n°I op.18 en Fa majeur, III. Scherzo.mp3
13.08.2009  20:01        6.761.202 15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n°3 avec orgue en ut mineur op.78....mp3
13.08.2009  20:01              957 2. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n°6.mp3
13.08.2009  20:01        25.097.269 3. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3
13.08.2009  20:01        3.091.113 4. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:01            1.017 5. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:01        37.457.144 6. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3
13.08.2009  20:01              989 7. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3
13.08.2009  20:01        47.256.154 8. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3
13.08.2009  20:01            1.017 9. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n°5 en mi mineur, III. Valse....mp3
13.08.2009  20:01            2.764 CDImage.cue
25.12.2007  21:06      104.075.161 CDImage.mp3
              17 File(s)    333.083.843 bytes
              2 Dir(s)  330.179.977.216 bytes free

C:\Temp\rip>
CUE file:
Code: [Select]
REM GENRE Classical
REM DATE 2005
REM DISCID ED12BA0F
PERFORMER "Various Artists"
TITLE "Century 2 - L'eveil musical des Nations (vol 17)"
FILE "CDImage.mp3" WAVE
  TRACK 01 AUDIO
    TITLE "Franz Liszt (1811-1886) - La Lugubre Gondole"
    PERFORMER "Hongrie"
    FLAGS DCP
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Franz Liszt (1811-1886) - Rhapsodie hongroise n°6"
    PERFORMER "Hongrie"
    FLAGS DCP
    INDEX 01 09:31:65
  TRACK 03 AUDIO
    TITLE "Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace"
    PERFORMER "Boheme"
    FLAGS DCP
    INDEX 00 16:09:32
    INDEX 01 16:10:53
  TRACK 04 AUDIO
    TITLE "Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L..."
    PERFORMER "Boheme"
    FLAGS DCP
    INDEX 01 20:08:28
  TRACK 05 AUDIO
    TITLE "Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L..."
    PERFORMER "Boheme"
    FLAGS DCP
    INDEX 01 22:45:29
  TRACK 06 AUDIO
    TITLE "Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato"
    PERFORMER "Pays Nordiques"
    FLAGS DCP
    INDEX 00 24:42:29
    INDEX 01 24:45:34
  TRACK 07 AUDIO
    TITLE "Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae"
    PERFORMER "Pays Nordiques"
    FLAGS DCP
    INDEX 01 29:56:54
  TRACK 08 AUDIO
    TITLE "Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ..."
    PERFORMER "Russie"
    FLAGS DCP
    INDEX 00 32:42:50
    INDEX 01 32:46:49
  TRACK 09 AUDIO
    TITLE "Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n°5 en mi mineur, III. Valse..."
    PERFORMER "Russie"
    FLAGS DCP
    INDEX 01 38:02:63
  TRACK 10 AUDIO
    TITLE "Issac Albeniz (1860-1909) - Asturias"
    PERFORMER "Espagne"
    FLAGS DCP
    INDEX 00 43:54:31
    INDEX 01 43:57:58
  TRACK 11 AUDIO
    TITLE "Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 00 50:39:35
    INDEX 01 50:43:10
  TRACK 12 AUDIO
    TITLE "Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 60:46:52
  TRACK 13 AUDIO
    TITLE "Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 67:22:07
  TRACK 14 AUDIO
    TITLE "Camille Saint-Saens (1835-1921) - Trio n°I op.18 en Fa majeur, III. Scherzo"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 71:34:30
  TRACK 15 AUDIO
    TITLE "Camille Saint-Saens (1835-1921) - Symphonie n°3 avec orgue en ut mineur op.78..."
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 75:08:17

Command line:
[font= \"Lucida Console\"][!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]cmd /k "java.exe -jar "C:\Program Files\foobar2000\utils\pcutmp3.jar" --cue "$directory_path(%path%)\%filename%.cue" --dir "$directory_path(%path%)" "$directory_path(%path%)\%filename%.mp3""[/size][/font]

Can some developer comment this?
Title: pcutmp3 tool
Post by: neovibe on 2009-12-05 00:01:36
Hey everyone. I'm trying to use J.River Media center with pcut but with no success.

I'm setting it up to automatically use pcutmp3 as a command line 'encoder' (it only splits but JRMC doesn't know!).
To set this up the only tools I have are:

- exe path (easy)
- parameters (java -jar pcutmp3.jar --cue  ??)
- use %IN for input file and %out for output file

problem is, JRMC refers to songs like this "C:\....\album.mp3;6" this representing track 6 of the album that has a cue in the same directory

is there any chance of getting this to work with JRMC???

thanks in advance!!
Title: pcutmp3 tool
Post by: neovibe on 2009-12-26 00:37:58
Hey everyone. I'm trying to use J.River Media center with pcut but with no success.

I'm setting it up to automatically use pcutmp3 as a command line 'encoder' (it only splits but JRMC doesn't know!).
To set this up the only tools I have are:

- exe path (easy)
- parameters (java -jar pcutmp3.jar --cue  ??)
- use %IN for input file and %out for output file

problem is, JRMC refers to songs like this "C:\....\album.mp3;6" this representing track 6 of the album that has a cue in the same directory

is there any chance of getting this to work with JRMC???

thanks in advance!!


Can anyone help me out with this? can pcut specifically output just 1 track from the cue? how?
thanks in advance
Title: pcutmp3 tool
Post by: neovibe on 2009-12-26 18:53:34
OK, finally found the wiki... just use the crop command.

now the silliest question of all this thread...
- will it run on MAC? (I warned...)

thanks
Title: pcutmp3 tool
Post by: DeltaCity on 2010-01-31 03:35:42
Hi all
I'm using the great GUI pcutmp3gui-0.3.jar, but this seems to have v0.95b embedded inside.  Is there a command line option for the GUI which tells it to use an external version of the pcutmp3.jar (like a newer version than v0.95b), rather than the internal one?

thanks

DC
Title: pcutmp3 tool
Post by: orloffm on 2010-02-11 22:01:26
Hi! There seems to be no support for 48KHz files. I've got a .cue that works fine with such a file in foobar2000, but the splitting is erroneous: the higher the track number is, the further is the delay of the resulting mp3 file from the beginning of the song.
Title: pcutmp3 tool
Post by: greynol on 2010-02-11 22:27:00
CUE sheets are for indexing CDs and CDs are 44.1kHz, not 48kHz.
Title: pcutmp3 tool
Post by: djphatic on 2010-05-16 14:40:33
I fixed mp3 using this tool, but I see the same error again:

C:\>java -jar pcutmp3.jar --cue "ASOT.cue" "ASOTfix.mp3"

PCutMP3 -- Properly Cut MP3 v0.97.1

scanning "ASOTfix.mp3" ...
first frame header = MPEG1 Layer3 192kbps 44100Hz J-Stereo
Xing/Info tag present
bitrate = 192 kbps (CBR)
accurate length = no
321691392 samples (is NOT a multiple of 588)
writing "01. A State of Trance - Intro.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:283)


 

I have the same error. I have ran the mp3 through mp3brfix and no errors are found
Code: [Select]
MP3brfix (bit-reservoir-fix) v0.95(beta) © 2003-2005 by ZeBee

scanning 01-above_and_beyond_-_trance_around_the_world_300_(di.fm)_(live_at_foru
m_hall_moscow)-01-01-2010-tt 1.mp3 ...
first frame:
  MPEG1 Layer3 256kbps 44100Hz J-Stereo
  Info-Tag present
  flags: [fc] [bc] [toc] [vs]
  LAME-Tag present  ( LAME  )
mp3 frames: 0, CBR (256 kbps)
Bit-Res errors: 0
no CRC protected frames found.
ready.

Any suggestions?
Title: pcutmp3 tool
Post by: djphatic on 2010-05-29 11:00:44
Managed to get things working.

Is there anyway to have a batch file which puts the cut files into a new folder which is has the Album Name?

My current batch looks like this (which I copied from this thread)

Code: [Select]
@echo off
title pcutmp3
cd /d "C:\pcutmp3\"
java -jar pcutmp3.jar --cue %1 --dir "%~dp1\
pause
exit
Title: pcutmp3 tool
Post by: Jojo on 2010-11-02 21:14:07
I'm on Win 7 64 bit, and get the following error
Quote
C:\>java -jar pcutmp3.jar
'java' is not recognized as an internal or external command,
operable program or batch file.


using
Code: [Select]
pcutmp3.jar --cue 1.cue
cuts the files, but I don't get any output info.

I also tried two versions hosted on the website and they don't work at all, I get the same error as the poster above.

Any idea?


Title: pcutmp3 tool
Post by: alexcavaco on 2010-11-03 09:24:05
I'm on Win 7 64 bit, and get the following error
Quote
C:\>java -jar pcutmp3.jar
'java' is not recognized as an internal or external command,
operable program or batch file.


using
Code: [Select]
pcutmp3.jar --cue 1.cue
cuts the files, but I don't get any output info.

I also tried two versions hosted on the website and they don't work at all, I get the same error as the poster above.

Any idea?


Hmmm, are you sure you have Java installed?

The error you get is that the Windows command prompt doesn't find any executable named 'java'.
Title: pcutmp3 tool
Post by: lvqcl on 2010-11-03 15:54:45
Win+Break -> Advanced system settings -> Environment Variables -> edit PATH variable: add
Code: [Select]
c:\Program Files\Java\jre6\bin
to it

Or "c:\Program Files (x86)\Java\jre6\bin" if you have 32-bit JRE installed.
Title: pcutmp3 tool
Post by: djphatic on 2011-01-18 21:14:20
Is there any update to jid3 which will write more than the usual artist, title, album tags?

It would be great to get the discnumber and year/date tags and whatever else is contained in the original mp3 to be written to the split tracks also.
Title: pcutmp3 tool
Post by: J0sHi on 2011-02-03 17:10:56
I cant believe this program is dieing, Its the only tool on the web that i could find that cuts LAME encoded mp3s accuratly and gaplessly.
Its a hidden gem really, people would pay for this. I would it if it had a gui and the bugs were worked out.

Simply because its one of a kind. I cant believe its left half complete. 

madness.

Considering by the looks of it, its been around years.
I only found this last month.

Title: pcutmp3 tool
Post by: ExUser on 2011-02-03 21:21:51
It's not dying. It works fine. The source code is available if anyone wants to continue it or alter it. The reality is that it works so well that no changes have been needed.
Title: pcutmp3 tool
Post by: djphatic on 2011-02-05 13:56:27
Something is wrong with new beta version (notice totally wrong filesize and cuts in Beta version):

Correctly done:
Code: [Select]
PCutMP3 -- Properly Cut MP3 v0.97.1

scanning "C:\Temp\rip\CDImage.mp3" ...
first frame header = MPEG1 Layer3 128kbps 44100Hz J-Stereo
Xing/Info and LAME tag present
bitrate = 173.64375 kbps (VBR)
accurate length = yes
211450092 samples (is a multiple of 588)
writing "C:\Temp\rip\01. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3" ...
writing "C:\Temp\rip\02. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n░6.mp3" ...
writing "C:\Temp\rip\03. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3" ...
writing "C:\Temp\rip\04. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\05. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\06. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3" ...
writing "C:\Temp\rip\07. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3" ...
writing "C:\Temp\rip\08. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3" ...
writing "C:\Temp\rip\09. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n░5 en mi mineur, III. Valse....mp3" ...
writing "C:\Temp\rip\10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3" ...
writing "C:\Temp\rip\11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3" ...
writing "C:\Temp\rip\12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3" ...
writing "C:\Temp\rip\13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3" ...
writing "C:\Temp\rip\14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n░I op.18 en Fa majeur, III. Scherzo.mp3" ...
writing "C:\Temp\rip\15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n░3 avec orgue en ut mineur op.78....mp3" ..
.
done.

C:\Program Files\foobar2000>cd\

C:\>cd temp\rip

C:\Temp\rip>dir
 Volume in drive C has no label.
 Volume Serial Number is E88F-2219

 Directory of C:\Temp\rip

13.08.2009  20:10    <DIR>          .
13.08.2009  20:10    <DIR>          ..
13.08.2009  20:10        12.015.104 01. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3
13.08.2009  20:10        7.675.667 02. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n°6.mp3
13.08.2009  20:10        5.410.620 03. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3
13.08.2009  20:10        3.091.070 04. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:10        2.329.955 05. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:10        6.944.897 06. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3
13.08.2009  20:10        3.828.923 07. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3
13.08.2009  20:10        5.975.041 08. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3
13.08.2009  20:10        8.190.068 09. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n°5 en mi mineur, III. Valse....mp3
13.08.2009  20:10        9.098.676 10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3
13.08.2009  20:10        14.067.179 11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3
13.08.2009  20:10        8.707.708 12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3
13.08.2009  20:10        5.716.780 13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3
13.08.2009  20:10        4.293.268 14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n°I op.18 en Fa majeur, III. Scherzo.mp3
13.08.2009  20:10        6.761.159 15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n°3 avec orgue en ut mineur op.78....mp3
13.08.2009  20:01            2.764 CDImage.cue
25.12.2007  21:06      104.075.161 CDImage.mp3
              17 File(s)    208.184.040 bytes
              2 Dir(s)  330.037.747.712 bytes free

C:\Temp\rip>
Badly done:
Code: [Select]
PCutMP3 -- Properly Cut MP3 v0.98 BETA

scanning "C:\Temp\rip\CDImage.mp3" ...
first frame header = MPEG1 Layer3 128kbps 44100Hz J-Stereo
Xing/Info and LAME tag present
bitrate = 173.64375 kbps (VBR)
accurate length = yes
211450092 samples (is a multiple of 588)
writing "C:\Temp\rip\1. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3" ...
writing "C:\Temp\rip\2. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n░6.mp3" ...
writing "C:\Temp\rip\3. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3" ...
writing "C:\Temp\rip\4. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\5. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3" ...
writing "C:\Temp\rip\6. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3" ...
writing "C:\Temp\rip\7. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3" ...
writing "C:\Temp\rip\8. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3" ...
writing "C:\Temp\rip\9. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n░5 en mi mineur, III. Valse....mp3" ...
writing "C:\Temp\rip\10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3" ...
writing "C:\Temp\rip\11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3" ...
writing "C:\Temp\rip\12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3" ...
writing "C:\Temp\rip\13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3" ...
writing "C:\Temp\rip\14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n░I op.18 en Fa majeur, III. Scherzo.mp3" ...
writing "C:\Temp\rip\15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n░3 avec orgue en ut mineur op.78....mp3" ..
.
done.

C:\Program Files\foobar2000>cd\

C:\Temp\rip>dir
 Volume in drive C has no label.
 Volume Serial Number is E88F-2219

 Directory of C:\Temp\rip

13.08.2009  20:01    <DIR>          .
13.08.2009  20:01    <DIR>          ..
13.08.2009  20:01        12.015.147 1. Hongrie - Franz Liszt (1811-1886) - La Lugubre Gondole.mp3
13.08.2009  20:01              827 10. Espagne - Issac Albeniz (1860-1909) - Asturias.mp3
13.08.2009  20:01        78.605.197 11. Francophonie - Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo.mp3
13.08.2009  20:01        8.707.751 12. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture.mp3
13.08.2009  20:01        5.716.823 13. Francophonie - Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon.mp3
13.08.2009  20:01        4.293.311 14. Francophonie - Camille Saint-Saens (1835-1921) - Trio n°I op.18 en Fa majeur, III. Scherzo.mp3
13.08.2009  20:01        6.761.202 15. Francophonie - Camille Saint-Saens (1835-1921) - Symphonie n°3 avec orgue en ut mineur op.78....mp3
13.08.2009  20:01              957 2. Hongrie - Franz Liszt (1811-1886) - Rhapsodie hongroise n°6.mp3
13.08.2009  20:01        25.097.269 3. Boheme - Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace.mp3
13.08.2009  20:01        3.091.113 4. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:01            1.017 5. Boheme - Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L....mp3
13.08.2009  20:01        37.457.144 6. Pays Nordiques - Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato.mp3
13.08.2009  20:01              989 7. Pays Nordiques - Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae.mp3
13.08.2009  20:01        47.256.154 8. Russie - Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ....mp3
13.08.2009  20:01            1.017 9. Russie - Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n°5 en mi mineur, III. Valse....mp3
13.08.2009  20:01            2.764 CDImage.cue
25.12.2007  21:06      104.075.161 CDImage.mp3
              17 File(s)    333.083.843 bytes
              2 Dir(s)  330.179.977.216 bytes free

C:\Temp\rip>
CUE file:
Code: [Select]
REM GENRE Classical
REM DATE 2005
REM DISCID ED12BA0F
PERFORMER "Various Artists"
TITLE "Century 2 - L'eveil musical des Nations (vol 17)"
FILE "CDImage.mp3" WAVE
  TRACK 01 AUDIO
    TITLE "Franz Liszt (1811-1886) - La Lugubre Gondole"
    PERFORMER "Hongrie"
    FLAGS DCP
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Franz Liszt (1811-1886) - Rhapsodie hongroise n°6"
    PERFORMER "Hongrie"
    FLAGS DCP
    INDEX 01 09:31:65
  TRACK 03 AUDIO
    TITLE "Antonin Dvorak (1841-1904) - Quatuor Americain, III. Molto vivace"
    PERFORMER "Boheme"
    FLAGS DCP
    INDEX 00 16:09:32
    INDEX 01 16:10:53
  TRACK 04 AUDIO
    TITLE "Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L..."
    PERFORMER "Boheme"
    FLAGS DCP
    INDEX 01 20:08:28
  TRACK 05 AUDIO
    TITLE "Antonin Dvorak (1841-1904) - Melodies, Chants du Manuscrit de Dvur Kralove, L..."
    PERFORMER "Boheme"
    FLAGS DCP
    INDEX 01 22:45:29
  TRACK 06 AUDIO
    TITLE "Edvard Grieg (1843-1907) - Sonate pour violon et piano, III. Allegro animato"
    PERFORMER "Pays Nordiques"
    FLAGS DCP
    INDEX 00 24:42:29
    INDEX 01 24:45:34
  TRACK 07 AUDIO
    TITLE "Jean Sibelius (1865-1957) - Quatuor a cordes Voces intimae"
    PERFORMER "Pays Nordiques"
    FLAGS DCP
    INDEX 01 29:56:54
  TRACK 08 AUDIO
    TITLE "Modeste Moussorgski (1839-1881) - Tableaux d'une exposition, La Grande Porte ..."
    PERFORMER "Russie"
    FLAGS DCP
    INDEX 00 32:42:50
    INDEX 01 32:46:49
  TRACK 09 AUDIO
    TITLE "Piotr Ilyich Tchaikivski (1840-1893) - Symphonie n°5 en mi mineur, III. Valse..."
    PERFORMER "Russie"
    FLAGS DCP
    INDEX 01 38:02:63
  TRACK 10 AUDIO
    TITLE "Issac Albeniz (1860-1909) - Asturias"
    PERFORMER "Espagne"
    FLAGS DCP
    INDEX 00 43:54:31
    INDEX 01 43:57:58
  TRACK 11 AUDIO
    TITLE "Cesar Franck (1822-1890) - Symphonie en re mineur, III. Allegro non troppo"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 00 50:39:35
    INDEX 01 50:43:10
  TRACK 12 AUDIO
    TITLE "Georges Bizet (1838-1875) - L'Arlesienne, I. Ouverture"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 60:46:52
  TRACK 13 AUDIO
    TITLE "Georges Bizet (1838-1875) - L'Arlesienne, IV. Carillon"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 67:22:07
  TRACK 14 AUDIO
    TITLE "Camille Saint-Saens (1835-1921) - Trio n°I op.18 en Fa majeur, III. Scherzo"
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 71:34:30
  TRACK 15 AUDIO
    TITLE "Camille Saint-Saens (1835-1921) - Symphonie n°3 avec orgue en ut mineur op.78..."
    PERFORMER "Francophonie"
    FLAGS DCP
    INDEX 01 75:08:17

Command line:
[!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]cmd /k "java.exe -jar "C:\Program Files\foobar2000\utils\pcutmp3.jar" --cue "$directory_path(%path%)\%filename%.cue" --dir "$directory_path(%path%)" "$directory_path(%path%)\%filename%.mp3""[/size]

Can some developer comment this?


Did you ever figure this one out?

I seem to be having a similar issue though this is with 0.97.1 and 0.98 BETA. The cuesheet loads and plays fine in foobar but when I split all the track lengths are completely different and wrong.
Title: pcutmp3 tool
Post by: djphatic on 2011-02-05 16:31:42
It appears the issue is related to 48hz encoded livesets I have been trying to split, which the progam does not support correctly.
Title: pcutmp3 tool
Post by: Ryo94 on 2011-02-08 18:10:46
HI, I'm using the pcutmp3 095b that is embedded in gui 0.3. Is there any version of the gui that comes with pcutmp3 0.98? thanks in advance.
Title: pcutmp3 tool
Post by: neovibe on 2011-07-05 14:32:32
Win+Break -> Advanced system settings -> Environment Variables -> edit PATH variable: add
Code: [Select]
c:\Program Files\Java\jre6\bin
to it

Or "c:\Program Files (x86)\Java\jre6\bin" if you have 32-bit JRE installed.


thanks for this one!
Title: pcutmp3 tool
Post by: AdamBast on 2012-03-07 16:16:10
ohai

1st: thanks for this tool

2nd:
no matter what i cut, the mp3 tags don't show up correctly in jetaudio.
other plyayers tested (just to view the tags):
tcpmp -> same problem
wmp 11 -> same

(http://kepfeltoltes.hu/thumb/120307/geco_www.kepfeltoltes.hu_.png) (http://kepfeltoltes.hu/120307/geco_www.kepfeltoltes.hu_.png)

left is (white background) what totalcommander shows, the normal file names
right is (gray background) what the players shows

i think it's maybe some unicode problem, specifically jid3.jar-related, but i'm not sure

thanks in advance for any help

---------------------------

+question: does pcutmp3 append gaps by default?
if not, how can i make it so?
Title: pcutmp3 tool
Post by: megar on 2012-03-21 20:28:31
Hello.
I recently had to use pcutmp3. This is a wonderful program, seems to be the only one on the web to achieve true gapeless cuting. Unfortunately, the mp3 was 48Khz and I bumped into the same bug some of you entountered.

I made a quick fix to pcutmp3, thanks for putting in on google code.

Anyway, here is my patch: (I also corrected the leading 0 in track number)

Code: [Select]
Index: de/zebee/mpa/Track.java
===================================================================
--- de/zebee/mpa/Track.java     (revision 28)
+++ de/zebee/mpa/Track.java     (working copy)
@@ -6,8 +6,14 @@
     private String title;
     private int    trackNumber;

+    /*
+     * start sector. One sector = 1/75th of a second
+     */
     private long   startSector;

+    /*
+     * end sector. One sector = 1/75th of a second
+     */
     private long   endSector;

     public Track() {
Index: de/zebee/mpa/MainCLI.java
===================================================================
--- de/zebee/mpa/MainCLI.java   (revision 28)
+++ de/zebee/mpa/MainCLI.java   (working copy)
@@ -257,6 +257,9 @@
                 outDir = null;
             }

+            int samplingFrequencyHz = scannedMP3.getSamplingFrequency();
+            int samplesPerSector = samplingFrequencyHz / 75;
+
             for (int i = 0; i < cueFile.getNumberTracks(); i++) {

                 Track t = cueFile.getTrack(i);
@@ -274,8 +277,8 @@
                 FileOutputStream fops = new FileOutputStream(fn);

                 try {
-                    scannedMP3.crop(t.getStartSector(), t.getEndSector(), new FileInputStream(
-                            srcFileFile), fops);
+                    scannedMP3.crop(t.getStartSector() * samplesPerSector, t.getEndSector()
+                            * samplesPerSector, new FileInputStream(srcFileFile), fops);
                 } finally {
                     fops.close();
                 }
@@ -338,6 +341,9 @@
                             break;
                         }
                         case 'n': {
+                            if (Integer.parseInt(trackNo) < 10) {
+                                sb.append("0");
+                            }
                             sb.append(trackNo);
                             break;
                         }
@@ -463,7 +469,7 @@
                         else if (token.equals("index")) {
                             try {
                                 int idx = Integer.parseInt(st.nextToken());
-                                long smp = MSFstring2sector(st.nextToken()) * 588L;
+                                long smp = MSFstring2sector(st.nextToken());
                                 if (idx == 1) {

                                     if (currentTrack != null) {


I did NOT change the version number, only the main maintener should do it, and release another compiled jar.

I would be glad SebastianG or senab can review the patch and commit it to the code.
I only tested it with a 99 track 44.1 Khz mp3 and 99 track 48 Khz mp3. (Did not test other layers).

Hope it can be useful.
Title: pcutmp3 tool
Post by: andrew_berge on 2012-03-27 04:22:35
I ran into a 48khz file today and came here to ask about it. Looks like i'm not alone with this problem, and it looks like people are trying to resolve the problem (thanks megar!).

I have no knowledge on how to compile jar files though, so i'll second megar's request that the code be checked and hopefully accepted and released.
Thanks.
Title: pcutmp3 tool
Post by: megar on 2012-03-27 15:48:50
I uploaded a precompiled pcutmp3.jar here : https://niki.atomas.com/files/pcutmp3/ (https://niki.atomas.com/files/pcutmp3/)
It includes the source code changes from the 0.98beta release.

Changelog:
- [fix] support for 48Khz mp3
- [fix] fix the leading 0 in %n scheme
- [fix] don't print exception if no file given
- [new feature] --split-in N : to cut a mp3 in N equal parts
- [new feature] --split-every N : to cut a mp3 every N seconds.
- [change] jid3.jar is now bundled

Please do not spread it, I am waiting for the answer from the original authors.

Please report if it works.........
Title: pcutmp3 tool
Post by: andrew_berge on 2012-03-27 18:28:41
Thanks, megar

The split points are all in the right places now, but there seems to be an issue with the original file's Gapless information.
My original had no delay at the beginning of the track, but it looks like a 576 sample delay (LAME's default) is added after a split.

So the file is split perfectly, but the length is changed. I'm going to experiment a bit and see what else i can find.
Title: pcutmp3 tool
Post by: megar on 2012-03-27 19:05:46
I think that's the correct behaviour. pcutmp3 add a mp3 frame as the start of the 2nd mp3 with silence information. It is used to fill the bit reservoir. See http://www.hydrogenaudio.org/forums/index....st&p=315678 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=35654&view=findpost&p=315678)
It is also explained in the first post of the topic.

If foobar can play the song without any gap, it is OK, the first frame pcutmp3 create is compensated by a high encoder_delay, but the shown total frames of the songs will be greater.

The first song should not be altered, though.

I may add a --rejoin option to rebuilt the largemp3 file, but that's another story.
Title: pcutmp3 tool
Post by: x0x on 2012-06-25 17:21:10
I am in need of a tool that can split mp3 files using cue sheets on Mac so I came across pcutmp3.

Megar, I tried your version and it worked just fine. However, gapless playback is not 100% accurate. When I import the mp3 files I created with pcutmp3 into iTunes, some of them sound gapless and others have a slight hick-up. Tiny but it's there and noticeable for techno / house mixes.

Is there anything I can do to resolve this problem? I already tried enabling the gapless playback setting for each file in iTunes without success.
Title: pcutmp3 tool
Post by: megar on 2012-06-25 18:23:00
Do the generated mp3s play completely gapless on Foobar ?

I don't have iThunes, but I found these two resources:
http://www.sturmnet.org/blog/2008/11/06/ma...ayback-nonsense (http://www.sturmnet.org/blog/2008/11/06/making-itunes-stop-that-gapless-playback-nonsense)
http://manishbansal.wordpress.com/2010/10/...lems-in-itunes/ (http://manishbansal.wordpress.com/2010/10/15/how-to-fix-gapless-analysis-problems-in-itunes/)

The second one gives a cookbook to fix mp3 stream / vbr header. It seems iThunes doesn't read the lame tags but try to guess values other way (don't know which way).

You may try the cookbook, maybe it will be successful.
Title: pcutmp3 tool
Post by: x0x on 2012-06-25 21:01:49
I only have Macs so foobar isn't an option...

Anyway if it's iTunes not following the standards it wouldn't surprise me. I tried several apps including your build of pcutmp3 but with each try, iTunes does not seem to be handling the gapless playback like it should. The results differ and pcutmp3 does seem to be doing the best job but still some tracks have a hick-up.

iTunes works great for me on Mac but I guess I should keep mix cd's a single file like I download them, too bad for Last.fm
Title: pcutmp3 tool
Post by: megar on 2012-06-25 21:24:46
Well, I can try to help. If you send me two or three mp3 cutted bu pcutmp3, I can try to rebuild mp3 stream / fix vbr header, then send them back to you. So we will have a clue. In that case, it would means that pcutmp3 does not produce completely good mp3. But I think it's unlikely, because it re-write a (I think) correct mp3 vbr header. You can upload the files on a public upload site and send me the link (by Private Message).
Title: pcutmp3 tool
Post by: megar on 2012-08-27 22:36:49
Since I got no answer from the author, I decided to fork the project on my Bitbucket account.
It is here : https://bitbucket.org/gbouthenot/pcutmp3/ (https://bitbucket.org/gbouthenot/pcutmp3/)
I do not claim being the original author. I would remove it if the authors ask me to. It's New BSD Licence, so it should be legal, though.

The webpage provides a download link for the compiled jar (Megar Build 3), So I will remove Build 2 from here.
Title: pcutmp3 tool
Post by: hoesterholt on 2013-09-02 17:11:44
I've created a new version of PCutMp3 with a GUI for creating, opening, etc. cuesheets.
It also fixes a bug concerning 48000Hz mp3 files.

See https://github.com/hoesterholt/pcutmp3-gui (https://github.com/hoesterholt/pcutmp3-gui) for the source.
And https://github.com/hoesterholt/pcutmp3-gui/...aster/README.md (https://github.com/hoesterholt/pcutmp3-gui/blob/master/README.md) for a small readme and a download link for an installer.
Title: pcutmp3 tool
Post by: markanini on 2013-10-25 17:11:37
I've created a new version of PCutMp3 with a GUI for creating, opening, etc. cuesheets.
It also fixes a bug concerning 48000Hz mp3 files.

See https://github.com/hoesterholt/pcutmp3-gui (https://github.com/hoesterholt/pcutmp3-gui) for the source.
And https://github.com/hoesterholt/pcutmp3-gui/...aster/README.md (https://github.com/hoesterholt/pcutmp3-gui/blob/master/README.md) for a small readme and a download link for an installer.

Thanks, it's nice to have an all-in-one installer.
Unfortunately I have a bug report: Invoking the file menu does nothing. Strangely it worked fine the other day. There have been no changes in my sytem that would account for the change in behaviour.
Title: pcutmp3 tool
Post by: n0v!ze on 2014-01-23 08:13:29
I've got a couple of questions regarding ID3v2 support in pcutmp3:

- By default, does pcutmp3 write ID3v2.3 or ID3v2.4 tags?
- If the latter, is there a command line switch to force ID3v2.3?
- In case of ID3v2.3, what padding size is used? (analog to LAME's --pad-id3v2-size option)
- Is there a way to specify the padding size?

Regards
Title: pcutmp3 tool
Post by: n0v!ze on 2014-01-25 16:36:26
Since I got no answer from the author, I decided to fork the project on my Bitbucket account.
It is here : https://bitbucket.org/gbouthenot/pcutmp3/ (https://bitbucket.org/gbouthenot/pcutmp3/)
I do not claim being the original author. I would remove it if the authors ask me to. It's New BSD Licence, so it should be legal, though.

The webpage provides a download link for the compiled jar (Megar Build 3), So I will remove Build 2 from here.

Megar Build 3 seems to have a bug in the options parser:

(http://imageshack.com/a/img600/5707/6pw1.jpg)

When I remove --artist and --album from the command line, it works:

(http://imageshack.com/a/img811/5358/c76v.jpg)

Both options --artist and --album are explicitely allowed:

(http://imageshack.com/a/img15/3664/cwin.jpg)
Title: pcutmp3 tool
Post by: n0v!ze on 2014-01-25 16:46:48
I've got a couple of questions regarding ID3v2 support in pcutmp3:

- By default, does pcutmp3 write ID3v2.3 or ID3v2.4 tags?
- If the latter, is there a command line switch to force ID3v2.3?
- In case of ID3v2.3, what padding size is used? (analog to LAME's --pad-id3v2-size option)
- Is there a way to specify the padding size?

Regards

I ran a quick test with an input file which only has ID3v2.3 tags and found that the split files do have ID3v2.3 tags only, too:

(http://imageshack.com/a/img689/3166/k6v6.jpg)

Unfortunately, metamp3 doesn't tell me anything about the padding size. Anybody?
Title: pcutmp3 tool
Post by: bilbo on 2014-01-25 17:25:56
I've got a couple of questions regarding ID3v2 support in pcutmp3:

Unfortunately, metamp3 doesn't tell me anything about the padding size. Anybody?
You might want to try mp3packer. It will let you do many operations to the file, all lossless. Here is an example of extracting information. is this padding information the information that you are looking for?

Code: [Select]
Info

By specifying the -i option, the program will print data about the input file then exit. No files will be written and the output (if given) will be ignored. Example printout:

*** "test/APS.mp3"
INFO:
 MPEG1 layer 3
 21687 frames
 44100 Hz
 38.281250 frames per second
 566.517551 seconds
 12514543 bytes in file (176.722405 kbps)
 12514126 bytes in MP3 frames (176.716516 kbps) = current bitrate
 93784923 bits of payload data (165.546368 kbps)
 11732617 bytes of payload data (165.680544 kbps)
 76013 bits wasted from partially-full bytes (0.134176 kbps)
 12513349 bytes of MP3 data (176.705544 kbps) = minimum bitrate possible
 777 bytes of padding (0.010972 kbps)
 417 bytes outside MP3 frames (0.005889 kbps)
 1 sync error
 Bitrate distribution:
  32: 9,0
  128: 3641,0
  160: 7691,0
  192: 6700,0
  224: 2736,0
  256: 785,0
  320: 125,0
 Largest frame uses 8478 bits = 1060 bytes = 324.548437 kbps
 Smallest bitrate for CBR is 256

It will let you remove all padding.
Title: pcutmp3 tool
Post by: n0v!ze on 2014-01-26 14:51:02
Actually, I want quite the opposite: I'd like to make sure that there's enough room for tagging without extending the file. If I knew this is 4096 bytes, everything would be fine.
Title: pcutmp3 tool
Post by: mjb2006 on 2014-01-26 18:11:42
I haven't seen any tag-reading tools that go beyond just telling you what type of tags are in the file, and what the name-value pairs are. Tag type, order, size, and how the space is utilized in each tag are things I only ever learn by looking at the file with a hex editor.
Title: pcutmp3 tool
Post by: n0v!ze on 2014-01-27 20:04:09
I haven't seen any tag-reading tools that go beyond just telling you what type of tags are in the file, and what the name-value pairs are. Tag type, order, size, and how the space is utilized in each tag are things I only ever learn by looking at the file with a hex editor.

OK, did this. Actually the Xing header starts at offset 1078h (4217) and there are only ASCII nulls up to offset 1045h (4180). So I guess the padding size is 4096 bytes. Looks like pcutmp3 is the right tool for the job. :-)
Title: pcutmp3 tool
Post by: yoasif on 2014-02-05 19:33:06
I'm running into the same issues with the MEGAR BUILD 3 of pcutmp3 that others have found.

I'm cutting a 48000Hz VBR file and even after using vbrfix, mp3brfix and foobar2000's "Fix VBR MP3 Header" on the file, I run into a "is NOT a multiple of 640" error.

The error is:

Code: [Select]
PCutMP3 -- Properly Cut MP3 -- MEGAR BUILD 3
see http://www.hydrogenaudio.org/forums/index.php?showtopic=35654

scanning "/home/asif/bin/01-tiesto_-_essential_mix-sat-02-01-2014-talion.mp3" ...
first frame header = MPEG1 Layer3 128kbps 48000Hz J-Stereo
Xing/Info and LAME tag present
bitrate = 220.0 kbps (VBR)
accurate length = yes
344573952 samples (is NOT a multiple of 640)
writing "/home/asif/bin/temp/01. Essential Mix - Intro.mp3" ...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -10
    at de.zebee.mpa.util.ScannedMP3.getInt16(ScannedMP3.java:91)
    at de.zebee.mpa.util.ScannedMP3.getInt32(ScannedMP3.java:95)
    at de.zebee.mpa.util.ScannedMP3.getFrameFileOfs(ScannedMP3.java:109)
    at de.zebee.mpa.util.ScannedMP3.crop(ScannedMP3.java:367)
    at de.zebee.mpa.MainCLI.main(MainCLI.java:368)


which has been reported previously.

Is this a hard and fast limitation of pcutmp3? Other users seem to have resolved this issue in various ways, but running the VBR fix tools don't seem like it will help this situation. Is there any way to pad the original mp3 with a few samples of silence at the end to ensure that the sample count is divisible by 640? Or is there some other way to resolve this?
Title: pcutmp3 tool
Post by: mjb2006 on 2014-02-05 23:48:57
Are you sure this exception is related to the warning about the sample count not being a multiple of 640? Looks like the warning is just informational, letting you know that the last track will end slightly early; i.e. it doesn't look like it came from a CD.

The exception happens later, I think, when it's trying to look at the bit reservoir, which involves looking at previous frames. https://code.google.com/p/pcutmp3/source/br...ScannedMP3.java (https://code.google.com/p/pcutmp3/source/browse/trunk/de/zebee/mpa/util/ScannedMP3.java)

I don't fully grok what's going on, but my guess is that the first frame(s) of the input MP3 say their data starts in the bit reservoir (i.e., back a frame or two), and pcutmp3 wasn't expecting that, since it wouldn't be the case in a normal MP3, but would happen in a stream that was already crudely split, like your captured radio show probably is.

You might try pre-processing the mp3 with mp3packer -b 320 -r (makes all frames 320 kbps and minimizes bit reservoir usage). Then if the pcutmp3 split works, run the result through mp3packer -s -t -z (squeezes it back down to VBR, as tightly as possible) (might not actually be necessary; pcutmp3 might do well enough).

(I fully admit I may have no idea what I'm talking about)
Title: pcutmp3 tool
Post by: yoasif on 2014-02-06 03:12:57
So this is what I did, based on your recommendation:

Code: [Select]
wine mp3packer.exe -b 320 -r /home/asif/Downloads/01-tiesto_-_essential_mix-sat-02-01-2014-talion.mp3 /home/asif/Downloads/01-tiesto_-_essential_mix-sat-02-01-2014-talion-new.mp3
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x01b6 ignored

*** '/home/asif/Downloads/01-tiesto_-_essential_mix-sat-02-01-2014-talion.mp3' -> '/home/asif/Downloads/01-tiesto_-_essential_mix-sat-02-01-2014-talion-new.mp3'
WARNING: Buffer over/underflow on frame 0 at 0:00.00
100% done with 299112 frames (664.94x)

  WARNING: an error was encountered
    1 buffer error


I was then able to successfully cut the mp3 using pcutmp3. 

pcutmp3 didn't really cut the filesize down, and foobar2000 shows that the files it generated are 320kbps. After running mp3packer -s -t -z as you suggested, the files do become vbr, and LAME tags are preserved.

Thank you so much for your suggestion, mjb2006 - I have been having this problem for months with various other files, and I spent a decent amount of time searching for assistance. You have made my day!
Title: pcutmp3 tool
Post by: Molusc on 2014-02-08 13:59:16
I've created a new version of PCutMp3 with a GUI for creating, opening, etc. cuesheets.
It also fixes a bug concerning 48000Hz mp3 files.

See https://github.com/hoesterholt/pcutmp3-gui (https://github.com/hoesterholt/pcutmp3-gui) for the source.
And https://github.com/hoesterholt/pcutmp3-gui/...aster/README.md (https://github.com/hoesterholt/pcutmp3-gui/blob/master/README.md) for a small readme and a download link for an installer.

Thanks, it's nice to have an all-in-one installer.
Unfortunately I have a bug report: Invoking the file menu does nothing. Strangely it worked fine the other day. There have been no changes in my sytem that would account for the change in behaviour.


Did you ever find a fix for this?  I'm seeing a similar issue - the File --> Open menu command doesn't do anything.  Other menu commands like Save and Quit do work.

It was working fine yesterday and nothing has changed on my computer.
Title: Re: pcutmp3 tool
Post by: boardlord on 2017-02-25 09:03:48
I've created a new version of PCutMp3 with a GUI for creating, opening, etc. cuesheets.
It also fixes a bug concerning 48000Hz mp3 files.

See https://github.com/hoesterholt/pcutmp3-gui (https://github.com/hoesterholt/pcutmp3-gui) for the source.
And https://github.com/hoesterholt/pcutmp3-gui/...aster/README.md (https://github.com/hoesterholt/pcutmp3-gui/blob/master/README.md) for a small readme and a download link for an installer.
Thanks, it's nice to have an all-in-one installer.
Unfortunately I have a bug report: Invoking the file menu does nothing. Strangely it worked fine the other day. There have been no changes in my sytem that would account for the change in behaviour.

Did you ever find a fix for this?  I'm seeing a similar issue - the File --> Open menu command doesn't do anything.  Other menu commands like Save and Quit do work.

It was working fine yesterday and nothing has changed on my computer.

@hoesterholt

Any chance of a recompile? I saw that you fixed this bug on Git :) Thanks!

Edit: I downloaded Eclipse, and did a re-export, it was fairly easy :) I don't want to share this, since I am not sure of licenses and such...