View Full Version : [Solved @ Post #12] Non-destructive GUI/CLI FLAC Editing solution
samuelal
28th June 2015, 21:59
Hello,
Could someone please recommend me with a (preferably, GUI-based) non-destructive FLAC Editing solution?
Something similar like MP3DirectCut (http://mpesch3.de1.cc/mp3dc.html) (which currently doesn't support FLAC files) would be awesome!
I'm basically looking to trim/cut out certain audio parts within FLAC files without incurring any quality penalties while doing so.
Regards,
//subscribed.
sneaker_ger
29th June 2015, 00:00
Since FLAC is a lossless codec you can simply decode to wave, then edit in your wave editor of choice and at the end encode to FLAC again without any quality loss (in the parts you didn't edit). Audacity (http://audacityteam.org/) is an example of a freeware wave editor (which also happens to support direct FLAC input and output).
Ghitulescu
29th June 2015, 11:48
foobar may employ special DSPs if plugins available - surely it depends what EDIT does mean to you :)
Groucho2004
29th June 2015, 12:12
foobar may employ special DSPs if plugins available - surely it depends what EDIT does mean to you :)
Which part of "I'm basically looking to trim/cut out certain audio parts" is inexplicit to you? :rolleyes:
Groucho2004
29th June 2015, 12:21
I second sneaker's suggestion to extract the PCM data and use a proper audio editor.
When you simply cut out some parts, the transitions at these points can be very abrupt and cause nasty spikes in the signal. A decent editor can insert soft transitions, for example a fade in/out of a few milliseconds.
Ghitulescu
29th June 2015, 14:00
Which part of "I'm basically looking to trim/cut out certain audio parts" is inexplicit to you? :rolleyes:
Basically means this in principal but not exclusively :)
I second the idea of decompressing the FLACs and doing any editing you want in PCM then repack them back into FLAC.
samuelal
30th June 2015, 02:25
Hello again,
As sneaker_ger suggested (thank you), I went on to do the trims/cuts in Audacity:
I've loaded the FLAC file, performed the tim/cut and simply saved it in FLAC form again without using an intermediate WAV file based on the assumption there's no need for one since Audacity already creates some sort of raw file when I first load the FLAC file.
Correct me if I'm wrong please.
Question please:
Have I made the wrong choice foregoing Audacity's built-in Dithering mechanism, like so (http://i.imgur.com/SFtD2PY.png)?
BTW: Yes, I was asking about performing only cuts/trims to the audio files, no other processing. In that regard I'd like to thank you, Groucho2004, for the tip outlined here:
When you simply cut out some parts, the transitions at these points can be very abrupt and cause nasty spikes in the signal. A decent editor can insert soft transitions, for example a fade in/out of a few milliseconds.
I'm indeed familiar with this exact issue from when I'm performing trims/cuts to MP3 files via MP3DirectCut.
Groucho2004
30th June 2015, 09:21
I've loaded the FLAC file, performed the tim/cut and simply saved it in FLAC form again without using an intermediate WAV file based on the assumption there's no need for one since Audacity already creates some sort of raw file when I first load the FLAC file.
Correct me if I'm wrong please.
I vaguely remember that Audacity converts to 32 bit float to do its internal editing/processing. If that is true, the process is not lossless any more.
Someone who knows Audacity better than I will hopefully chip in.
sneaker_ger
30th June 2015, 10:05
It can import 16bit, 24bit or float. You can see the setting in the screenshot in post #7.
And for some reason it seems like you have indeed to disable dithering for it to be 100% lossless which does not make sense but whatever. So for simple cutting best way seems to analyze flac file with MediaInfo, then set import sample rate and bitdepth to the same values as flac, turn dither off and then import, do the editing and export with same FLAC bitdepth. But for filtering maybe float import (and dithering) is better. :confused:
raffriff42
30th June 2015, 14:36
If I'm reading it right, dither only happens when doing a conversion. Set default import quality to the same as your source format so that conversion will not be needed.
If conversion is needed, dither is definitely a good thing.
http://manual.audacityteam.org/o/man/importing_audio.html
Audacity always imports files at their original sample rate...
...
Generally, Audacity imports files at the sample format (bit depth) specified at Default Sample Format in Quality Preferences... Even if you choose a lower Default Sample Format... Audacity will never downconvert a file that has a higher bit depth...
http://manual.audacityteam.org/o/man/quality_preferences.html
The Dither options are different methods of adding random low-level noise to mask clicky rounding distortions when converting to a lower bit depth...
Default Sample Format... affects both imported and newly recorded material, either in a new or existing project
samuelal
30th June 2015, 14:57
And for some reason it seems like you have indeed to disable dithering for it to be 100% lossless which does not make sense but whatever.
So for simple cutting best way seems to analyze flac file with MediaInfo, then set import sample rate and bitdepth to the same values as flac, turn dither off and then import, do the editing and export with same FLAC bitdepth. But for filtering maybe float import (and dithering) is better. :confused:
+
If I'm reading it right, dither only happens when doing a conversion.
Set default import quality to the same as your source format so that conversion will not be needed.
If conversion is needed, dither is definitely a good thing.
Yeah, I think this is what I've observed here as well.
sneaker_ger
30th June 2015, 15:14
Seems to be intentional by developers:
"Dither" is intentional noise which is added so as to randomise the quantisation errors (rounding errors) that occur when downsampling the Bit Depth of an audio stream to a lower resolution than the current format.
[...]
Downsampling also occurs in a 16-bit or 24-bit project every time you edit a section of audio (thus writing to the project's audio data), because Audacity temporarily converts the samples to 32-bit float format before downsampling back to the current format. Conversely, dithering will never be applied within a 32-bit float project because no downsampling occurs. Also, the precision of float samples is good enough to justify not applying dither.
[...]
Here's the exception to the rule: If you have recorded in 16-bit and are only doing simple editing (cut, delete, paste, trim...) and not doing any processing (amplify, equalize, frequency filter....) then for highest accuracy dither can be set to "none". In this case, because there are no 32-bit operations prior to export there is no benefit to using dither. Exporting a 16-bit track to 16-bit with dither set to "none" will be lossless. The same applies if exporting from a 24-bit track to an uncompressed 24-bit file format with dither disabled.
http://wiki.audacityteam.org/wiki/Dither
samuelal
30th June 2015, 15:39
Seems to be intentional by developers:
http://wiki.audacityteam.org/wiki/Dither
Splendid. Thank you.
sneaker_ger
30th June 2015, 16:04
It's not 100% relevant since we want to do editing but the dither is applied even without any editing which confused me quite a bit. It seems to be a known bug:
http://forum.audacityteam.org/viewtopic.php?f=46&t=85983
http://bugzilla.audacityteam.org/show_bug.cgi?id=22
http://forum.audacityteam.org/viewtopic.php?f=28&t=64128
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.