我正在尝试使用一系列水印连接任意数量的视频:
ffmpeg -i segment0.mp4 -i segment1.mp4 -i ... segmentn.mp4 -i end.mp4 -i ../../watermark/watermark1280/watermark_%05d.png -filter_complex "[0:v][1:v]...[n:v]concat=n=n:v=1:a=0 [v], [v] overlay [p]" -map "[v]" -an -y output.mp4
我收到以下错误:
Stream specifier ':v' in filtergraph description [0:v][1:v]...[n:v]concat=n=n:v=1:a=0 [v], [v] overlay [p] matches no streams.
以下是我最近尝试的完整输出:
ffmpeg version N-78734-g666e2ed Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 25.101 / 57. 25.101
libavformat 57. 26.100 / 57. 26.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 36.100 / 6. 36.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'segment0.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:02.01, start: 0.010000, bitrate: 6 kb/s
Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'segment1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:01.99, start: 0.066000, bitrate: 5014 kb/s
Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv), 1280x720, 5008 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
Metadata:
handler_name : VideoHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'segment2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:02.01, start: 0.009000, bitrate: 424 kb/s
Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1111 kb/s, 59 fps, 59 tbr, 15104 tbn, 118 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'segment3.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:01.85, start: 0.205000, bitrate: 5058 kb/s
Stream #3:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv), 1280x720, 5050 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
Metadata:
handler_name : VideoHandler
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from 'segment4.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:01.77, start: 0.282000, bitrate: 5174 kb/s
Stream #4:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv), 1280x720, 5167 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
Metadata:
handler_name : VideoHandler
Input #5, mov,mp4,m4a,3gp,3g2,mj2, from 'segment5.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:02.01, start: 0.006000, bitrate: 955 kb/s
Stream #5:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1448 kb/s, 59 fps, 59 tbr, 15104 tbn, 118 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #5:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #6, mov,mp4,m4a,3gp,3g2,mj2, from '../../slate/Void_test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.26.100
Duration: 00:00:02.97, start: 0.000000, bitrate: 3176 kb/s
Stream #6:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 3169 kb/s, 59.94 fps, 59.94 tbr, 11988 tbn, 119.88 tbc (default)
Metadata:
handler_name : VideoHandler
Input #7, image2, from '../../watermark/watermark1280/watermark_%05d.png':
Duration: 00:00:14.40, start: 0.000000, bitrate: N/A
Stream #7:0: Video: png, ya8(pc), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream specifier ':v' in filtergraph description [0:v][1:v][2:v][3:v][4:v][5:v][6:v]concat=n=7:v=1:a=0 [v], [v] overlay [p] matches no streams.
另外,如果有人可以通过整个连接视频的单个mp3音频输入来帮助我这样做,那也很有用。
答案 0 :(得分:0)
此外,如果有人可以通过单个mp3音频输入帮我做到这一点 在整个连接的视频中,这也很有帮助。
如果您将mp3输入为n + 1输入,则最后应添加-map n+1:a
。
实际上你写-map "[v]"
是你真正想要的还是你需要写-map [p]
?