我正在尝试在centos 7服务器上使用ffmpeg将多个.webm视频合并为单个视频。我有txt文件,例如: video.txt
file upload_0d62886ccceb71117f93e08f6ce40ed4.webm
file upload_0dc5935ea564aa105484b17cf0eae2cb.webm
file upload_0dc89839a1cb1d1cb84649c966b03f9b.webm
file upload_eefa16438205bcead017145b7d15ec58.webm
我对concat使用以下命令:
ffmpeg -f concat -safe 0 -i video.txt -c copy output.webm
然后我得到以下输出
ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg -
-incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --
arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -
fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-
switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-
libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --
enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-
ladspa --enable-libass --enable-libcdio --enable-libdc1394 --disable-
indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --
enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --
enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --
enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --
enable-postproc --enable-pthreads --disable-static --enable-shared --enable-
gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-
runtime-cpudetect
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
从“ video.txt”输入#0,concat: 持续时间:N / A,开始:0.000000,比特率:N / A 流#0:0(eng):音频:作品,48000 Hz,单声道,fltp 流#0:1(eng):视频:h264(受约束的基线),yuv420p,640x480,SAR 1:1 DAR 4:3、30.30 fps,30 tbr,1k tbn,60 tbc [webm @ 0x708120]流0的编解码器不使用全局头,但是 容器格式需要全局标题 [webm @ 0x708120]流1的编解码器不使用全局头,但是 容器格式需要全局标题 [webm @ 0x708120]仅VP8或VP9视频以及Vorbis或Opus音频和WebVTT WebM支持字幕。 输出#0,webm,到'output.webm': 元数据: 编码器:Lavf56.40.101 流#0:0(eng):视频:h264,yuv420p,640x480 [SAR 1:1 DAR 4:3],q = 2-31、30.30 fps,30 tbr,1k tbn,1k tbc 流#0:1(eng):音频:作品,48000 Hz,单声道 流映射: 流#0:1->#0:0(复制) 流#0:0->#0:1(复制) 无法写入输出文件#0的标头(编解码器参数不正确?): 参数无效