IPB

Welcome Guest ( Log In | Register )

pcutmp3 tool, properly/perfect cut mp3
SebastianG
post Jul 18 2005, 12:05
Post #1





Group: Developer
Posts: 1318
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



Hi !

I got quite a few PMs about the mp3 splitter (read more here). 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 (I'm sorry, this is a dead link)
Feedback is appreciated.

This post has been edited by SebastianG: May 31 2008, 10:29
Go to the top of the page
+Quote Post
 
Start new topic
Replies
SebastianG
post May 17 2006, 18:12
Post #2





Group: Developer
Posts: 1318
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



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

This post has been edited by SebastianG: May 17 2006, 18:34
Go to the top of the page
+Quote Post
Jojo
post May 20 2006, 05:53
Post #3





Group: Members
Posts: 1361
Joined: 25-November 02
Member No.: 3873



QUOTE (SebastianG @ May 17 2006, 10:12) *
I can't believe that incorrect seektables would cause the behaviour you described. It's probaby the usually higher "ENC_DELAY" values from the LAME header that cause XBMC to do weird stuff.

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


--------------------
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'
Go to the top of the page
+Quote Post
SebastianG
post May 22 2006, 08:02
Post #4





Group: Developer
Posts: 1318
Joined: 20-March 04
From: Göttingen (DE)
Member No.: 12875



QUOTE (Jojo @ May 20 2006, 06:53) *
QUOTE (SebastianG @ May 17 2006, 10:12) *

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

This post has been edited by SebastianG: May 22 2006, 08:37
Go to the top of the page
+Quote Post

Posts in this topic
- SebastianG   pcutmp3 tool   Jul 18 2005, 12:05
- - Peter   Try zipping it, allowed upload file extensions are...   Jul 18 2005, 12:11
|- - SebastianG   QUOTE (zZzZzZz @ Jul 18 2005, 12:11 PM)Try zi...   Jul 18 2005, 12:26
- - SebastianG   0.91b -> 0.92b: - fixed seek table generation (...   Jul 18 2005, 14:38
- - SebastianG   For those who use Foobar 0.8.3 and want it to be t...   Jul 20 2005, 14:06
|- - jaybeee   Excellent work SebastianG. I look forward to havi...   Jul 20 2005, 14:25
||- - SebastianG   QUOTE (jaybeee @ Jul 20 2005, 02:25 PM)(1) Do...   Jul 20 2005, 14:39
|- - kode54   QUOTE (SebastianG @ Jul 20 2005, 06:06 AM)Thi...   Jul 20 2005, 14:53
|- - SebastianG   QUOTE (kode54 @ Jul 20 2005, 02:53 PM)QUOTE (...   Jul 20 2005, 16:03
|- - kode54   QUOTE (SebastianG @ Jul 20 2005, 08:03 AM)My ...   Jul 23 2005, 16:35
|- - SebastianG   QUOTE (kode54 @ Jul 23 2005, 04:35 PM)QUOTE (...   Jul 24 2005, 14:16
- - phwip   Thanks for this little program, could prove to be ...   Aug 20 2005, 00:07
|- - SebastianG   QUOTE (phwip @ Aug 20 2005, 12:07 AM)I've...   Aug 20 2005, 11:36
- - phwip   I used LameTag.exe. On the file I tested the foll...   Aug 20 2005, 12:05
|- - SebastianG   OK. I found the bug. (I'm also trying to set t...   Aug 20 2005, 13:07
- - SebastianG   changes (0.92b -> 0.93b) - fixed lame tag bug ...   Aug 21 2005, 13:04
- - Mr_Rabid_Teddybear   Commandline still says v0.92b.   Aug 21 2005, 13:38
- - SebastianG   Damn ... (I havn't correctly updated the symb...   Aug 21 2005, 13:53
- - dignick   Are you still working on this sebi? I've got q...   Sep 24 2005, 17:16
|- - The Link   QUOTE (dignick @ Sep 24 2005, 05:16 PM)Are yo...   Sep 24 2005, 17:24
||- - dignick   QUOTE (The Link @ Sep 24 2005, 05:24 PM)QUOTE...   Sep 24 2005, 17:50
|- - SebastianG   QUOTE (dignick @ Sep 24 2005, 05:16 PM)Are yo...   Sep 25 2005, 16:15
- - jaybeee   Available options in v.93b are: --cue cue-filena...   Sep 25 2005, 18:40
- - SebastianG   changed 0.93b -> 0.94b (not heavily tested) - ...   Sep 30 2005, 15:01
- - Synthetic Soul   Very minor point: CODE--out <sheme> ...   Sep 30 2005, 15:33
- - dignick   Thanks sebi. Any plans to add ID3V2?   Oct 2 2005, 09:53
|- - SebastianG   QUOTE (dignick @ Oct 2 2005, 09:53 AM)Thanks ...   Oct 2 2005, 13:33
- - dignick   Quickly looking around, the most stable project wr...   Oct 4 2005, 17:50
|- - SebastianG   QUOTE (dignick @ Oct 4 2005, 05:50 PM)EDIT2:...   Oct 4 2005, 20:44
- - dignick   Forgotten to mention this before, if you burn trac...   Oct 17 2005, 15:56
- - jaybeee   Sebi - been using the tool for a while now and it...   Dec 6 2005, 11:41
- - senab   There's only one thing that annoys me with thi...   Dec 18 2005, 21:23
|- - SebastianG   QUOTE (senab @ Dec 18 2005, 09:23 PM)There...   Dec 19 2005, 18:34
||- - Shade[ST]   The karma dev team will not be developing a discon...   Dec 19 2005, 19:32
|- - senab   QUOTE (senab @ Dec 18 2005, 09:23 PM)There...   Dec 20 2005, 17:41
|- - SebastianG   QUOTE (senab @ Dec 20 2005, 05:41 PM)It works...   Dec 21 2005, 09:16
|- - jaybeee   he he, I asked Sebi a similar question the other d...   Dec 21 2005, 13:15
- - senab   OK, let me have a look and I'll post what I...   Dec 21 2005, 15:19
|- - SebastianG   QUOTE (senab @ Dec 21 2005, 03:19 PM)OK, let ...   Dec 21 2005, 17:25
- - Jojo   does it also work when cutting CBR non Lame files?...   Jan 6 2006, 02:51
|- - jaybeee   QUOTE (Jojo @ Jan 6 2006, 01:51 AM)does it al...   Jan 6 2006, 10:08
- - PzyMazter   I cannot seem to get files I split using this tool...   Jan 6 2006, 06:44
- - markanini   Also if someone could make a GUI that would be nic...   Jan 6 2006, 13:46
- - Jojo   QUOTE (dignick @ Oct 2 2005, 01:53 AM)Thanks ...   Jan 7 2006, 00:44
|- - jaybeee   QUOTE (Jojo @ Jan 6 2006, 11:44 PM)QUOTE (dig...   Jan 8 2006, 00:21
- - Jojo   here is another little bug: pcutmp3 assumes that e...   Jan 17 2006, 01:36
- - SebastianG   Hello y'all ! QUOTE (Jojo @ Jan 6 20...   Jan 17 2006, 10:05
|- - Jojo   thanks for your answer. QUOTE (SebastianG @ J...   Jan 18 2006, 06:59
- - dignick   Nice to see this is staying alive. It's great...   Feb 7 2006, 15:57
- - markanini   Could accuracy of the cut itself, that is, letting...   Feb 8 2006, 01:47
- - pokecapn   why does it do this: PCutMP3 -- Properly Cut MP3 ...   Feb 19 2006, 03:59
- - SebastianG   Hmmm... looks like pcutmp3 is choking on your mp3 ...   Feb 19 2006, 06:56
- - pokecapn   first 10 seconds of the mp3: http://rapidshare.de/...   Feb 19 2006, 09:51
- - SebastianG   A quick fix that might work: Fix the bit reservoir...   Feb 20 2006, 08:59
- - SebastianG   Unfortunately i wasn't able to download the fi...   Feb 20 2006, 15:23
- - Jojo   is there any disadvantage of cutting a mp3 twice u...   Apr 17 2006, 01:36
- - SebastianG   No. There shouldn't be a problem. Sebi   Apr 17 2006, 02:38
- - dignick   I use XBMC quite frequently and I noticed that it ...   May 17 2006, 13:55
- - jaybeee   I don't think Sebi is actively developing this...   May 17 2006, 15:06
- - SebastianG   dignick: Did you try the latest version? I thought...   May 17 2006, 18:12
|- - Jojo   QUOTE (SebastianG @ May 17 2006, 10:12) I...   May 20 2006, 05:53
|- - SebastianG   QUOTE (Jojo @ May 20 2006, 06:53) QUOTE (...   May 22 2006, 08:02
- - dignick   I have been using 0.94b, now I see the new jar is ...   May 21 2006, 17:37
- - vlada   SebastianG> Would it be too difficult for you t...   May 31 2006, 16:19
- - Raiden   Just tried to cut a 48000hz mp3. It cut at the wro...   Jun 5 2006, 14:51
|- - SebastianG   QUOTE (Raiden @ Jun 5 2006, 15:51) Just t...   Jun 8 2006, 09:16
- - Matyas   Will pCutMP3 ever have a GUI? Command line is powe...   Jun 7 2006, 20:44
- - Jojo   QUOTE (Raiden @ Jun 5 2006, 06:51) Just t...   Jun 7 2006, 23:11
|- - mixminus1   QUOTE (Jojo @ Jun 7 2006, 15:11) QUOTE (R...   Jun 8 2006, 14:25
- - Raiden   I used this cuesheet on a 48000hz mp3 file: CODEFI...   Jun 8 2006, 15:04
|- - SebastianG   QUOTE (Raiden @ Jun 8 2006, 16:04) seems ...   Jun 8 2006, 16:32
- - M   Hi Sebi. First of all, thank you for this tool...   Jun 20 2006, 23:01
|- - SebastianG   QUOTE (M @ Jun 21 2006, 00:01) Have you c...   Jun 21 2006, 08:24
|- - M   QUOTE (SebastianG @ Jun 21 2006, 03:24) ...   Jun 21 2006, 11:50
- - jaybeee   Sebi: if you think you can rejoin only pcutmp3 fil...   Jun 21 2006, 18:02
|- - SebastianG   QUOTE (jaybeee @ Jun 21 2006, 19:02) Sebi...   Jun 26 2006, 08:37
- - odyssey   How do I correctly compile pcutmp3 to an executabl...   Jun 23 2006, 07:42
|- - SebastianG   QUOTE (odyssey @ Jun 23 2006, 08:42) How ...   Jun 23 2006, 09:11
- - odyssey   QUOTE (SebastianG @ Jun 23 2006, 00:11) Q...   Jun 23 2006, 10:16
- - jaybeee   Thanks for the reply Sebi. It was just a thought ...   Jun 26 2006, 17:37
- - Hancoque   I found out that pcutmp3 throws an exception if it...   Jul 4 2006, 03:10
|- - dignick   QUOTE (Hancoque @ Jul 4 2006, 03:10) I fo...   Aug 16 2006, 18:53
- - krazy   Thankyou very much for this tool, Sebastian. Does ...   Aug 30 2006, 11:23
- - Skates   The program has worked great, but the non-ID3v2 su...   Sep 26 2006, 02:30
- - Rochey   Hello guys, I am just wondering if anyone has use...   Sep 27 2006, 10:25
- - enigmahi   Sorry, but todays is not my day... Could anyone b...   Dec 15 2006, 12:46
- - enigmahi   Hmm, Codepage Problem on the morning... Here c...   Dec 15 2006, 18:48
- - dekaliber   This might be a dead topic, but I thought I'd ...   Jan 25 2007, 16:33
|- - mixminus1   QUOTE (dekaliber @ Jan 25 2007, 08:33) Th...   Jan 25 2007, 17:47
- - KungFuJesus   I'm no expert on the details of how this progr...   Apr 1 2007, 11:23
|- - Jojo   QUOTE (KungFuJesus @ Apr 1 2007, 03:23) I...   Apr 1 2007, 22:29
|- - Hancoque   QUOTE (Jojo @ Apr 1 2007, 22:29) thanks. ...   Apr 1 2007, 22:45
|- - KungFuJesus   If you have Java installed it should associate its...   Apr 2 2007, 03:02
- - senab   Nice and simply GUI. I actually wrote one just li...   Apr 1 2007, 11:39
|- - j7n   Very useful info about patching Foobar 0.8.3. This...   Apr 1 2007, 16:30
- - senab   I find Jar's load quicker when launched with b...   Apr 2 2007, 08:43
- - cheatz   So i have a .bat file with the code "@java -j...   Jul 30 2007, 11:45
- - Hancoque   Using a batch file doesn't change that it...   Jul 30 2007, 22:42
|- - cheatz   QUOTE (Hancoque @ Jul 30 2007, 15:42) Usi...   Aug 1 2007, 13:52
- - Synthetic Soul   QUOTE (Hancoque @ Jul 30 2007, 22:42) Usi...   Aug 1 2007, 15:38
3 Pages V   1 2 3 >


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th December 2014 - 09:55