ffmpeg将音频文件重采样为8位、16位、32位的命令比较容易查找,但是重采样为24位却非常非常的少。
ffmpeg -i 32.wav -vn -ac 2 -ar 44100 -acodec pcm_s24le -y 24.wav
-i: 输入文件,这里为 32.wav
-vn: 输出文件禁用视频流
-ac: 设置输出文件音频通道的数量,这里为2(双通道)
-ar: 设置输出文件音频采样率,这里为44100
-acodec: 设置输出文件音频编解码器,这里为pcm_s24le(小端有符号的24位)
-y: 无需询问即可覆盖输出文件
ffmpeg支持的编解码有
Decoders:
V..... = Video
A..... = Audio
S..... = Subtitle
.F.... = Frame-level multithreading
..S... = Slice-level multithreading
...X.. = Codec is experimental
....B. = Supports draw_horiz_band
.....D = Supports direct rendering method 1
------
V....D 012v Uncompressed 4:2:2 10-bit
V....D 4xm 4X Movie
V....D 8bps QuickTime 8BPS video
V....D aasc Autodesk RLE
V..... amv AMV Video
V....D anm Deluxe Paint Animation
V....D ansi ASCII/ANSI art
V....D asv1 ASUS V1
V....D asv2 ASUS V2
V....D aura Auravision AURA
V....D aura2 Auravision Aura 2
V....D avrn Avid AVI Codec
V....D avrp Avid 1:1 10-bit RGB Packer
V....D avs AVS (Audio Video Standard) video
V....D avui Avid Meridien Uncompressed
V....D ayuv Uncompressed packed MS 4:4:4:4
V....D bethsoftvid Bethesda VID video
V....D bfi Brute Force & Ignorance
V....D binkvideo Bink video
V....D bintext Binary text
V....D bmp BMP (Windows and OS/2 bitmap)
V....D bmv_video Discworld II BMV video
V....D brender_pix BRender PIX image
V....D c93 Interplay C93
V....D cavs Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
V....D cdgraphics CD Graphics video
V....D cdxl Commodore CDXL video
V....D cinepak Cinepak
V....D cljr Cirrus Logic AccuPak
V....D cllc Canopus Lossless Codec
V....D eacmv Electronic Arts CMV video (codec cmv)
V....D cpia CPiA video format
V....D camstudio CamStudio (codec cscd)
V....D cyuv Creative YUV (CYUV)
V....D dfa Chronomaster DFA
V..... dirac BBC Dirac VC-2
V..... libschroedinger libschroedinger Dirac 2.2 (codec dirac)
VF...D dnxhd VC3/DNxHD
V....D dpx DPX image
V....D dsicinvideo Delphine Software International CIN video
V.S..D dvvideo DV (Digital Video)
V....D dxa Feeble Files/ScummVM DXA
V....D dxtory Dxtory
V....D escape124 Escape 124
V....D escape130 Escape 130
VF...D exr OpenEXR image
V.S..D ffv1 FFmpeg video codec #1
VF..BD ffvhuff Huffyuv FFmpeg variant
V....D flashsv Flash Screen Video v1
V....D flashsv2 Flash Screen Video v2
V....D flic Autodesk Animator Flic video
V...BD flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)
VF...D fraps Fraps
V....D frwu Forward Uncompressed
V....D gif GIF (Graphics Interchange Format)
V....D h261 H.261
V...BD h263 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
V...BD h263i Intel H.263
V...BD h263p H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
VFS..D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
VF..BD huffyuv Huffyuv / HuffYUV
V....D idcinvideo id Quake II CIN video (codec idcin)
V....D idf iCEDraw text
V....D iff IFF (codec iff_byterun1)
V....D iff IFF (codec iff_ilbm)
V....D indeo2 Intel Indeo 2
V....D indeo3 Intel Indeo 3
V....D indeo4 Intel Indeo Video Interactive 4
V....D indeo5 Intel Indeo Video Interactive 5
V....D interplayvideo Interplay MVE video
V..X.. j2k JPEG 2000 (codec jpeg2000)
VF...D libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)
V....D jpegls JPEG-LS
V....D jv Bitmap Brothers JV video
V....D kgv1 Kega Game Video
V....D kmvc Karl Morton's video codec
VF...D lagarith Lagarith lossless
V....D loco LOCO
V....D eamad Electronic Arts Madcow Video (codec mad)
VF...D mdec Sony PlayStation MDEC (Motion DECoder)
VF...D mimic Mimic
V....D mjpeg MJPEG (Motion JPEG)
V....D mjpegb Apple MJPEG-B
V....D mmvideo American Laser Games MM Video
V....D motionpixels Motion Pixels video
V.S.BD mpeg1video MPEG-1 video
V.S.BD mpeg2video MPEG-2 video
V.S.BD mpegvideo MPEG-1 video (codec mpeg2video)
VF..BD mpeg4 MPEG-4 part 2
V....D msa1 MS ATC Screen
V...BD msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1
V...BD msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
V...BD msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)
V....D msrle Microsoft RLE
V....D mss1 MS Screen 1
V....D mss2 MS Windows Media Video V9 Screen
V....D msvideo1 Microsoft Video 1
V....D mszh LCL (LossLess Codec Library) MSZH
V....D mts2 MS Expression Encoder Screen
V....D mvc1 Silicon Graphics Motion Video Compressor 1
V....D mvc2 Silicon Graphics Motion Video Compressor 2
V....D mxpeg Mobotix MxPEG video
V....D nuv NuppelVideo/RTJPEG
V....D paf_video Amazing Studio Packed Animation File Video
V....D pam PAM (Portable AnyMap) image
V....D pbm PBM (Portable BitMap) image
V....D pcx PC Paintbrush PCX image
V....D pgm PGM (Portable GrayMap) image
V....D pgmyuv PGMYUV (Portable GrayMap YUV) image
V....D pictor Pictor/PC Paint
V....D png PNG (Portable Network Graphics) image
V....D ppm PPM (Portable PixelMap) image
V.S..D prores ProRes
V.S..D prores_lgpl Apple ProRes (iCodec Pro) (codec prores)
V....D ptx V.Flash PTX image
V....D qdraw Apple QuickDraw
V....D qpeg Q-team QPEG
V....D qtrle QuickTime Animation (RLE) video
V....D r10k AJA Kona 10-bit RGB Codec
V....D r210 Uncompressed RGB 10-bit
V..... rawvideo raw video
V....D rl2 RL2 video
V....D roqvideo id RoQ video (codec roq)
V....D rpza QuickTime video (RPZA)
V....D rv10 RealVideo 1.0
V....D rv20 RealVideo 2.0
VF...D rv30 RealVideo 3.0
VF...D rv40 RealVideo 4.0
V....D sanm LucasArts SMUSH video
V....D sgi SGI image
V....D sgirle SGI RLE 8-bit
V....D smackvid Smacker video (codec smackvideo)
V....D smc QuickTime Graphics (SMC)
V....D snow Snow
V....D sp5x Sunplus JPEG (SP5X)
V....D sunrast Sun Rasterfile image
V....D svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
V...BD svq3 Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3
V....D targa Truevision Targa image
V....D targa_y216 Pinnacle TARGA CineWave YUV16
V....D eatgq Electronic Arts TGQ video (codec tgq)
V..... eatgv Electronic Arts TGV video (codec tgv)
VF..BD theora Theora
V....D thp Nintendo Gamecube THP video
V....D tiertexseqvideo Tiertex Limited SEQ video
V....D tiff TIFF image
V....D tmv 8088flex TMV
V....D eatqi Electronic Arts TQI Video (codec tqi)
V....D truemotion1 Duck TrueMotion 1.0
V....D truemotion2 Duck TrueMotion 2.0
V....D camtasia TechSmith Screen Capture Codec (codec tscc)
V....D tscc2 TechSmith Screen Codec 2
V....D txd Renderware TXD (TeXture Dictionary) image
V....D ultimotion IBM UltiMotion (codec ulti)
VF...D utvideo Ut Video
V....D v210 Uncompressed 4:2:2 10-bit
V....D v210x Uncompressed 4:2:2 10-bit
V....D v308 Uncompressed packed 4:4:4
V....D v408 Uncompressed packed QT 4:4:4:4
V....D v410 Uncompressed 4:4:4 10-bit
V....D vb Beam Software VB
V....D vble VBLE Lossless Codec
V....D vc1 SMPTE VC-1
V....D vc1image Windows Media Video 9 Image v2
V....D vcr1 ATI VCR1
V....D xl Miro VideoXL (codec vixl)
V....D vmdvideo Sierra VMD video
V....D vmnc VMware Screen Codec / VMware Video
VF..BD vp3 On2 VP3
V....D vp5 On2 VP5
V....D vp6 On2 VP6
V.S..D vp6a On2 VP6 (Flash version, with alpha channel)
V....D vp6f On2 VP6 (Flash version)
VFS..D vp8 On2 VP8
V..... libvpx libvpx VP8 (codec vp8)
V...BD wmv1 Windows Media Video 7
V...BD wmv2 Windows Media Video 8
V....D wmv3 Windows Media Video 9
V....D wmv3image Windows Media Video 9 Image
V....D wnv1 Winnov WNV1
V....D vqavideo Westwood Studios VQA (Vector Quantized Animation) video (codec ws_vqa)
V....D xan_wc3 Wing Commander III / Xan
V....D xan_wc4 Wing Commander IV / Xxan
V....D xbin eXtended BINary text
V....D xbm XBM (X BitMap) image
V..... xface X-face image
V....D xwd XWD (X Window Dump) image
V....D y41p Uncompressed YUV 4:1:1 12-bit
V..... yop Psygnosis YOP Video
V....D yuv4 Uncompressed packed 4:2:0
V....D zerocodec ZeroCodec Lossless Video
V....D zlib LCL (LossLess Codec Library) ZLIB
V....D zmbv Zip Motion Blocks Video
A....D 8svx_exp 8SVX exponential
A....D 8svx_fib 8SVX fibonacci
A....D aac AAC (Advanced Audio Coding)
A....D aac_latm AAC LATM (Advanced Audio Coding LATM syntax)
A....D ac3 ATSC A/52A (AC-3)
A....D adpcm_4xm ADPCM 4X Movie
A....D adpcm_adx SEGA CRI ADX ADPCM
A....D adpcm_afc ADPCM Nintendo Gamecube AFC
A....D adpcm_ct ADPCM Creative Technology
A....D adpcm_ea ADPCM Electronic Arts
A....D adpcm_ea_maxis_xa ADPCM Electronic Arts Maxis CDROM XA
A....D adpcm_ea_r1 ADPCM Electronic Arts R1
A....D adpcm_ea_r2 ADPCM Electronic Arts R2
A....D adpcm_ea_r3 ADPCM Electronic Arts R3
A....D adpcm_ea_xas ADPCM Electronic Arts XAS
A....D g722 G.722 ADPCM (codec adpcm_g722)
A....D g726 G.726 ADPCM (codec adpcm_g726)
A....D adpcm_ima_amv ADPCM IMA AMV
A....D adpcm_ima_apc ADPCM IMA CRYO APC
A....D adpcm_ima_dk3 ADPCM IMA Duck DK3
A....D adpcm_ima_dk4 ADPCM IMA Duck DK4
A....D adpcm_ima_ea_eacs ADPCM IMA Electronic Arts EACS
A....D adpcm_ima_ea_sead ADPCM IMA Electronic Arts SEAD
A....D adpcm_ima_iss ADPCM IMA Funcom ISS
A....D adpcm_ima_oki ADPCM IMA Dialogic OKI
A....D adpcm_ima_qt ADPCM IMA QuickTime
A....D adpcm_ima_smjpeg ADPCM IMA Loki SDL MJPEG
A....D adpcm_ima_wav ADPCM IMA WAV
A....D adpcm_ima_ws ADPCM IMA Westwood
A....D adpcm_ms ADPCM Microsoft
A....D adpcm_sbpro_2 ADPCM Sound Blaster Pro 2-bit
A....D adpcm_sbpro_3 ADPCM Sound Blaster Pro 2.6-bit
A....D adpcm_sbpro_4 ADPCM Sound Blaster Pro 4-bit
A....D adpcm_swf ADPCM Shockwave Flash
A....D adpcm_thp ADPCM Nintendo Gamecube THP
A....D adpcm_xa ADPCM CDROM XA
A....D adpcm_yamaha ADPCM Yamaha
A....D alac ALAC (Apple Lossless Audio Codec)
A....D amrnb AMR-NB (Adaptive Multi-Rate NarrowBand) (codec amr_nb)
A....D libopencore_amrnb OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band) (codec amr_nb)
A....D amrwb AMR-WB (Adaptive Multi-Rate WideBand) (codec amr_wb)
A....D libopencore_amrwb OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band) (codec amr_wb)
A....D ape Monkey's Audio
A....D atrac1 Atrac 1 (Adaptive TRansform Acoustic Coding)
A....D atrac3 Atrac 3 (Adaptive TRansform Acoustic Coding 3)
A....D binkaudio_dct Bink Audio (DCT)
A....D binkaudio_rdft Bink Audio (RDFT)
A....D bmv_audio Discworld II BMV audio
A....D comfortnoise RFC 3389 comfort noise generator
A....D cook Cook / Cooker / Gecko (RealAudio G2)
A....D dsicinaudio Delphine Software International CIN audio
A....D dca DCA (DTS Coherent Acoustics) (codec dts)
A....D eac3 ATSC A/52B (AC-3, E-AC-3)
A....D flac FLAC (Free Lossless Audio Codec)
A....D g723_1 G.723.1
A....D g729 G.729
A....D gsm GSM
A....D libgsm libgsm GSM (codec gsm)
A....D gsm_ms GSM Microsoft variant
A....D libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)
A....D iac IAC (Indeo Audio Coder)
A....D imc IMC (Intel Music Coder)
A....D interplay_dpcm DPCM Interplay
A....D mace3 MACE (Macintosh Audio Compression/Expansion) 3:1
A....D mace6 MACE (Macintosh Audio Compression/Expansion) 6:1
A....D mlp MLP (Meridian Lossless Packing)
A....D mp1 MP1 (MPEG audio layer 1)
A....D mp1float MP1 (MPEG audio layer 1) (codec mp1)
A....D mp2 MP2 (MPEG audio layer 2)
A....D mp2float MP2 (MPEG audio layer 2) (codec mp2)
A....D mp3 MP3 (MPEG audio layer 3)
A....D mp3float MP3 (MPEG audio layer 3) (codec mp3)
A....D mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
A....D mp3adufloat ADU (Application Data Unit) MP3 (MPEG audio layer 3) (codec mp3adu)
A....D mp3on4 MP3onMP4
A....D mp3on4float MP3onMP4 (codec mp3on4)
A....D als MPEG-4 Audio Lossless Coding (ALS) (codec mp4als)
A....D mpc7 Musepack SV7 (codec musepack7)
A....D mpc8 Musepack SV8 (codec musepack8)
A....D nellymoser Nellymoser Asao
A....D libopus libopus Opus (codec opus)
A....D paf_audio Amazing Studio Packed Animation File Audio
A....D pcm_alaw PCM A-law / G.711 A-law
A....D pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media
A....D pcm_dvd PCM signed 20|24-bit big-endian
A....D pcm_f32be PCM 32-bit floating point big-endian
A....D pcm_f32le PCM 32-bit floating point little-endian
A....D pcm_f64be PCM 64-bit floating point big-endian
A....D pcm_f64le PCM 64-bit floating point little-endian
A....D pcm_lxf PCM signed 20-bit little-endian planar
A....D pcm_mulaw PCM mu-law / G.711 mu-law
A....D pcm_s16be PCM signed 16-bit big-endian
A....D pcm_s16be_planar PCM signed 16-bit big-endian planar
A....D pcm_s16le PCM signed 16-bit little-endian
A....D pcm_s16le_planar PCM signed 16-bit little-endian planar
A....D pcm_s24be PCM signed 24-bit big-endian
A....D pcm_s24daud PCM D-Cinema audio signed 24-bit
A....D pcm_s24le PCM signed 24-bit little-endian
A....D pcm_s24le_planar PCM signed 24-bit little-endian planar
A....D pcm_s32be PCM signed 32-bit big-endian
A....D pcm_s32le PCM signed 32-bit little-endian
A....D pcm_s32le_planar PCM signed 32-bit little-endian planar
A....D pcm_s8 PCM signed 8-bit
A....D pcm_s8_planar PCM signed 8-bit planar
A....D pcm_u16be PCM unsigned 16-bit big-endian
A....D pcm_u16le PCM unsigned 16-bit little-endian
A....D pcm_u24be PCM unsigned 24-bit big-endian
A....D pcm_u24le PCM unsigned 24-bit little-endian
A....D pcm_u32be PCM unsigned 32-bit big-endian
A....D pcm_u32le PCM unsigned 32-bit little-endian
A....D pcm_u8 PCM unsigned 8-bit
A....D pcm_zork PCM Zork
A....D qcelp QCELP / PureVoice
A....D qdm2 QDesign Music Codec 2
A....D real_144 RealAudio 1.0 (14.4K) (codec ra_144)
A....D real_288 RealAudio 2.0 (28.8K) (codec ra_288)
A....D ralf RealAudio Lossless
A....D roq_dpcm DPCM id RoQ
A....D s302m SMPTE 302M
A....D shorten Shorten
A....D sipr RealAudio SIPR / ACELP.NET
A....D smackaud Smacker audio (codec smackaudio)
A....D sol_dpcm DPCM Sol
A..X.D sonic Sonic
A....D libspeex libspeex Speex (codec speex)
A....D tak TAK (Tom's lossless Audio Kompressor)
A....D truehd TrueHD
A....D truespeech DSP Group TrueSpeech
A....D tta TTA (True Audio)
A....D twinvq VQF TwinVQ
A....D vima LucasArts VIMA audio
A....D vmdaudio Sierra VMD audio
A....D vorbis Vorbis
A..... libvorbis libvorbis (codec vorbis)
A....D wavesynth Wave synthesis pseudo-codec
A....D wavpack WavPack
A....D ws_snd1 Westwood Audio (SND1) (codec westwood_snd1)
A....D wmalossless Windows Media Audio Lossless
A....D wmapro Windows Media Audio 9 Professional
A....D wmav1 Windows Media Audio 1
A....D wmav2 Windows Media Audio 2
A....D wmavoice Windows Media Audio Voice
A....D xan_dpcm DPCM Xan
S..... dvbsub DVB subtitles (codec dvb_subtitle)
S..... dvdsub DVD subtitles (codec dvd_subtitle)
S..... pgssub HDMV Presentation Graphic Stream subtitles (codec hdmv_pgs_subtitle)
S..... jacosub JACOsub subtitle
S..... microdvd MicroDVD subtitle
S..... mov_text 3GPP Timed Text subtitle
S..... mpl2 MPL2 subtitle
S..... pjs PJS subtitle
S..... realtext RealText subtitle
S..... sami SAMI subtitle
S..... srt SubRip subtitle with embedded timing
S..... ass SSA (SubStation Alpha) subtitle (codec ssa)
S..... subrip SubRip subtitle
S..... subviewer SubViewer subtitle
S..... subviewer1 SubViewer1 subtitle
S..... text Raw text subtitle
S..... vplayer VPlayer subtitle
S..... webvtt WebVTT subtitle
S..... xsub XSUB