[Flac] Re: FLAC: re-encode

Josh Coalson xflac at yahoo.com
Tue Apr 10 15:46:49 PDT 2007


ah, yes, it is written to a temp file in the same dir and then
renamed on top of the old one only once everything has completed
successfully, so you should never be left with a bad re-encode
and no original.

if the rename fails, both the original will and the temp file
will still exist.

Josh

--- Brian Willoughby <brianw at sounds.wa.com> wrote:

> Hi,
> 
> I meant that it seems problematic to write an updated file to itself,
> because the operation could erase the data before it is read.  Unless
> you read the entire file first, or write to a temporary file which is
> then renamed.  I deal with FLAC files that are over a gigabyte,  
> meaning that this could easily exceed normal buffers.
> 
> Just curious.  I guess I could go test it myself... or look in the  
> source...
> 
> Brian
> 
> 
> On Apr 10, 2007, at 10:50, Josh Coalson wrote:
> 
> with or without -f, flac doesn't check if the file gets bigger;
> the user might have specified more metadata/padding or just want
> to use the newer encoder because of some feature.
> 
> Josh
> 
> --- Brian Willoughby <brianw at sounds.wa.com> wrote:
> 
> > Hmm, what if the FLAC options produce a larger file on output than
> > input?  Would -f (force) cause the whole process to fail as soon as
> > the output exceeded the input?
> >
> > Brian
> >
> >
> > On Apr 9, 2007, at 17:01, Josh Coalson wrote:
> >
> > --- Harry Sack <tranzedude at gmail.com> wrote:
> >> is it possible to re-encode an existing FLAC file by using the
> FLAC
> >> file itself as input to the encoder like this: flac -V --best
> >> inputfile.flac OR do you have decode it to WAV first?
> >
> > yes you can re-encode from FLAC.  that command works but if you
> want
> > it to go back to the same file you have to add the -f (force)
> option.
> >
> > http://flac.sourceforge.net/documentation_tools_flac.html
> 
> 



       
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front


More information about the Flac mailing list