HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: useiee on 2009-05-17 12:16:11

Title: How to encode WAV to FLAC
Post by: useiee on 2009-05-17 12:16:11
I am interesting in the course of FLAC encoding. I wonder how to specify the wav's frames and the corresponding flac's frame. I encounter a little trouble while reading the introduction of FLAC format.
Thank u for helping me!
Ur replies will all do me a favor:)
Title: How to encode WAV to FLAC
Post by: quadamage on 2009-05-17 15:02:35
Foobar2k will do the job for you.
Title: How to encode WAV to FLAC
Post by: ktf on 2009-05-17 19:11:26
I wonder how to specify the wav's frames and the corresponding flac's frame.


What do you mean with that? Do you want to write FLAC files by hand? :S Anyway, transcoding from WAV to FLAC goes fine with the flac commandline utility, for Windows you can search for FLAC Frontend.
Title: How to encode WAV to FLAC
Post by: Nick.C on 2009-05-17 19:31:12
WAV files have no frames per se. PCM contained in a RIFF WAV container is a stream of interleaved samples, the interleave corresponding to the number of channels in the content.
Title: How to encode WAV to FLAC
Post by: useiee on 2009-05-18 03:34:17
I wonder how to specify the wav's frames and the corresponding flac's frame.


What do you mean with that? Do you want to write FLAC files by hand? :S Anyway, transcoding from WAV to FLAC goes fine with the flac commandline utility, for Windows you can search for FLAC Frontend.


coz i've been trying to encode the WAV myself in some other language while there is FLAC's source code written in C/C++. i am doing a big task and it's more difficult than i imagine..... wish somebody help me..
Title: How to encode WAV to FLAC
Post by: useiee on 2009-05-18 04:00:04
WAV files have no frames per se. PCM contained in a RIFF WAV container is a stream of interleaved samples, the interleave corresponding to the number of channels in the content.


woow met a master!  Thank u for reminding me that!
When i use an IDE to read the wav file in binarycode-mode, i found the return is an N*1 array and all of them is data. It made me guess there is no signal of bit to indicate the begining or end of each sample. So how to identify WAV file sample by sample?
Another question is that i dont know what's the corresponding relationship between a WAV file's block and a FLAC file's frame. That is to say, how does transcoding specify its frame length? defined by me, or, the FLAC's work has done this?
Thank u so much !
Title: How to encode WAV to FLAC
Post by: Nick.C on 2009-05-18 09:35:38
There's a good explanation of the RIFF:WAVE format here (http://www.sonicspot.com/guide/wavefiles.html) it helped me a lot when I was learning about WAV files. Once you understand the various chunks then you will be able to determine where the samples are.
Title: How to encode WAV to FLAC
Post by: useiee on 2009-05-19 17:55:27
There's a good explanation of the RIFF:WAVE format here (http://www.sonicspot.com/guide/wavefiles.html) it helped me a lot when I was learning about WAV files. Once you understand the various chunks then you will be able to determine where the samples are.


Many THX! benefit a lot))