Help - Search - Members - Calendar
Full Version: How to retrieve the "bits per sample" info ?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
foorious
Hi everyone,

Is there a way to retrieve the "bits per sample" information via a titleformatting field or function ?

I mean, we have %codec% that gives us the audio codec, %bitrate% for the bit rate, %samplerate% for the sample rate... but what about the number of bits per sample ? (16, 24...) Any ideas ?

Thanks.
foosion
%__bitspersample%. Note however this value is meaningless for lossy codecs like MP3, so the field is not defined there.
foorious
Understood. It works. Thank you foosion.
Dandruff
QUOTE(foosion @ Jun 18 2008, 10:31) *
%__bitspersample%


any idea, why this one isn't listed in the "Syntax Help"?
shakey_snake
titleformating_help.html only contains the most likely used variables and functions.

All (documented) functions and variables can be found on the Wiki's Title Formatting Reference
Dandruff
ahh, ok - thank you!
rubix
why is bits per sample meaningless for lossy codecs?

if my file is originally sourced from 16bits i'd still like a way to have it show that even though it is technically incorrect apparently.

Edit: Found answer:
"The way most lossy formats encode audio doesn't have anything to do with the source file bitdepth, since they use floating-point mathematics internally. Also, no information on bit resolution of the source file is stored in the compressed file. Therefore, it's impossible to define "bitdepth" for mp3, ogg, mpc or mp4/aac files."
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.