Format options defaults |
![]() ![]() |
Format options defaults |
Oct 19 2008, 18:06
Post
#1
|
|
|
Group: Members Posts: 318 Joined: 26-November 04 Member No.: 18345 |
I'm looking at a program which uses Flac encoding in a transcoding operation, and trying to figure out what the options listed below do. Do they tell Flac about the format of the input or what to produce in its output?
Are there default values for each of these? CODE format options:
--endian={big|little} Set byte order for samples --channels=# Number of channels --bps=# Number of bits per sample --sample-rate=# Sample rate in Hz --sign={signed|unsigned} Sign of samples (the default is signed) This post has been edited by JJZolx: Oct 19 2008, 18:07 |
|
|
|
Oct 19 2008, 18:32
Post
#2
|
|
|
Group: Members Posts: 826 Joined: 29-September 04 Member No.: 17374 |
These options are for RAW input only, i.e. WAV without a header.
There is no default value - for each option you must specify a value, but I can give some hints: Endian is little for Windows machine, bps is 16 for a CD-Audio content sample rate is 44100 Hz for CD-Audio sign is signed most probably. |
|
|
|
Oct 19 2008, 19:12
Post
#3
|
|
|
Group: Members Posts: 318 Joined: 26-November 04 Member No.: 18345 |
These options are for RAW input only, i.e. WAV without a header. There is no default value - for each option you must specify a value, but I can give some hints: Endian is little for Windows machine, bps is 16 for a CD-Audio content sample rate is 44100 Hz for CD-Audio sign is signed most probably. Thanks. That's how it's being used. The output is WAV from LAME, with no header (long story why it's transcoding Mp3 to Flac, but it's necessary). So these option _must_ be specified, or else Flac will have no idea what to do and will fail or ... will it? I would have thought that it would default to assuming redbook CD format of 2ch/16bit/44.1kHz. Should --force-raw-format also be given, or will it matter? |
|
|
|
Oct 19 2008, 19:25
Post
#4
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
Should --force-raw-format also be given, or will it matter? If the stream has no WAV chunks in it, only raw audio, then --force-raw-format is unnecessary.
-------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Oct 20 2008, 03:42
Post
#5
|
|
|
Group: Members Posts: 318 Joined: 26-November 04 Member No.: 18345 |
What does this bit mean, from the detailed Help?
QUOTE flac checks for the presence of a AIFF/WAVE header to decide whether or not to treat an input file as AIFF/WAVE format or raw samples. If any input file is raw you must specify the format options {-fb|fl} -fc -fp and -fs, which will apply to all raw files. You can force AIFF/WAVE files to be treated as raw files using -fr. There's no documentation of -fb -fl -fc -fp -fs or -fr options. Can I assume these are short forms of --endian big, --endian little, --channels, --bps, --sampe-rate and --force-raw-format, respectively? Or is this an outdated bit of documentation? This post has been edited by JJZolx: Oct 20 2008, 04:34 |
|
|
|
Oct 20 2008, 22:13
Post
#6
|
|
|
FLAC Developer Group: Developer Posts: 1526 Joined: 27-February 02 Member No.: 1408 |
oops, the -fs, etc options are ancient short forms of the new long options (gotta fix that)
-fs = --sample-rate -fc = --channels -fp = --bps -fb = --endian=big -fl = --endian=little flac tries to detect wave/aiff from the file header. if it does not see a valid header it assumes raw samples, in which case you have to specify all those options (and --sign=...) so it knows the raw format; it doesn't make any assumptions about it. you only have to use --force-raw-format if the detection fails (which I've never heard of). but it won't hurt to use it if you know you're feeding it raw samples. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 05:57 |