Hydrogenaudio Forums

Lossless Audio Compression => FLAC => Topic started by: h2 on 2020-01-06 18:48:41

Title: How to make a FLAC file with time of 0:00:00, ie, no time.
Post by: h2 on 2020-01-06 18:48:41
Is it possible to create a FLAC file that has exactly 0 seconds duration? If so, how do you do it using the flac command line tools?

That is, the goal is to create a placeholder track for any track that has been removed for whatever reason, but where I want to preserve the total track file counts of the recording. It would have to be a true zero seconds duration, since even the smallest time would result in an audible click in for example a live show set when playing back gapless.

I know this is kind of obscure, but with other file formats, say, .txt, you can do 'touch test.txt' and that creates a zero byte file. Obviously, with FLAC, there is metadata overhead, so the actual resulting file would not be 0 bytes.

I'm looking for a more elegant way to remove banned tracks without actually removing the track number itself from the file list in audience recordings for certain file sharing situations. Any thoughts or how-to do it much appreciated.
Title: Re: How to make a FLAC file with time of 0:00:00, ie, no time.
Post by: Apesbrain on 2020-01-06 18:57:33
See attachment.  Audacity > Generate Noise > 00.00.00 > Export as FLAC
Title: Re: How to make a FLAC file with time of 0:00:00, ie, no time.
Post by: h2 on 2020-01-06 19:02:19
Beautiful, thanks. Audacity is good too, not just command line tools, I should have noted that.

While I don't post here much, I really like the high level of competence on hydrogenaudio, it's my go to source for any real audio data format type question.

I can safely say it would never have struck me to use audacity noise generator to create an empty flac file, lol.
Title: Re: How to make a FLAC file with time of 0:00:00, ie, no time.
Post by: polemon on 2020-03-25 00:26:25
Just a quick question though: does the 00:00:00-FLAC contain a single sample, or is there no sample at all?
Title: Re: How to make a FLAC file with time of 0:00:00, ie, no time.
Post by: nu774 on 2020-03-25 10:18:08
Like this:
Quote
flac --no-padding --force-raw-format --endian=little --sign=signed --channels=2 --bps=16 --sample-rate=44100 -o zero.flac - </dev/null
On Windows, just change /dev/null to NUL.

The resulting file contains only metadata blocks.
SimplePortal 1.0.0 RC1 © 2008-2020