[Flac-dev] Flac File Size

Josh Coalson xflac at yahoo.com
Mon Jun 26 11:18:23 PDT 2006


--- Alper ASMA <alperasma at msn.com> wrote:
> Hi,
>  
> I have a big flac file, i can divide this flac file into chunks by
> visual basic code, i can add header to these chunks by copying first
> 1K to other chunks, but chunks can not play properly, i think i need
> to change filesize from file headers of these chunks, i can read
> samplerate and samples count from header, but i do not know how can i
> calculate file size without reading all file, what must i change from
> these chunks too?  I want to play each chunks themself,
> I read http://flac.sourceforge.net/format.html but i can not
> understand how can i change header for each chunk

to do this correctly you have to split at frame boundaries.  you
also have to copy the metadata section, which is not necessarily
the first 1K.

once that is correct you should be able to run a decoder to scan
through the chunks and recalculate the sizes.

native FLAC is not really suited for editing like this.  if you
are doing it a lot you should probably use ogg flac or matroska.

Josh


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Flac-dev mailing list