使用 ffmpeg 连接 flac、opus、wav 文件部分

使用 ffmpeg 连接 flac、opus、wav 文件部分

我尝试用以下命令连接两个 flac 文件:

ffmpeg -i 1.flac -i 2.flac -filter_complex '[0:0][1:0]concat=n=2:a=1[out]' -map '[out]' -c:a copy out.flac

我收到以下错误信息:

Stream specifier ':0' in filtergraph description [0:0][1:0]concat=n=2:a=0[out] matches no streams.

我将这些文件转换为后尝试使用这些文件wave。失败了,错误消息类似。

ffmpeg --version
ffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11.2.0 (GCC)           
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 
--docdir=/usr/doc/ffmpeg-4.4.2 --mandir=/usr/man --enable-gpl 
--enable-version3 --enable-avfilter --enable-avresample 
--enable-libmp3lame --enable-libass --enable-libdav1d 
--enable-libdc1394 --enable-libdrm --enable-libfribidi --enable-libgme 
--enable-libgsm --enable-libmfx --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus 
--enable-librsvg --enable-libsmbclient --enable-libssh --enable-libspeex 
--enable-libtheora --enable-libv4l2 --enable-libvo-amrwbenc 
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 
--enable-libzvbi --enable-postproc --enable-runtime-cpudetect 
--enable-sdl2 --enable-vaapi --enable-vdpau --enable-pthreads 
--enable-bzlib --enable-zlib --enable-shared --enable-static 
--disable-debug --enable-libbluray --enable-frei0r --enable-openal 
--enable-opencl --enable-libpulse --enable-libvidstab --enable-libwebp 
--enable-gnutls --arch=x86_64 --enable-pic 
--extra-cflags='-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include 
-I/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/include/SDL2 
-DRUNTIME_CPUDETECT' --extra-ldflags=
'-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib64 -lpthread -ldl -lssl 
-lcrypto -lz -lusb -ldrm' --pkg-config-flags=--static
 libavutil      56. 70.100 / 56. 70.100
 libavcodec     58.134.100 / 58.134.100
 libavformat    58. 76.100 / 58. 76.100
 libavdevice    58. 13.100 / 58. 13.100
 libavfilter     7.110.100 /  7.110.100
 libavresample   4.  0.  0 /  4.  0.  0
 libswscale      5.  9.100 /  5.  9.100
 libswresample   3.  9.100 /  3.  9.100
 libpostproc    55.  9.100 / 55.  9.100


ffmpeg -i 1.flac -i 2.flac
...
Input #0, flac, from '1.flac':
  Duration: 00:10:10, start: 0.000000, bitrate: 510 kb/s
  Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Input #1, flac, from '2.flac':
  Duration: 00:20:20, start: 0.000000, bitrate: 493 kb/s
  Stream #1:0: Audio: flac, 44100 Hz, stereo, s16
At least one output file must be specified

相关内容