IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
Cutting an MP3 gaplessly without re-encoding., I need advice, please.
S3NT13NT_GL1TCH
post Feb 24 2013, 00:07
Post #1





Group: Members
Posts: 7
Joined: 23-February 13
From: U.S.A.
Member No.: 106842



Greetings all!

This is my first forum post here, although I have been a reader for a while now. I ran into a dilemma recently. I purchased an album off of BandCamp that included a bonus track, but the problem is that they made the last track and the bonus track one file rather than splitting the bonus track into it's own separate file. I'm a perfectionist, so naturally I went about trying to find a program that could cut the mp3 into two separate tracks without compromising quality. This was harder than I imagined.

Most programs that claim to split audio files without re-encoding don't actually do it flawlessly. The data isn't encoded in a truly gapless way, and this bothers the hell out of me. I've referred to several old threads here on the board (Which I will link to in a second) and they all seem to recommend a problem called "pcutmp3" which has been dead since 2009:

http://www.hydrogenaudio.org/forums/index....showtopic=62757
http://www.hydrogenaudio.org/forums/index....showtopic=73064

I've tried to run the most recent release (0.98 Beta), but to no avail. I just get an error message that states that "a java exception has occurred". I'm running a PC with Windows 7 Home Premium, 64-bit installed. And as explained in the previous threads, programs like Medieval CUE Splitter and mp3Directcut just don't do the job.

So my question is... Are there any other programs today that are able to do what I need, i.e., splitting an mp3 file into two separate files WITHOUT re-encoding them, AS WELL AS making the resulting files play back gaplessly? Surely in the three years since those threds were posted at least one other program has been developed that can do what pcutmp3 used to do, right?

Any suggestions would be tremendously appreciated.
Go to the top of the page
+Quote Post
db1989
post Feb 24 2013, 00:17
Post #2





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



mp3splt
mp3DirectCut

Oops, you mentioned the latter. Still, those are the ones I know. I concede that I’m not aware of any issues regarding subsequent gaplessness or the lack thereof, so YMMV. Other users may have more specific info for you.

This post has been edited by db1989: Feb 24 2013, 00:19
Go to the top of the page
+Quote Post
mixminus1
post Feb 24 2013, 00:19
Post #3





Group: Members
Posts: 688
Joined: 23-February 05
Member No.: 20097



1) Try an earlier version of pcutmp3. It's been awhile since I've used it, but I also ran into Java errors, and IIRC, one of the earlier versions worked while 0.98 didn't.

2) Be aware that the way pcutmp3 cuts MP3's "gaplessly" is by writing new encoder delay and padding values into the LAME/Xing tag. Those values can often be unusually large, and some players may not be able to cope with them, and that's assuming you're using a player that actually reads those values and implements them in the first place.


--------------------
"Not sure what the question is, but the answer is probably no."
Go to the top of the page
+Quote Post
S3NT13NT_GL1TCH
post Feb 24 2013, 00:47
Post #4





Group: Members
Posts: 7
Joined: 23-February 13
From: U.S.A.
Member No.: 106842



I've tried using the previous version of pcutmp3 and it doesn't work either, unfortunately. I'm a real stickler for preserving audio quality, even when in mp3 form, and I want to be sure that whatever program I use will not degrade the quality of the resulting tracks in any way. If at all possible, I want them to be perfect binary equivalents of the original joined file. Surely, something out there can do this, right?

This post has been edited by db1989: Feb 24 2013, 00:51
Reason for edit: Please don’t quote pointlessly and/or after your reply.
Go to the top of the page
+Quote Post
Cynic
post Feb 24 2013, 02:17
Post #5





Group: Members
Posts: 54
Joined: 6-March 07
Member No.: 41244



