我已经使用 Audacity 将声音文件导出到 microsoft wav。我正在尝试使用 ffmpeg 打开此文件:
ffmpeg -i steps-stereo-16b-44khz.wav /tmp/test.ogg
这是我得到的输出:
fmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 12 2013 13:46:11 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-libfreetype --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[dca @ 0x7fd30c013600] Not a valid DCA frame
... SNIP ...
[dca @ 0x7fd5bc013600] Invalid bit allocation index
[dca @ 0x7fd5bc013600] error decoding block
Last message repeated 3 times
[dca @ 0x7fd5bc013600] Didn't get subframe DSYNC
[dca @ 0x7fd5bc013600] error decoding block
[wav @ 0x7fd5bc013000] max_analyze_duration 5000000 reached at 5009070 microseconds
[wav @ 0x7fd5bc013000] decoding for stream 0 failed
[wav @ 0x7fd5bc013000] Could not find codec parameters for stream 0 (Audio: dts ([1][0][0][0] / 0x0001), 192000 Hz, 2 channels, fltp, 0 kb/s): no decodable DTS frames
Consider increasing the value for the 'analyzeduration' and 'probesize' options
steps-stereo-16b-44khz.wav: could not find codec parameters
如果我将相同的文件导出到 .ogg 或 .aiff,没问题,以下工作正常:
ffmpeg -i steps-stereo-16b-44khz.aiff /tmp/test.ogg
知道有什么问题吗?
指向我的wav 文件的链接,以便您尝试重现。
注意我的最终目标是分割音频文件。我知道我可以大胆地将文件直接导出到 .ogg。这只是一个测试用例。
编辑
使用 sox 等其他程序获取文件信息效果很好:
sox --info steps-stereo-16b-44khz.wav
Input File : 'steps-stereo-16b-44khz.wav'
Channels : 2
Sample Rate : 44100
Precision : 16-bit
Duration : 00:00:02.10 = 92608 samples = 157.497 CDDA sectors
File Size : 370k
Bit Rate : 1.41M
Sample Encoding: 16-bit Signed Integer PCM