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: flac to wav by command line (Read 15545 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

flac to wav by command line

ai folks,

(the topic name says it all ;-) )

i need to convert an arbitrary flac-file to wav (16 and 24 bit) by command line.
I'm using flac 1.1.1

i dunno how to do and the man pages and forum search doesn't help me at all....

thanks

bernhard

flac to wav by command line

Reply #1
How about running flac.exe and see how?
Code: [Select]
To decode:
  flac -d [INPUTFILE [...]]

flac to wav by command line

Reply #2
How about running flac.exe and see how?
Code: [Select]
To decode:
  flac -d [INPUTFILE [...]]


ai,

thanks a lot ;-) - that's what i did first of course....
But i have the feeling, that its not possible to convert to both - 16 bit, 44kHz AND 24bit, 99kHz

I tried:

flac -df -o test.wav -V -bps=16 -sample-rate=44100 myFile.flac

but the wav seems to be broken

flac -d -o test.wav myFile.flac

works, but the file is 24bit, 99kHz....

I just wanted to know wheter I'm runnin the wrong way...
I'm quite sure that there are guys around that know exactly how to do this one - so i asked...

greetings

bernhard

flac to wav by command line

Reply #3
May I ask what the purpose of this is?
I doubt you can decode to 24bit and some obscure samplerate.
The point of flac is to be lossless... decoding to anything else than source bit depth and samplerate is not.

flac to wav by command line

Reply #4
Hi,
resampling is not supported with decoding. The best way to get your task done is to use foobar2000' built-in resampler and decoder, the other way is to use flac.exe and SoX.

 

flac to wav by command line

Reply #5
Hi,
resampling is not supported with decoding. The best way to get your task done is to use foobar2000' built-in resampler and decoder, the other way is to use flac.exe and SoX.


ai,

thats what i thought....
I already tried SoX but that one got problems with 24bit wavs....

Foobar doesn't fit my need, because I do the encoding on a debian-server by command line....

So the problem is the same: ;-(

I have some 16 OR 24 bit wave file and need to convert them to:

flac
wav (16 AND 24bit)
aiff
mp3

I'm using Sox, flac and lame but it looks like thats not enough.... ;-(

Does somebody know ?

greeting

bernhard

flac to wav by command line

Reply #6
I have some 16 OR 24 bit wave file and need to convert them to:

flac
wav (16 AND 24bit)
aiff
mp3

I'm using Sox, flac and lame but it looks like thats not enough.... ;-(

Does somebody know ?

flac and lame already can take 16 or 24 bit wav files as input.

There might be a better answer if you tell the real purpose (right now it looks like you wanna create weird collection of 16&24 bit pcms, mp3s, flacs and aiffs, which are copies of the source - Is it kinda backup?  )

flac to wav by command line

Reply #7
There might be a better answer if you tell the real purpose (right now it looks like you wanna create weird collection of 16&24 bit pcms, mp3s, flacs and aiffs, which are copies of the source - Is it kinda backup?  )


okok ;-)
some friends of mine are doing sound design / music. We have a server where we want to store all our files. But for our needs we want to have them in all possilbe formats that could be needed for TV, Radio, DVD and streaming needs.
So we want:

flac
mp3
aiff
wav (16 + 24 bit)

So we want to upload the files to the server where they shall be converted automatically to the given formats. The problem is: The Input files will be 16 bit OR 24 bit and i see no way to convert a 24 bit wav to 16 bit wav automatically.... ;-(

thanks for every help ;-)

bernhard

flac to wav by command line

Reply #8
first rule when asking for help: give as much detail as possible.  sox should work but all you said was "I already tried SoX but that one got problems with 24bit wavs...."  not much to go on.

flac to wav by command line

Reply #9
first rule when asking for help: give as much detail as possible.  sox should work but all you said was "I already tried SoX but that one got problems with 24bit wavs...."  not much to go on.


;-)
i tried:

sox myFile_24bit.wav -Vwr 44100 myFile_16bit.wav

and i got:

sox: Detected file format type: wav

sox: WAV Chunk fmt
sox: Failed reading myFile_24bit.wav: Sorry, don't understand .wav size

and someone in this forum told me:

oh - perhaps you are trying to use 24bit-wav as input file - obviously sox can't deal with this....

Actually, i don't understand this error msg at all...

Do you?

greeting

b.

flac to wav by command line

Reply #10
instead of sox, use ssrc.

do you actually need to archive in both 16 & 24 bits?

...bash scripts using ssrc, lame, sox, and flac should work fine.


later

flac to wav by command line

Reply #11
ai,

instead of sox, use ssrc.

do you actually need to archive in both 16 & 24 bits?


yes - AND aiff AND flac AND mp3 ;-)

...bash scripts using ssrc, lame, sox, and flac should work fine.

later


hmmm... I'm runnin sox, flac and lame but i don't know ssrc.... where to find that one ?
Isn't that one a WINTool ? I'm using debian / suse....

bye


flac to wav by command line

Reply #13
Do you not have GStreamer? You can do all of that with simple pipelines!

Code: [Select]
man gst-launch

flac to wav by command line

Reply #14
hi folks,

i can't find ssrc doing a conversion 24bit -> 16bit

AFAIUnderstand ssrc is a sampling rate converter (48kHz -> 44.1kHz)

and GStreamer seems not to be proper, too....

How can i convert a 24bit Wav to 16bit Wav ?

It can't be that hard...

please help

flac to wav by command line

Reply #15
SSRC has some command line options
Quote
--dither [<type>]
    Apply dithers to the output file.
      type 0 : no dither
      type 1 : no noise shaping
      type 2 : triangular dither
      type 3 : ATH based noise shaping
  --bits
    Specify quantization bit length. 8, 16 and 24bits are supported.

Isn't this is what you are looking for?