Bandcamp require lossless uploads from the artists (though whether they're actually lossless or transcoded depends on the uploader, obviously) and I was under the impression that buyers had lossless download options for every purchase. If so, just pick the FLAC version of the last track, cut it in an audio editor and encode it to MP3 yourself.
Go to the top of the page
+Quote Post
greynol
post Feb 24 2013, 02:52
Post #6





Group: Super Moderator
Posts: 10039
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (S3NT13NT_GL1TCH @ Feb 23 2013, 15:47) *
I'm a real stickler for preserving audio quality, even when in mp3 form, and I want to be sure that whatever program I use will not degrade the quality of the resulting tracks in any way. If at all possible, I want them to be perfect binary equivalents of the original joined file.

It's been a very long time since I played with cutting and reattaching mp3 tracks losslessly and remember there being a lot of different methods over the years. So long as the solution doesn't involve decoding and then re-encoding (none of the solutions offered do this, so not to worry) then there will be no degradation in quality. Non-gapless cutting merely adds a very tiny fraction of a second of silence and fail to provide your media player information about how to connect the tracks seamlessly upon playback (assuming it would otherwise be able to do so). If the cut is performed over a transition that is already silent then this is a non-issue.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
mjb2006
post Feb 24 2013, 02:55
Post #7





Group: Members
Posts: 829
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



pcutmp3 0.97.1 is working OK for me in Win7 64-bit with 64-bit Java 1.7.0_15.

When you cut an MP3 with any of the regular cutters (not pcutmp3), or if you use the never-fully-implemented --nogap options in LAME (cutting at encode time), you're rendering a small number of samples on either side of the cut point unreachable and/or improperly decodable, because every frame partially depends on adjacent frames.

This imposes playback requirements that currently almost zero players implement: reassembling the files beforehand (obviously requires some knowledge of what files belong together), or at least not resetting the decoder in between files, and reading the very end/beginning of adjacent files or dummy data in order to reach and properly decode the samples on each side of the cut points.

pcutmp3 fudges the MP3s a bit to attach part of the adjacent files to the current one and then tag the whole thing with gapless playback info that is widely supported, and that's as good as it gets. I hope you can get it working.

The people who make MP3 decoders and players are just not very interested in supporting what you really want, at least not without patches and test cases and some serious thought, and that's only for those that are open source.

This post has been edited by mjb2006: Feb 24 2013, 02:57
Go to the top of the page
+Quote Post
S3NT13NT_GL1TCH
post Feb 24 2013, 03:03
Post #8





Group: Members
Posts: 7
Joined: 23-February 13
From: U.S.A.
Member No.: 106842



@Cynic: That's true. In fact, that was what I actually tried that first. However, taking the FLAC version of the album, splitting the last track, and then converting the resulting files to mp3 results in the (slight) loss of audio quality when compared to the waveform of the MP3's that BandCamp provides. Hence, why I attempted a different solution.

@Greynol: You are indeed correct. I used the program "mp3splt" from command line and though it took some time to figure out, it worked perfectly. I used Audacity to compare the waveform and the difference is nonexistent. I also used your earlier suggestion (from your PM) of using mp3DirectCut, but the result was a file that had an audible hiccup about two seconds into each track. I think I can safely say this issue has been resolved satisfactorily.

This post has been edited by S3NT13NT_GL1TCH: Feb 24 2013, 03:05
Go to the top of the page
+Quote Post
Porcus
post Feb 24 2013, 03:27
Post #9





Group: Members
Posts: 1910
Joined: 30-November 06
Member No.: 38207



QUOTE (S3NT13NT_GL1TCH @ Feb 24 2013, 03:03) *
However, taking the FLAC version of the album, splitting the last track, and then converting the resulting files to mp3 results in the (slight) loss of audio quality when compared to the waveform of the MP3's that BandCamp provides.


Does this mean you evaluate the audio quality by eye ...?


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
greynol
post Feb 24 2013, 03:36
Post #10





Group: Super Moderator
Posts: 10039
Joined: 1-April 04
From: San Francisco
Member No.: 13167



I have no idea which encoder and what settings bandcamp uses, but in general, encoding to whatever you want from lossless is definitely the preferred route.

This post has been edited by greynol: Feb 24 2013, 03:36


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
S3NT13NT_GL1TCH
post Feb 24 2013, 18:39
Post #11





Group: Members
Posts: 7
Joined: 23-February 13
From: U.S.A.
Member No.: 106842



@Porcus: Yes, indeed. That's always my preferred method. I always try to look at the waveform as well as the spectrograph to analyze track quality. The human ear is fallible, but you can easily compare two different tracks visually to see if they differ. I do listening tests before and after as well though, if that's what you're getting at.

@Greynol: So you're suggesting that my best option would have been instead to have used the FLAC copy, split the last track of that version using CueTools, then convert all the files to mp3? As opposed to just splitting one mp3?
Go to the top of the page
+Quote Post
greynol
post Feb 24 2013, 18:48
Post #12





Group: Super Moderator
Posts: 10039
Joined: 1-April 04
From: San Francisco
Member No.: 13167



Yes, that is what I'm suggesting.

I would also advise that you re-evaluate your position on the sighted evaluation of perceptual encoders. There are plenty of existing discussions about why already. This or just accept that it is simply not allowed here. smile.gif


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
S3NT13NT_GL1TCH
post Feb 25 2013, 03:36
Post #13





Group: Members
Posts: 7
Joined: 23-February 13
From: U.S.A.
Member No.: 106842



@Greynol: Fair enough. Perhaps you could link to one of the relevant threads on the issue, though? I'd like to read an explanation of why exactly that is. If not, no matter. I'll just take your word on it.

This post has been edited by S3NT13NT_GL1TCH: Feb 25 2013, 03:38
Go to the top of the page
+Quote Post
greynol
post Feb 25 2013, 04:30
Post #14





Group: Super Moderator
Posts: 10039
Joined: 1-April 04
From: San Francisco
Member No.: 13167



Here's an example that might get the ball rolling:
http://www.hydrogenaudio.org/forums/index....showtopic=54707


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
testyou
post Feb 25 2013, 19:26
Post #15





Group: Members
Posts: 99
Joined: 24-September 10
Member No.: 84113



mp3splt has a gui.
Go to the top of the page
+Quote Post
db1989
post Feb 25 2013, 23:58
Post #16





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



The OP omitted to respond to my previous post containing a recommendation of that program, but maybe itíll register this time.
Go to the top of the page
+Quote Post
2Bdecided
post Feb 26 2013, 11:03
Post #17


ReplayGain developer


Group: Developer
Posts: 5176
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



I don't think they're gapless in the way that pcutmp3 is gapless. Aren't they restricted to whole frames?

pcutmp3 manages to be gapless and glitchless in a way that no encode-per-track lossy encoder (even the so called natively gapless ones) can be (unless they overcode start and end frames to be near-lossless and/or mirror/duplicate the audio around the track split point to give the encoder a longer clean frame, which doesn't always work).

Is there anything comparable with pcutmp3 available for other lossy codecs? (I'm only asking out of interest.)

Cheers,
David.

This post has been edited by 2Bdecided: Feb 26 2013, 11:06
Go to the top of the page
+Quote Post
db1989
post Feb 26 2013, 14:41
Post #18





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



mp3splt does the same thing for Vorbis, too. I donít know whether lossless cutting is possible for AAC.
Go to the top of the page
+Quote Post
greynol
post Feb 26 2013, 16:01
Post #19





Group: Super Moderator
Posts: 10039
Joined: 1-April 04
From: San Francisco
Member No.: 13167



Wait, mp3split is gapless (and glitchless)?

To this idea of using pcut over encoding tracks individually because it is glitchless, I suppose you need to take into account player compatibility. IIRC, we're talking about having to skip over ~10x as many samples.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
2Bdecided
post Feb 26 2013, 17:33
Post #20


ReplayGain developer


Group: Developer
Posts: 5176
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



Gapless/glitchless mp3 decoding has patchy player support anyway. sad.gif

I guess if you were targeting least bad performance on most possible players (rather than perfect performance on a few players) your choice would be different.

The whole thing just makes me use (lossy)FLAC. Even then, player support isn't great, but I know I can't do any better (other than encode gapless albums as single tracks).

Cheers,
David.
Go to the top of the page
+Quote Post
mjb2006
post Feb 27 2013, 00:00
Post #21





Group: Members
Posts: 829
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



All the MP3 splitters cut on frame boundaries. pcutmp3 is the only one that overlaps (includes extra frames on either side of split points) and then rewrites the LAME tags with correct delay & padding values.

mp3splt doesn't do anything fancy; it's not gapless/glitchless. It splits as close to the desired point as possible, but doesn't rewrite LAME tags. Instead, it just copies the original file's LAME tag into every output file, so the delay & padding values are never both correct. That is, the delay is only correct in the first file, and the padding is only correct in the last file.

Ideally, the padding value would be changed to 0 in all but the last file, and the delay value would be changed to 0 in all but the first file. But then you run into the problem that basically no players support padding values that are less than the decoder delay (529), hence the advantage of pcutmp3's method (though apparently there's some issue with padding values being too big?) ... it at least works in some players, and should be seamless despite the decoder reset between files.
Go to the top of the page
+Quote Post
S3NT13NT_GL1TCH
post Feb 27 2013, 00:00
Post #22





Group: Members
Posts: 7
Joined: 23-February 13
From: U.S.A.
Member No.: 106842



That was exactly what I was getting at. Maybe I worded it poorly in my OP, but a lot of people seemed to miss my point on that. To add emphasis, Mp3splt worked well enough but it wasn't actually what I was looking for.

This post has been edited by db1989: Feb 27 2013, 10:27
Reason for edit: as in post #4
Go to the top of the page
+Quote Post
greynol
post Feb 27 2013, 01:11
Post #23





Group: Super Moderator
Posts: 10039
Joined: 1-April 04
From: San Francisco
Member No.: 13167



If the cut was performed over a period of silence between the end of the last track and the beginning of the bonus track then any splitting program should be good enough. I've never seen bonus content pinned to the end of the last track that wasn't preceded by silence.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
crazyman
post Mar 8 2013, 20:48
Post #24





Group: Members
Posts: 92
Joined: 9-July 04
Member No.: 15216



How about mptrim? You can first delete part 1 and then part 2 from the original file.
Go to the top of the page
+Quote Post
mjb2006
post Mar 8 2013, 22:58
Post #25





Group: Members
Posts: 829
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (crazyman @ Mar 8 2013, 12:48) *
How about mptrim?

The OP asked about editors that produce MP3s that play back "gaplessly"—i.e., with no risk of an audible seam where the edit was made. As I mentioned, only pcutmp3 satisfies this requirement. mptrim does not. (And as Greynol mentioned, if you're cutting in the middle of silence, it doesn't need to be gapless.)

This post has been edited by mjb2006: Mar 8 2013, 22:58
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
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: 22nd October 2014 - 17:42