/*
* FAAC - Freeware Advanced Audio Coder
* Copyright (C) 2001 Menno Bakker
* Copyright (C) 2002-2004 Krzysztof Nikiel
* Copyright (C) 2004 Dan Villiom P. Christiansen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: main.c,v 1.82 2009/01/24 01:10:20 menno Exp $
*/
#ifdef _MSC_VER
# define HAVE_LIBMP4V2 1
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_LIBMP4V2
# include <mp4.h>
#endif
#define DEFAULT_TNS 0
#ifdef _WIN32
#include <windows.h>
#include <fcntl.h>
#else
#include <signal.h>
#endif
/* the BSD derivatives don't define __unix__ */
#if defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
#define __unix__
#endif
#ifdef __unix__
#include <time.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#else
# include "getopt.h"
# include "getopt.c"
#endif
#if !defined(HAVE_STRCASECMP) && !defined(_WIN32)
# define strcasecmp strcmp
#endif
#ifdef _WIN32
# undef stderr
# define stderr stdout
#endif
#include "input.h"
#include <faac.h>
const char *usage =
"Usage: %s [options] [-o outfile] infiles ...\n"
"\n"
"\t<infiles> and/or <outfile> can be \"-\", which means stdin/stdout.\n"
"\n"
"See also:\n"
"\t\"%s --help\" for short help on using FAAC\n"
"\t\"%s --long-help\" for a description of all options for FAAC.\n"
"\t\"%s --license\" for the license terms for FAAC.\n\n";
const char *short_help =
"Usage: %s [options] infiles ...\n"
"Options:\n"
" -q <quality>\tSet quantizer quality.\n"
" -b <bitrate>\tSet average bitrate to x kbps. (ABR, lower quality mode)\n"
" -c <freq>\tSet the bandwidth in Hz. (default=automatic)\n"
" -o X\t\tSet output file to X (only for one input file)\n"
" -r\t\tUse RAW AAC output file.\n"
" -P\t\tRaw PCM input mode (default 44100Hz 16bit stereo).\n"
" -R\t\tRaw PCM input rate.\n"
" -B\t\tRaw PCM input sample size (8, 16 (default), 24 or 32bits).\n"
" -C\t\tRaw PCM input channels.\n"
" -X\t\tRaw PCM swap input bytes\n"
" -I <C,LF>\tInput channel config, default is 3,4 (Center third, LF fourth)\n"
"\n"
"MP4 specific options:\n"
#ifdef HAVE_LIBMP4V2
" -w\t\tWrap AAC data in MP4 container. (default for *.mp4 and *.m4a)\n"
" -s\t\tOptimize MP4 container layout after encoding\n"
" --artist X\tSet artist to X\n"
" --writer X\tSet writer to X\n"
" --title X\tSet title to X\n"
" --genre X\tSet genre to X\n"
" --album X\tSet album to X\n"
" --compilation\tSet compilation\n"
" --track X\tSet track to X (number/total)\n"
" --disc X\tSet disc to X (number/total)\n"
" --year X\tSet year to X\n"
" --cover-art X\tRead cover art from file X\n"
" --comment X\tSet comment to X\n"
#else
" MP4 support unavailable.\n"
#endif
"\n"
"Documentation:\n"
" --license\tShow the FAAC license.\n"
" --help\tShow this abbreviated help.\n"
" --long-help\tShow complete help.\n"
"\n"
" More tips can be found in the audiocoding.com Knowledge Base at\n"
" <http://www.audiocoding.com/wiki/>\n"
"\n";
const char *long_help =
"Usage: %s [options] infiles ...\n"
"\n"
"Quality-related options:\n"
" -q <quality>\tSet default variable bitrate (VBR) quantizer quality in percent.\n"
"\t\t(default: 100, averages at approx. 120 kbps VBR for a normal\n"
"\t\tstereo input file with 16 bit and 44.1 kHz sample rate; max.\n"
"\t\tvalue 500, min. 10).\n"
" -b <bitrate>\tSet average bitrate (ABR) to approximately <bitrate> kbps.\n"
"\t\t(max. value 152 kbps/stereo with a 16 kHz cutoff, can be raised\n"
"\t\twith a higher -c setting).\n"
" -c <freq>\tSet the bandwidth in Hz (default: automatic, i.e. adapts\n"
"\t\tmaximum value to input sample rate).\n"
"\n"
"Input/output options:\n"
" -\t\t<stdin/stdout>: If you simply use a hyphen/minus sign instead\n"
"\t\tof an input file name, FAAC can encode directly from stdin,\n"
"\t\tthus enabling piping from other applications and utilities. The\n"
"\t\tsame works for stdout as well, so FAAC can pipe its output to\n"
"\t\tother apps such as a server.\n"
" -o X\t\tSet output file to X (only for one input file)\n"
"\t\tonly for one input file; you can use *.aac, *.mp4, *.m4a or\n"
"\t\t*.m4b as file extension, and the file format will be set\n"
"\t\tautomatically to ADTS or MP4).\n"
" -P\t\tRaw PCM input mode (default: off, i.e. expecting a WAV header;\n"
"\t\tnecessary for input files or bitstreams without a header; using\n"
"\t\tonly -P assumes the default values for -R, -B and -C in the\n"
"\t\tinput file).\n"
" -R\t\tRaw PCM input sample rate in Hz (default: 44100 Hz, max. 96 kHz)\n"
" -B\t\tRaw PCM input sample size (default: 16, also possible 8, 24, 32\n"
"\t\tbit fixed or float input).\n"
" -C\t\tRaw PCM input channels (default: 2, max. 33 + 1 LFE).\n"
" -X\t\tRaw PCM swap input bytes (default: bigendian).\n"
" -I <C[,LFE]>\tInput multichannel configuration (default: 3,4 which means\n"
"\t\tCenter is third and LFE is fourth like in 5.1 WAV, so you only\n"
"\t\thave to specify a different position of these two mono channels\n"
"\t\tin your multichannel input files if they haven't been reordered\n"
"\t\talready).\n"
"\n"
"MP4 specific options:\n"
#ifdef HAVE_LIBMP4V2
" -w\t\tWrap AAC data in MP4 container. (default for *.mp4, *.m4a and\n"
"\t\t*.m4b)\n"
" -s\t\tOptimize MP4 container layout after encoding.\n"
" --artist X\tSet artist to X\n"
" --writer X\tSet writer/composer to X\n"
" --title X\tSet title/track name to X\n"
" --genre X\tSet genre to X\n"
" --album X\tSet album/performer to X\n"
" --compilation\tMark as compilation\n"
" --track X\tSet track to X (number/total)\n"
" --disc X\tSet disc to X (number/total)\n"
" --year X\tSet year to X\n"
" --cover-art X\tRead cover art from file X\n"
"\t\tSupported image formats are GIF, JPEG, and PNG.\n"
" --comment X\tSet comment to X\n"
#else
" MP4 support unavailable.\n"
#endif
"\n"
"Expert options, only for testing purposes:\n"
#if !DEFAULT_TNS
" --tns \tEnable coding of TNS, temporal noise shaping.\n"
#else
" --no-tns\tDisable coding of TNS, temporal noise shaping.\n"
#endif
" --no-midside\tDon\'t use mid/side coding.\n"
" --mpeg-vers X\tForce AAC MPEG version, X can be 2 or 4\n"
" --obj-type X\tAAC object type. (LC (Low Complexity, default), Main or LTP\n"
"\t\t(Long Term Prediction)\n"
" --shortctl X\tEnforce block type (0 = both (default); 1 = no short; 2 = no\n"
"\t\tlong).\n"
" -r\t\tGenerate raw AAC bitstream (i.e. without any headers).\n"
"\t\tNot advised!!!, RAW AAC files are practically useless!!!\n"
"\n"
"Documentation:\n"
" --license\tShow the FAAC license.\n"
" --help\tShow this abbreviated help.\n"
" --long-help\tShow complete help.\n"
"\n"
" More tips can be found in the audiocoding.com Knowledge Base at\n"
" <http:
faac_delphi_faac_DEMO_audio_components_源码
版权申诉
65 浏览量
2021-10-04
00:54:29
上传
评论
收藏 588KB ZIP 举报
鹰忍
- 粉丝: 66
- 资源: 4707
最新资源
- 毕业设计项目源码-使用Matlab基于PSO工具箱的函数寻优算法实现.zip
- libusb源码,libusb是一个跨平台的用户空间USB库
- 独栋别墅图纸CAD图纸D025-两层-10.72&06.36米-施工图.dwg
- 甄嬛传后宫大合影(闲的没事....)
- SAP GUI for Windows 8.00 patch 7 64Bit
- 毕业设计项目源码-使用Matlab基于动态粒子群算法的动态环境寻优算法.zip
- 华为云会议安装包适配华为擎云L410 -1060 ARM架构
- 清空redis缓存脚本指令
- Keithley6517静电计测试软件,支持24通道切换,DAQ高速采集
- STM8S微控制器-寄存器操作指南
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