How to Export to FLAC with Padding?

Hi.

I just need to add padding to FLAC Exports.
The options in Audacity 2.1.1. do not allow any of that. I already tried to edit a chain in which I export to FLAC, but it does not allow to add parameters either.

If I was using the codec directly, I would only need to add this option: --padding=262144

Is there any way of doing it manually or with a script that might affect exports to FLAC within Audacity?
Any help would be welcome, because this could save me a lot of time! :slight_smile:

Thank you in advance.

See Exporting to an External Program - Audacity Manual.

Gale

Thank you very much Gale.

  1. It did show me a way to export adding padding, using the original flac encoder (v1.3.1).
    However, it now looses all tag information, which is even worse. :frowning:
    I already checked the FLAC documentation and there is nothing to “keep” the tags in the options.
    So this must be done by the app itself, I presume. What I know is that if I export normally, it keeps all the tags, but not if I use the External Program. :frowning:
    Do you know any way of doing this, but keeping all tag information, while exporting through an external application?

  2. However, I got into bigger problems.
    Now, Audacity always uses FLAC v1.0.4, instead of 1.3.1, even for normal flac export!
    I can’t understand why. I never even had that version installed, and the Audacity Libs are all correct, as they were before I tried this. And they were using FLAC 1.3.1.
    The help file you mentioned does not say anything about FLAC either.

I’m using Audacity 2.1.1. portable, on Windows 10 x64.

I guess now I’m in more need for help then when I created this thread… brrrrr :stuck_out_tongue:

Are you padding-with-silence to maintain the alignment of tracks when they are exported separately ? ,
if so see … https://forum.audacityteam.org/t/tracks-not-aligning-once-exported-solved/38383/5

Thank you for your help. I already checked your link.
Unfortunately my situation has nothing to do with Audio itself.
What I’m looking for is a way of Padding for tags, or reserving some space in the file for future tagging (like adding a cover, for instance).
I’m sorry if I wasn’t explicit, but I thought padding was only used to mean reservation of space, in this case for tags. :slight_smile:

Maybe you need a tag-editor programme … https://en.wikipedia.org/wiki/Tag_editor#List_of_tag_editors

If you use the command line flac encoder (https://xiph.org/flac/download.html) then you can use the “-P” switch to reserve space for metadata (https://xiph.org/flac/documentation_tools_flac.html#flac_options_padding).

See also the reply here: https://forum.audacityteam.org/t/how-to-export-to-flac-with-padding/39647/2

Of course there is. See https://xiph.org/flac/documentation_tools_flac.html#flac_options_tag.

So an example command in Audacity would look like this:

"C:\Program Files (x86)\flac-1.3.1-win\win32\flac.exe" - -T "TITLE=Bohemian Rhapsody" -T "ARTIST=Queen" -o "%f"

You can add your “–padding=262144” or “-P 262144” (without quotes) into that syntax.

See here for universally recognised field names (scroll down) http://xiph.org/vorbis/doc/v-comment.html.

It’s a bug in Audacity 2.1.1 http://bugzilla.audacityteam.org/show_bug.cgi?id=1094. Audacity is using 1.3.1 but the FLAC version is wrongly shown as 1.0.4 in the exported file. This bug is now fixed in our source code, so will be fixed in the next 2.1.2 release of Audacity.

I will add a FLAC syntax example for the next Audacity release, but we can’t add syntax for all formats. Command-line users can search the documentation for their encoder if they are unsure of the correct syntax.

If you mean http://portableapps.com/apps/music_video/audacity_portable that is not our product and we should not be helping you with it because we have no idea how they have modified it. Please use Audacity Portable Support for support with Audacity Portable.


Gale

Thank you very very much, Gale!

I already saw all that documentation about FLAC (top to bottom!), and I didn’t find anything to keep (keyword here) what there is there already, which is what I want, because I’m using this on a chain in hundreds of files.
That option you refer only allows to add new tags, but since I’m processing it automatically in a chain, I can’t know that through Audacity in order to pass that info to the external encoder. :frowning:

In fact I’m already padding with the option you mention, as I said on my first post here. But I’m having to do it outside of Audacity - I’m using the FLAC encoder through MusicBee, which allows us to create any command line and pass it to the encoder, while keeping the current tags. So it is possible to do it, but I don’t know how. Perhaps it’s the application itself that is doing it, that’s why I was asking for a method to do it using Audacity.
It would allow me to do all my processing in only one step, instead of at least two. :wink:


That would be appreciated, thank you in advance. :slight_smile:



No I don’t. I really mean the Audacity application. It’s “portable” because I decompress the .exe and overwrite the originals. And it was never installed on this system, because it does not need to. Don’t worry, there’s nothing wrong with this. I took care of personal folders registry and the likes (I’m an IT professional). I just need to copy all the structure of a previous installation, which was done only once. I do this with many apps, and it works well with Audacity and many apps like this. :wink:

All in all, I think I will have to continue doing things the way I currently do it.

  1. Do the audio processing (Trim Silence, Normalise, etc.) with Audacity and export to Wav
  2. Apply WaveGain
  3. Export to FLAC adding padding with MusicBee
  4. Finally, add all the tags with Mp3Tag from the original version, before processing.

Since I foind out that the ReplayGain Plug-in is now automatic, I was willing to givbe it a try.
And if it works the way I need it, I would be be able to do all of this in only one step if I could keep all the tags!
So, that’s why this is important. I could save me a lot of time by automating it to 100%. :slight_smile:
But I can live with it… :frowning:

Anyway, thank you for your brilliant work and help. :slight_smile:

Thank you Steve! Thank you Trebor as well.
I’m already doing what you suggested, as I explained in my previous post.
I’ve put the main workflow (4 steps) at the bottom of my msg so that you can understand my “scenario”.
But thank you for this valuable info anyway.
It will be useful to anyone reading this, that doesn’t now that yet. :wink:

Sorry, I did not understand by “I already tried to edit a chain in which I export to FLAC, but it does not allow to add parameters either” that a Chain was mandatory to what you are doing.

Chains don’t allow modification of metadata when exporting (though if you apply a Chain to files the existing metadata in those files is retained).

And Chains don’t have an “Export (external program)” command.

Yes - http://manual.audacityteam.org/o/man/exporting_to_an_external_program.html does say in a green box

Metadata Editor does not appear before command-line exports, nor are any tags it already contains passed to the external program.


I’m sure it’s possible, but Audacity cannot do it yet. All (external program) could do is read the contents of Metadata Editor. This is a problem for projects containing multiple files because we do not yet have metadata-reading per track. So, Metadata Editor contains metadata only for the last file imported into the project window.

Do you want to “vote” for an enhancement that (external program) reads the contents of Metadata Editor? This still raises issues of how to handle a user adding the same tag with another value than is already present. Vorbis Comments that FLAC uses are OK with multiple instances of a tag with different values, but that may be a problem for other tagging systems.

Do you also want to “vote” for Chains supporting “Export (external program)”?

“Voting” is just a tally we keep that lets the developers know how “popular” requests are. It doesn’t necessarily mean a feature will be implemented.

Steve’s ReplayGain Nyquist plugin can be added to an Audacity Chain (if that is what you mean).

And as I said, a Chain applied to files (not to projects) should retain the current metadata.

So, can you then use metaflac.exe that comes with the Windows FLAC binaries http://downloads.xiph.org/releases/flac/flac-1.3.1-win.zip? You could make a batch script to run metaflac.exe on a list of files or a folder of files.


Gale