Skip to main content

Topic: How to encode WAV to FLAC (Read 4191 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • useiee
  • [*]
How to encode WAV to FLAC
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:)
All my will

  • quadamage
  • [*]
How to encode WAV to FLAC
Reply #1
Foobar2k will do the job for you.

  • ktf
  • [*][*][*][*][*]
How to encode WAV to FLAC
Reply #2
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.
Music: sounds arranged such that they construct feelings.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
How to encode WAV to FLAC
Reply #3
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.
lossyWAV -q X -a 4 -s h -A --feedback 1| FLAC -5 -e -p -b 512 -P=4096 -S- ~= 320kbps

  • useiee
  • [*]
How to encode WAV to FLAC
Reply #4
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..
All my will

  • useiee
  • [*]
How to encode WAV to FLAC
Reply #5
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 !
All my will

  • Nick.C
  • [*][*][*][*][*]
  • Developer
How to encode WAV to FLAC
Reply #6
There's a good explanation of the RIFF:WAVE format here 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.
lossyWAV -q X -a 4 -s h -A --feedback 1| FLAC -5 -e -p -b 512 -P=4096 -S- ~= 320kbps

  • useiee
  • [*]
How to encode WAV to FLAC
Reply #7
There's a good explanation of the RIFF:WAVE format here 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))
All my will