尝试使用 ffmpeg 修剪 WAV 文件时出现“无法找到合适的输出格式”错误

尝试使用 ffmpeg 修剪 WAV 文件时出现“无法找到合适的输出格式”错误

这是我的命令:

ffmpeg -i /path/to/filename.wav -vn -acodec copy -ss 00:00:00 -t 00:13:00 /path/to/filename-0.wav

当我运行它时出现以下错误:

[NULL @ 0x55dfa3f27c80] Unable to find a suitable output format for '/path/to/filename-0.wav'

这是错误发生之前的输出:

ffmpeg version 3.2.18-0+deb9u1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version=0+deb9u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from '/path/to/filename.wav':
  Duration: 00:14:07.60, bitrate: 128 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s

无法剪切 WAV 文件吗?将 WAV 文件转换为 MP3 是我唯一的选择吗?

答案1

尝试通过添加来明确告诉它输出到 wav-f wav

ffmpeg -i /path/to/filename.wav -vn -acodec copy -ss 00:00:00 -t 00:13:00 /path/to/filename-0.wav

相关内容