lossless trimming?

In the world of image editing (which I know a good deal more about than audio) it is known that you shouldn’t edit-and-save in a lossy format if you can avoid it.

Similarly, Audacity normally works on “raw” data.

However.

I have some data where the “master” data is in mp3 (mp2 actually). The only editing I need to do is trim off the start and end.

In the world of JPEG images, there is a tool than can do this WITHOUT going via a raw stage, and recompressing.

http://jpegclub.org/jpegtran/

Various (simple) edits can be done without additional quantisation loss.

My question - is there anything equivalent for mp3, on Linux?

BugBear

Yes that’s exactly the same for audio.

MP3Split

The command line tool is called mp3splt (if you search in Synaptic, note there is no “i” in the name)
The GUI version is Mp3Splt-gtk

If it’s not in your distribution’s repository you can download it here: mp3, ogg vorbis and FLAC splitter - mp3splt-project

There is also “mp3wrap” which is a command line tool for concatenating MP3s (though I’ve not used this myself).

Aha! mp3splt -A looks useful, allowing me to find and mark the spots with audacity, and then split using the lossless code.

Thank you.

BugBear

I am having practical difficulties, and would appreciate help.

My overall task is to remove pre and post padding from a recording; normally this is around 5 minutes at each end of a 30 minute section.

I have found the user interface tools such that I can:

  • Make a rough selection whilst zoomed out (mouse drag)
  • extend/shrink the selection ([ctrl]-shift-(left/right))
  • play from mouse pointer to selection boundary (b)
  • zoom in and out (ctrl1, ctrl3)

Having got my selection perfect, I can use ctrl-b to make a label, save the label track and (finally) invoke mp3splt.

My problem is that making fine changes at the extremes of a large selection is fiddly and unnatural.

Can anyone recommend a working practice/convention that would allow easier (and less brittle) operation?

My goal is simply (and only) to have a label file with a single labelled zone in it, to feed mp3splt.

BugBear

Is the padding silence or almost so? If so, have you tried Analyze > Sound Finder?


Gale

I’m afraid not.

My eventual solution, given the very simple nature of the
labels file, was to create a perl script, which given a split file
with 1 or more labelled zones in it, stores the START time
of the first zone, and the END time of the last zone.
It then creates a single zone from START to END.

This allows me in Audacity, to label my start point
with a narrow zone starting where I want, and to label
my end point with a narrow zone ending where I want.

I then invoke mp3splt via my perl script to get my
desired net result.

My script also (happens) to work round
some of the in/out filename suffix behaviour of mp3splt
which happened not to be what I wanted.

BugBear

Having got my selection perfect, I can use ctrl-b to make a label, save the label track and (finally) invoke mp3splt.

My problem is that making fine changes at the extremes of a large selection is fiddly and unnatural.

Can anyone recommend a working practice/convention that would allow easier (and less brittle) operation?

My goal is simply (and only) to have a label file with a single labelled zone in it, to feed mp3splt.

Rather late in the day, but it’s worth pointing out that you can drag the handles at the ends of a label to fine-tune it after it’s been created. So you can create a rough selection, put the label in, then tidy up each end in turn. Just remember when adjusting the second end to use the triangular handle so you don’t destroy the first end!

http://manual.audacityteam.org/o/man/label_tracks.html#Moving_and_resizing_a_region_label

This is my way of doing exactly this, or as a variant:

  • find the start,
  • shift-end to select to the end of the file
  • CTRL-B to put label down, put name in
  • Go and tidy up the end of the label by dragging it back (usually much shorter than the length of the item being marked in my case)