pcutmp3 tool, properly/perfect cut mp3 |
![]() ![]() |
pcutmp3 tool, properly/perfect cut mp3 |
Aug 3 2007, 13:57
Post
#101
|
|
|
Group: Members Posts: 39 Joined: 20-April 06 Member No.: 29800 |
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? This post has been edited by cheatz: Aug 3 2007, 13:58 |
|
|
|
Sep 27 2007, 14:33
Post
#102
|
|
![]() Group: Developer Posts: 1317 Joined: 20-March 04 From: Göttingen (DE) Member No.: 12875 |
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 |
|
|
|
May 30 2008, 21:25
Post
#103
|
|
![]() Group: Members Posts: 247 Joined: 4-August 05 From: Birmingham, UK Member No.: 23690 |
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 library, which is really good and licensed under the LGPL. Changes
Download I've packaged pcutmp3 in two ways:
This post has been edited by senab: May 30 2008, 21:42 -------------------- ::.. www.senab.co.uk
|
|
|
|
May 31 2008, 10:27
Post
#104
|
|
![]() Group: Developer Posts: 1317 Joined: 20-March 04 From: Göttingen (DE) Member No.: 12875 |
Nice! Good timing, too because my university homepage doesn't exist anymore.
Thanks for the effort. Cheers, SG |
|
|
|
May 31 2008, 11:35
Post
#105
|
|
![]() Group: Members Posts: 247 Joined: 4-August 05 From: Birmingham, UK Member No.: 23690 |
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 This post has been edited by senab: May 31 2008, 11:36 -------------------- ::.. www.senab.co.uk
|
|
|
|
Jun 1 2008, 08:50
Post
#106
|
|
|
Group: Members Posts: 67 Joined: 6-September 05 Member No.: 24363 |
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. |
|
|
|
Jun 1 2008, 15:48
Post
#107
|
|
![]() Group: Members Posts: 118 Joined: 10-May 03 Member No.: 6509 |
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. This post has been edited by mezenga: Jun 1 2008, 16:03 |
|
|
|
Jun 1 2008, 17:07
Post
#108
|
|
![]() Group: Members Posts: 410 Joined: 20-October 04 From: UK Member No.: 17750 |
Nice! Good timing, too because my university homepage doesn't exist anymore. If anyone still wants Sebi's last version of pcutmp3, then you can grab it from here: pcutmp3 v0.95b
Thanks for the effort. Cheers, SG -------------------- http://www.health4ni.com/
|
|
|
|
Jun 1 2008, 18:06
Post
#109
|
|
![]() Group: Members Posts: 176 Joined: 15-October 02 From: Camelot Member No.: 3550 |
|
|
|
|
Jun 1 2008, 18:37
Post
#110
|
|
|
Group: Members Posts: 67 Joined: 6-September 05 Member No.: 24363 |
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. This post has been edited by jetpower: Jun 1 2008, 18:41 |
|
|
|
Jun 1 2008, 21:10
Post
#111
|
|
![]() Group: Members Posts: 410 Joined: 20-October 04 From: UK Member No.: 17750 |
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.
-------------------- http://www.health4ni.com/
|
|
|
|
Jun 2 2008, 10:40
Post
#112
|
|
![]() Group: Members Posts: 247 Joined: 4-August 05 From: Birmingham, UK Member No.: 23690 |
[...] 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 --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. This post has been edited by senab: Jun 2 2008, 13:59 -------------------- ::.. www.senab.co.uk
|
|
|
|
Jun 2 2008, 17:36
Post
#113
|
|
|
Group: Members Posts: 67 Joined: 6-September 05 Member No.: 24363 |
QUOTE I'm thinking of implementing it with: CODE --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. |
|
|
|
Jun 3 2008, 05:18
Post
#114
|
|
![]() Group: Members Posts: 118 Joined: 10-May 03 Member No.: 6509 |
Well the idea is certainly good for me. Can you give an example of this spreadsheet you mentioned? CODE ;;file;x;.mp3;;; 1) Paste this text in notepad and save with ".csv" extension.;;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);; 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 would be a better place for this feature (IMO).
|
|
|
|
Jun 3 2008, 13:34
Post
#115
|
|
|
Group: Members Posts: 67 Joined: 6-September 05 Member No.: 24363 |
CODE ;;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 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:) This post has been edited by jetpower: Jun 3 2008, 13:36 |
|
|
|
Jun 3 2008, 14:25
Post
#116
|
|
![]() Group: Members Posts: 247 Joined: 4-August 05 From: Birmingham, UK Member No.: 23690 |
Again, pcutmp3 GUI 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. -------------------- ::.. www.senab.co.uk
|
|
|
|
Jun 4 2008, 13:14
Post
#117
|
|
![]() Group: Developer Posts: 1317 Joined: 20-March 04 From: Göttingen (DE) Member No.: 12875 |
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 This post has been edited by SebastianG: Jun 4 2008, 13:14 |
|
|
|
Jun 5 2008, 04:27
Post
#118
|
|
![]() Group: Members Posts: 118 Joined: 10-May 03 Member No.: 6509 |
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.
|
|
|
|
Nov 16 2008, 05:34
Post
#119
|
|
|
Group: Members Posts: 2 Joined: 15-November 08 Member No.: 62491 |
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 library, which is really good and licensed under the LGPL. Changes
I've packaged pcutmp3 in two ways:
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 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 $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 |
|
|
|
Nov 23 2008, 00:08
Post
#120
|
|
![]() Group: Members Posts: 247 Joined: 4-August 05 From: Birmingham, UK Member No.: 23690 |
@Peddy: I'm going to look at this, this week
-------------------- ::.. www.senab.co.uk
|
|
|
|
Dec 2 2008, 19:38
Post
#121
|
|
|
Group: Members Posts: 4 Joined: 2-December 08 Member No.: 63693 |
@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? |
|
|
|
Dec 4 2008, 22:57
Post
#122
|
|
![]() Group: Members Posts: 247 Joined: 4-August 05 From: Birmingham, UK Member No.: 23690 |
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. 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 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 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). -------------------- ::.. www.senab.co.uk
|
|
|
|
Dec 4 2008, 23:45
Post
#123
|
|
|
Group: Members Posts: 4 Joined: 2-December 08 Member No.: 63693 |
[size=3]@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 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! |
|
|
|
Dec 5 2008, 18:28
Post
#124
|
|
|
Group: Members Posts: 4 Joined: 2-December 08 Member No.: 63693 |
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.
|
|
|
|
Dec 5 2008, 20:48
Post
#125
|
|
|
Group: Members Posts: 4 Joined: 2-December 08 Member No.: 63693 |
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 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 26th May 2013 - 09:06 |