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: problem with convertion (Read 4066 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

problem with convertion

hi i have a problem I want to convert a wav file to FLAC with  output in RAW format, one channel and 8000 kbps i used this code

Quote
sox file.wav -c1 -r8000 -t wav - | sox -t wav - out.raw

i tried to convert the same file with this code and the program vlc, with vlc the output file size is 8 kbts with the sox script is 20 kb
how can i fix it?

problem with convertion

Reply #1
I don't know what a RAW FLAC is, and I don't use SOX...    Or, are you trying to say your input is RAW?

Where's the FLAC command?

But if you have more details, including the bit depth (i.e. 16-bits), the number of channels (mono or stereo) and the playing time, I can take a guess about which file size seems right.

For an uncompressed file:
File size in bytes = Playing time in seconds x (bit depth/8) x number of channels x sample rate in kHz.
A FLAC file is typically around 60% of that.

(Plus, the header and any tags take a little space, and any embedded images can add quite a bit to the file size.)

Do both of these files play?

That should be 8000kHz, not 8000kbps.  I assume your original file is 8000kHz mono?  And with a WAV file, you shouldn't need the -r8000 or -c1 in your command, because SOX can read that information from the WAV header.

P.S.
If you are not happy with VLC, maybe you can use TAudioConverter and avoid the command line confusion.

 

problem with convertion

Reply #2
In the last thread asking this question you said you wanted RAW PCM.  In this one you're saying FLAC. 

Which do you actually want?