"Lossless" in the context of WAV and MP3 files

I have a choice of recording in WAV or in MP3 format. The target product is to be MP3, but my last step can be exporting a WAV file in MP3 format, and I understand that this might include some loss of quality. For that reason I have switched to WAV recording/editing, whereas in the past I was MP3 recording/editing.

If now I have to go back and edit some historic MP3 tracks, it seems to me that if I repeatedly edit in MP3 I will suffer further degradation.
But if I open the MP3 track and immediately save it as WAV, and continue editing in WAV from now on, continued editing will preserve fidelity at the point of the latest MP3 edit.

That is, I have to live with the accumulated degradation up to the point I switch to WAV, but after that, there will be only one more degradation, ever, and that will occur each time I finish my WAV editing session and export to MP3.

Is my reasoning correct?

For those of us who have been (ignorantly) operating in MP3, switching to WAV arrests degradation at its most recent point?
Thanks
Chris

There are free audio editors which can losslessly edit MP3, e.g. … mp3DirectCut - Wikipedia

Yes, if you save as 32-bit PCM WAV, (or save as an Audacity project).

Correct!

When you open an MP3 in a regular audio editor for editing it gets decompressed. If you re-export as MP3 you are going through another generation of lossy compression and some “damage” does accumulate. You may not hear any quality loss but it’s something you should be aware of.

Ideally, you should compress ONCE as the last step and otherwise try to minimize the number of times it’s compressed.


switching to WAV arrests degradation at its most recent point?

Right… Data is thrown-away during compression (obviously to make the file smaller). There is no further damage when it’s decompressed and it gets decompressed when you play it anyway.

There’s no “philosophical” need to throw-away more information when it’s re-compressed so the accumulated damage is some kind of side-effect. AAC is immune to accumulated damage but of course lossy-to-lossy conversion isn’t ideal either and I don’t know if it’s better to convert from MP3 to AAC, or to go through another cycle of MP3 compression.

[u]Nine different codecs 100-pass recompression test[/u]

I’m not sure that I totally agree with their conclusions, but you can test for yourself with this Nyquist script:

;type tool
;control fmt "Format" choice "MP3,WAV,OGG,M4A" 0
;control dir "Path to file directory" string "" "/home/steve/Desktop/"
;control input "Original test file" string "" "mytest.wav"
;control norm "Normalize before Export" choice "Yes,No" 1
;control repeats "Repeated imports/exports" int "" 100 1 1000

(setf ext (case fmt (0 ".mp3")
                    (1 ".wav")
                    (2 ".ogg")
                    (3 ".m4a")))

(setf original (strcat dir input))

(setf normcmd "Normalize: ApplyGain=1 PeakLevel=\"-2\" RemoveDcOffset=1 StereoIndependent=0")

(setf cmd (format nil "Import2: Filename=~s" original))
(aud-do cmd)

(setf temp (strcat dir "test-format" ext))
(setf excmd (format nil "Export2: Filename=~s" temp))
(setf imcmd (format nil "Import2: Filename=~s" temp))

(dotimes (i 100 (format nil "Repeated ~s export ~a times." ext repeats))
  (aud-do "SelectAll:")
  (when (= norm 0)
    (aud-do normcmd))
  (aud-do excmd)
  (aud-do "RemoveTracks:")
  (aud-do imcmd))

Note that the encoder settings are whatever you used last - so if you want to export as 320kbps MP3, export a dummy file as 320 kbps MP3 before running the test.

The script should be run in an empty Audacity project.

Tip: Use a small, high quality input file.
Tip: Modify “Path to file directory” to a folder containing the input file.
Tip: Test with a few repeats first to check that your settings are correct. (100+ repeats will take a while to run).

OK. But this is absolutely unavoidable for folks who create, and who download to listen via MP3 format. That is, if I download a LibriVox audiobook, available only in [44100 Hz; 16 bit; 128 kbps; mono and so on], then I get to hear what is offered, and if WinAmp or whatever has to unbundle the MP3 file so that soundwaves can emit from my speakers, then that is what it is. We can’t change that, can we?

If you re-export as MP3 you are going through another generation of lossy compression and some “damage” does accumulate. You may not hear any quality loss but it’s something you should be aware of.

Folks listen to LibriVox audiobooks on the train, bus-with-passengers, on the bike and so on, so again, clarity is jeopardized at every step when listening to a LibriVox MP3, over and above whatever the player (“decompressor”) does. We can’t change that, can we?

As newcomer to LibriVox and Audacity I am restricting myself to a narrow window of recording and editing choice - WAV or MP3 - and audiobooks recorded by amateurs like me. Hence on my discovery of WAV vs. MP3 less than a week ago, I have elected to be “better than I was” and record and edit in WAV, and use MP3 only when exporting my audio files to the nice folks at LibriVox, so I think that the way I record and edit today (WAV) is better than it was when i was recording and editing in MP3. I recognize that it might not be ideal, only that it is an improvement.


Ideally, you should compress ONCE as the last step and otherwise try to minimize the number of times it’s compressed.

Good. This is how I operate today. The re-assurance helps me.

There’s no “philosophical” need to throw-away more information when it’s re-compressed so the accumulated damage is some kind of side-effect. AAC is immune to accumulated damage but of course lossy-to-lossy conversion isn’t ideal either and I don’t know if it’s better to convert from MP3 to AAC, or to go through another cycle of MP3 compression.> [u]Nine different codecs 100-pass recompression test[/u]

And with that I am way out of my depth!
I read the link (the sample file links seem to be broken, but at 75 years of age my ears probably wouldn’t detect the difference anyway).
I gather that AAC is superb and I see people using FLAC. If those options were available in Audacity (Audacity 3.1.3 File, Export, shows me only WAV/MP3/OGG) then I might use them.

In the end it seems to boil down to two issues.
(1) If WAV or OGG shows a distinct and human-detectable improvement over MP3 I should work in either WAV or OGG
(2) It seems to me that most LibriVox recorders are strapped for time, and I know from experience that that usually means “we will choose one method and stick with it; we have to get the job done”.

I am documenting my Audacity/macro techniques, and if I can recommend WAV over MP3 AND can show that it makes a difference, I think, “Why not mention it, in case someone pays attention?”

Thanks again, Doug. I appreciate your feedback.
Chris

Thanks Trebor
My feeling is that about 70% of LibriVox members use Audacity, as do I. We face inertia here, people who are focused on Recording and Editing are loath to change horses in mid-stream.
For me right now I think I have to stick to Audacity otherwise my recording schedule would slip. (I have bookmarked your suggestion, and/but some sort of macro/script/programming capability is important to me in any application)

[quote=“, post:1, topic:64103”]
… if I open the MP3 track and immediately save it as WAV, and continue editing in WAV from now on, continued editing will preserve fidelity at the point of the latest MP3 edit …
[/quote]

Yes, if you save as 32-bit PCM WAV, (or save as an Audacity project).

Thank you for the re-assurance. I feel better for improving my quality of recording.
Cheers
Chris