📄 main.c
字号:
printf(" --cuesheet=FILENAME Import cuesheet and store in CUESHEET block\n"); printf(" -T, --tag=FIELD=VALUE Add a Vorbis comment; may appear multiple times\n"); printf(" -S, --seekpoint={#|X|#x|#s} Add seek point(s)\n"); printf(" -P, --padding=# Write a PADDING block of length #\n"); printf(" -0, --compression-level-0, --fast Synonymous with -l 0 -b 1152 -r 2,2\n"); printf(" -1, --compression-level-1 Synonymous with -l 0 -b 1152 -M -r 2,2\n"); printf(" -2, --compression-level-2 Synonymous with -l 0 -b 1152 -m -r 3\n"); printf(" -3, --compression-level-3 Synonymous with -l 6 -b 4608 -r 3,3\n"); printf(" -4, --compression-level-4 Synonymous with -l 8 -b 4608 -M -r 3,3\n"); printf(" -5, --compression-level-5 Synonymous with -l 8 -b 4608 -m -r 3,3\n"); printf(" -6, --compression-level-6 Synonymous with -l 8 -b 4608 -m -r 4\n"); printf(" -7, --compression-level-7 Synonymous with -l 8 -b 4608 -m -e -r 6\n"); printf(" -8, --compression-level-8, --best Synonymous with -l 12 -b 4608 -m -e -r 6\n"); printf(" -b, --blocksize=# Specify blocksize in samples\n"); printf(" -m, --mid-side Try mid-side coding for each frame\n"); printf(" -M, --adaptive-mid-side Adaptive mid-side coding for all frames\n"); printf(" -e, --exhaustive-model-search Do exhaustive model search (expensive!)\n"); printf(" -l, --max-lpc-order=# Max LPC order; 0 => only fixed predictors\n"); printf(" -p, --qlp-coeff-precision-search Exhaustively search LP coeff quantization\n"); printf(" -q, --qlp-coeff-precision=# Specify precision in bits\n"); printf(" -r, --rice-partition-order=[#,]# Set [min,]max residual partition order\n"); printf("format options:\n"); printf(" --endian={big|little} Set byte order for samples\n"); printf(" --channels=# Number of channels\n"); printf(" --bps=# Number of bits per sample\n"); printf(" --sample-rate=# Sample rate in Hz\n"); printf(" --sign={signed|unsigned} Sign of samples\n"); printf(" --input-size=# Size of the raw input in bytes\n"); printf(" --force-aiff-format Force decoding to AIFF format\n"); printf(" --force-raw-format Treat input or output as raw samples\n"); printf("negative options:\n"); printf(" --no-adaptive-mid-side\n"); printf(" --no-decode-through-errors\n"); printf(" --no-delete-input-file\n"); printf(" --no-exhaustive-model-search\n"); printf(" --no-lax\n"); printf(" --no-mid-side\n");#ifdef FLAC__HAS_OGG printf(" --no-ogg\n");#endif printf(" --no-padding\n"); printf(" --no-qlp-coeff-prec-search\n"); printf(" --no-replay-gain\n"); printf(" --no-residual-gnuplot\n"); printf(" --no-residual-text\n"); printf(" --no-sector-align\n"); printf(" --no-seektable\n"); printf(" --no-silent\n"); printf(" --no-force\n"); printf(" --no-verify\n");}void show_explain(){ usage_header(); usage_summary(); printf("For encoding:\n"); printf(" The input file(s) may be a PCM RIFF WAVE file, AIFF file, or raw samples.\n"); printf(" The output file(s) will be in native FLAC or Ogg FLAC format\n"); printf("For decoding, the reverse is true.\n"); printf("\n"); printf("A single INPUTFILE may be - for stdin. No INPUTFILE implies stdin. Use of\n"); printf("stdin implies -c (write to stdout). Normally you should use:\n"); printf(" flac [options] -o outfilename or flac -d [options] -o outfilename\n"); printf("instead of:\n"); printf(" flac [options] > outfilename or flac -d [options] > outfilename\n"); printf("since the former allows flac to seek backwards to write the STREAMINFO or\n"); printf("WAVE/AIFF header contents when necessary.\n"); printf("\n"); printf("flac checks for the presence of a AIFF/WAVE header to decide whether or not to\n"); printf("treat an input file as AIFF/WAVE format or raw samples. If any input file is\n"); printf("raw you must specify the format options {-fb|fl} -fc -fp and -fs, which will\n"); printf("apply to all raw files. You can force AIFF/WAVE files to be treated as raw\n"); printf("files using -fr.\n"); printf("\n"); printf("general options:\n"); printf(" -v, --version Show the flac version number\n"); printf(" -h, --help Show basic usage a list of all options\n"); printf(" -H, --explain Show this screen\n"); printf(" -d, --decode Decode (the default behavior is to encode)\n"); printf(" -t, --test Same as -d except no decoded file is written\n"); printf(" -a, --analyze Same as -d except an analysis file is written\n"); printf(" -c, --stdout Write output to stdout\n"); printf(" -s, --silent Do not write runtime encode/decode statistics\n"); printf(" --totally-silent Do not print anything of any kind, including\n"); printf(" warnings or errors. The exit code will be the\n"); printf(" only way to determine successful completion.\n"); printf(" -f, --force Force overwriting of output files\n"); printf(" -o, --output-name=FILENAME Force the output file name; usually flac just\n"); printf(" changes the extension. May only be used when\n"); printf(" encoding a single file. May not be used in\n"); printf(" conjunction with --output-prefix.\n"); printf(" --output-prefix=STRING Prefix each output file name with the given\n"); printf(" STRING. This can be useful for encoding or\n"); printf(" decoding files to a different directory. Make\n"); printf(" sure if your STRING is a path name that it ends\n"); printf(" with a '/' slash.\n"); printf(" --delete-input-file Automatically delete the input file after a\n"); printf(" successful encode or decode. If there was an\n"); printf(" error (including a verify error) the input file\n"); printf(" is left intact.\n"); printf(" --skip={#|mm:ss.ss} Skip the first # samples of each input file; can\n"); printf(" be used both for encoding and decoding. The\n"); printf(" alternative form mm:ss.ss can be used to specify\n"); printf(" minutes, seconds, and fractions of a second.\n"); printf(" --until={#|[+|-]mm:ss.ss} Stop at the given sample number for each input\n"); printf(" file. The given sample number is not included\n"); printf(" in the decoded output. The alternative form\n"); printf(" mm:ss.ss can be used to specify minutes,\n"); printf(" seconds, and fractions of a second. If a `+'\n"); printf(" sign is at the beginning, the --until point is\n"); printf(" relative to the --skip point. If a `-' sign is\n"); printf(" at the beginning, the --until point is relative\n"); printf(" to end of the audio.\n");#ifdef FLAC__HAS_OGG printf(" --ogg When encoding, generate Ogg FLAC output instead\n"); printf(" of native FLAC. Ogg FLAC streams are FLAC\n"); printf(" streams wrapped in an Ogg transport layer. The\n"); printf(" resulting file should have an '.ogg' extension\n"); printf(" and will still be decodable by flac. When\n"); printf(" decoding, force the input to be treated as\n"); printf(" Ogg FLAC. This is useful when piping input\n"); printf(" from stdin or when the filename does not end in\n"); printf(" '.ogg'.\n"); printf(" --serial-number Serial number to use for the FLAC stream. When\n"); printf(" encoding and no serial number is given, flac\n"); printf(" uses '0'. When decoding and no number is\n"); printf(" given, flac uses the serial number of the first\n"); printf(" page.\n");#endif printf("analysis options:\n"); printf(" --residual-text Include residual signal in text output. This\n"); printf(" will make the file very big, much larger than\n"); printf(" even the decoded file.\n"); printf(" --residual-gnuplot Generate gnuplot files of residual distribution\n"); printf(" of each subframe\n"); printf("decoding options:\n"); printf(" -F, --decode-through-errors By default flac stops decoding with an error\n"); printf(" and removes the partially decoded file if it\n"); printf(" encounters a bitstream error. With -F, errors\n"); printf(" are still printed but flac will continue\n"); printf(" decoding to completion. Note that errors may\n"); printf(" cause the decoded audio to be missing some\n"); printf(" samples or have silent sections.\n"); printf(" --cue=[#.#][-[#.#]] Set the beginning and ending cuepoints to\n"); printf(" decode. The optional first #.# is the track and\n"); printf(" index point at which decoding will start; the\n"); printf(" default is the beginning of the stream. The\n"); printf(" optional second #.# is the track and index point\n"); printf(" at which decoding will end; the default is the\n"); printf(" end of the stream. If the cuepoint does not\n"); printf(" exist, the closest one before it (for the start\n"); printf(" point) or after it (for the end point) will be\n"); printf(" used. The cuepoints are merely translated into\n"); printf(" sample numbers then used as --skip and --until.\n"); printf("encoding options:\n"); printf(" -V, --verify Verify a correct encoding by decoding the\n"); printf(" output in parallel and comparing to the\n"); printf(" original\n"); printf(" --lax Allow encoder to generate non-Subset files\n"); printf(" --sector-align Align encoding of multiple CD format WAVE files\n"); printf(" on sector boundaries.\n"); printf(" --replay-gain Calculate ReplayGain values and store in Vorbis\n"); printf(" comments. Title gains/peaks will be computed\n"); printf(" for each file, and an album gain/peak will be\n"); printf(" computed for all files. All input files must\n"); printf(" have the same resolution, sample rate, and\n"); printf(" number of channels. The sample rate must be\n"); printf(" one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1,\n"); printf(" or 48 kHz. NOTE: this option may also leave a\n"); printf(" few extra bytes in the PADDING block.\n"); printf(" --cuesheet=FILENAME Import the given cuesheet file and store it in\n"); printf(" a CUESHEET metadata block. This option may only\n"); printf(" be used when encoding a single file. A\n"); printf(" seekpoint will be added for each index point in\n"); printf(" the cuesheet to the SEEKTABLE unless\n"); printf(" --no-cued-seekpoints is specified.\n"); printf(" -T, --tag=FIELD=VALUE Add a Vorbis comment. Make sure to quote the\n"); printf(" comment if necessary. This option may appear\n"); printf(" more than once to add several comments. NOTE:\n"); printf(" all tags will be added to all encoded files.\n"); printf(" -S, --seekpoint={#|X|#x|#s} Include a point or points in a SEEKTABLE\n"); printf(" # : a specific sample number for a seek point\n"); printf(" X : a placeholder point (always goes at the end of the SEEKTABLE)\n"); printf(" #x : # evenly spaced seekpoints, the first being at sample 0\n"); printf(" #s : a seekpoint every # seconds; # does not have to be a whole number\n"); printf(" You may use many -S options; the resulting SEEKTABLE will be the unique-\n"); printf(" ified union of all such values.\n"); printf(" With no -S options, flac defaults to '-S 10s'. Use -S- for no SEEKTABLE.\n"); printf(" Note: -S #x and -S #s will not work if the encoder can't determine the\n"); printf(" input size before starting.\n"); printf(" Note: if you use -S # and # is >= samples in the input, there will be\n"); printf(" either no seek point entered (if the input size is determinable\n"); printf(" before encoding starts) or a placeholder point (if input size is not\n"); printf(" determinable)\n"); printf(" -P, --padding=# Tell the encoder to write a PADDING metadata\n"); printf(" block of the given length (in bytes) after the\n"); printf(" STREAMINFO block. This is useful if you plan\n"); printf(" to tag the file later with an APPLICATION\n"); printf(" block; instead of having to rewrite the entire\n"); printf(" file later just to insert your block, you can\n"); printf(" write directly over the PADDING block. Note\n"); printf(" that the total length of the PADDING block will\n"); printf(" be 4 bytes longer than the length given because\n"); printf(" of the 4 metadata block header bytes. You can\n"); printf(" force no PADDING block at all to be written with\n"); printf(" --no-padding. The encoder writes a PADDING\n"); printf(" block of 4096 bytes by default.\n"); printf(" -b, --blocksize=# Specify the blocksize in samples; the default is\n"); printf(" 1152 for -l 0, else 4608; must be one of 192,\n"); printf(" 576, 1152, 2304, 4608, 256, 512, 1024, 2048,\n"); printf(" 4096, 8192, 16384, or 32768 (unless --lax is\n"); printf(" used)\n"); printf(" -0, --compression-level-0, --fast Synonymous with -l 0 -b 1152 -r 2,2\n"); printf(" -1, --compression-level-1 Synonymous with -l 0 -b 1152 -M -r 2,2\n"); printf(" -2, --compression-level-2 Synonymous with -l 0 -b 1152 -m -r 3\n"); printf(" -3, --compression-level-3 Synonymous with -l 6 -b 4608 -r 3,3\n"); printf(" -4, --compression-level-4 Synonymous with -l 8 -b 4608 -M -r 3,3\n"); printf(" -5, --compression-level-5 Synonymous with -l 8 -b 4608 -m -r 3,3\n"); printf(" -5 is the default setting\n"); printf(" -6, --compression-level-6 Synonymous with -l 8 -b 4608 -m -r 4\n"); printf(" -7, --compression-level-7 Synonymous with -l 8 -b 4608 -m -e -r 6\n"); printf(" -8, --compression-level-8, --best Synonymous with -l 12 -b 4608 -m -e -r 6\n"); printf(" -m, --mid-side Try mid-side coding for each frame\n"); printf(" (stereo only)\n"); printf(" -M, --adaptive-mid-side Adaptive mid-side coding for all frames\n"); printf(" (stereo only)\n"); printf(" -e, --exhaustive-model-search Do exhaustive model search (expensive!)\n"); printf(" -l, --max-lpc-order=# Max LPC order; 0 => only fixed predictors\n"); printf(" -p, --qlp-coeff-precision-search Do exhaustive search of LP coefficient\n"); printf(" quantization (expensive!); overrides -q;\n"); printf(" does nothing if using -l 0\n"); printf(" -q, --qlp-coeff-precision=# Specify precision in bits of quantized\n"); printf(" linear-predictor coefficients; 0 => let\n"); printf(" encoder decide (the minimun is %u, the\n", FLAC__MIN_QLP_COEFF_PRECISION); printf(" default is -q 0)\n"); printf(" -r, --rice-partition-order=[#,]# Set [min,]max residual partition order\n"); printf(" (# is 0..16; min defaults to 0; the\n"); printf(" default is -r 0; above 4 doesn't usually\n"); printf(" help much)\n"); printf("format options:\n"); printf(" --endian={big|little} Set byte order for samples\n"); printf(" --channels=# Number of channels\n"); printf(" --bps=# Number of bits per sample\n"); printf(" --sample-rate=# Sample rate in Hz\n"); printf(" --sign={signed|unsigned} Sign of samples (the default is signed)\n"); printf(" --input-size=# Size of the raw input in bytes. If you are\n"); printf(" encoding raw samples from stdin, you must set\n"); printf(" this option in order to be able to use --skip,\n"); printf(" --until, --cue-sheet, or other options that need\n"); printf(" to know the size of the input beforehand. If\n"); printf(" the size given is greater than what is found in\n"); printf(" the input stream, the encoder will complain\n"); printf(" about an unexpected end-of-file. If the size\n"); printf(" given is less, samples will be truncated.\n"); printf(" --force-aiff-format Force the decoder to output AIFF format. This\n"); printf(" option is not needed if the output filename (as\n"); printf(" set by -o) ends with .aif or .aiff; this option\n"); printf(" has no effect when encoding since input AIFF is\n"); printf(" auto-detected.\n"); printf(" --force-raw-format Force input (when encoding) or output (when\n"); printf(" decoding) to be treated as raw samples\n"); printf("negative options:\n"); printf(" --no-adaptive-mid-side\n"); printf(" --no-decode-through-errors\n"); printf(" --no-delete-input-file\n"); printf(" --no-exhaustive-model-search\n"); printf(" --no-lax\n"); printf(" --no-mid-side\n");#ifdef FLAC__HAS_OGG printf(" --no-ogg\n");#endif printf(" --no-padding\n"); printf(" --no-qlp-coeff-prec-search\n"); printf(" --no-residual-gnuplot\n"); printf(" --no-residual-text\n"); printf(" --no-sector-align\n"); printf(" --no-seektable\n"); printf(" --no-silent\n"); printf(" --no-force\n"); printf(" --no-verify\n");}void format_mistake(const char *infilename, const char *wrong, const char *right){ flac__utils_printf(stderr, 1, "WARNING: %s is not a %s file; treating as a %s file\n", infilename, wrong, right);}int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_last_file){ FILE *encode_infile; FLAC__byte lookahead[12]; unsigned lookahead_l
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -