Score:0

FFmpeg how to convert a 32bit FLAC at 384kbps to 24bit at 192kbps?

sz flag

Is it possible to do that with ffmpeg? I've noticed that there is no 24-bit listed when using the: ffmpeg -sample_fmts command in the Linux terminal:

name   depth
u8        8 
s16      16 
s32      32 
flt      32 
dbl      64 
u8p       8 
s16p     16 
s32p     32 
fltp     32 
dblp     64 
s64      64 
s64p     64 

I think the Kbps can be specified with something like -arg-ffmpeg 44100 even though I'm not sure what is the value for 192kbps.

I would be grateful for any suggestion.

David avatar
cn flag
What version of Ubuntu are you using?
uz flag
Jos
Don't know if it is of any help, but https://usage.toolstud.io/docs/ffmpeg/usage/sample_fmts/ says "s32 is also used for 24 bits audio". I suppose it then depends on the encoder, which would use padding to store 24 bits of information in 32 bits.
uz flag
Jos
Mind you, [Flacon](https://flacon.github.io/) will easily do that for you, just not from the command line.
Zoltan King avatar
sz flag
Jos- I tried Flacon but I have a wavepack and it says it cannot recognize the format. This splitter written in Golang https://git.sr.ht/~ft/unflac handles any kind of bit rate and format but it relies on ffmpeg and I need to specify those arguments.
Zoltan King avatar
sz flag
I'm going to try this `unflac -arg-ffmpeg -sample_fmt -arg-ffmpeg s32 -arg-ffmpeg -ar -arg-ffmpeg 192000 file.cue`
Zoltan King avatar
sz flag
The `unflac` seems to work fine. It generated a file which shows this when checked with the `file` utility: `output-file.flac: FLAC audio bitstream data, 24 bit, stereo, 192 kHz, 42176000 samples`
uz flag
Jos
Please post your answer, so others may benefit from it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.