Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to encode WAV to FLAC (Read 6568 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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

How to encode WAV to FLAC

Reply #1
Foobar2k will do the job for you.

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.

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 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

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

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

 

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 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

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