更改 WAV 文件的编解码器

更改 WAV 文件的编解码器

有没有办法更改 WAV 文件的编解码器/格式?我可以使用ffmpeg其他方法吗?

RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 8000 Hz

RIFF (little-endian) data, WAVE audio, ITU G.711 u-law, mono 8000 Hz

更新

root]# ffmpeg -codecs
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-shared --disable-static --enable-amr_nb
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Dec  7 2007 16:31:16, gcc: 3.2.3 20030502 (Red Hat Linux 3.2.3-24)
ffmpeg: missing argument for option '-codecs'

更新2:当我尝试时,会发生以下情况

root]#ffmpeg -i 110.wav -c:a pcm_mulaw new.wav
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-shared --disable-static --enable-amr_nb
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Dec  7 2007 16:31:16, gcc: 3.2.3 20030502 (Red Hat Linux 3.2.3-24)
Input #0, wav, from '110.wav':
Duration: 00:00:06.8, start: 0.000000, bitrate: 64 kb/s
Stream #0.0: Audio: pcm_u8, 8000 Hz, mono, 64 kb/s
ffmpeg: unrecognized option '-c:a'

答案1

这很简单:

ffmpeg -i input.wav -c:a pcm_mulaw output.wav

检查ffmpeg -codecs支持的编解码器列表。E列表中的 表示编码支持。

相关内容