ffmpeg xstack 过滤器布局限制

ffmpeg xstack filter layout limitations

我正在尝试使用各种布局合并多个视频。我发现了一个问题,即布局太大会导致输出失败。即使启用调试日志,我也看不到明确的错误是什么。我假设在将输入分散得足够远时,我达到了分辨率 and/or 大小限制。是否有一些文档概述了 xstack 布局的限制或一些其他文档阐明了我遇到的不同的固有 ffmpeg 限制?使用完全相同的输入但使用较小的布局会成功。

FWIW 我正在使用 ffmpeg-python 包装器库。

这是我在这些失败期间看到的详细输出:

ffmpeg version 5.0-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument '4.mp4'.
Reading option '-i' ... matched as input url with argument '1.mp4'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0][1]xstack=fill=#171f29:inputs=2:layout=4_2|2986_1838[s0]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '[s0]'.
Reading option '/video/16/Untitled_sans_text.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option filter_complex (create a complex filtergraph) with argument [0][1]xstack=fill=#171f29:inputs=2:layout=4_2|2986_1838[s0].
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url 4.mp4.
Successfully parsed a group of options.
Opening an input file: 4.mp4.
[NULL @ 0x69bf840] Opening '4.mp4' for reading
[file @ 0x69c0040] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] Processing st: 0, edit list 0 - media time: 0, duration: 2310144
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] Before avformat_find_stream_info() pos: 8429176 bytes read:34169 seeks:1 nb_streams:1
[h264 @ 0x69c0d80] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x69c0d80] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x69c0d80] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x69c0d80] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x69c0d80] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x69c0d80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69c0d80] Format yuv420p chosen by get_format().
[h264 @ 0x69c0d80] Reinit context to 864x800, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69bf840] After avformat_find_stream_info() pos: 37782 bytes read:71903 seeks:2 frames:1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '4.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:02:21.00, start: 0.000000, bitrate: 478 kb/s
  Stream #0:0[0x1](und), 1, 1/16384: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-1, progressive, left), 864x788 (864x800), 0/1, 478 kb/s, 1 fps, 1 tbr, 16384 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: input url 1.mp4.
Successfully parsed a group of options.
Opening an input file: 1.mp4.
[NULL @ 0x69f1d40] Opening '1.mp4' for reading
[file @ 0x6a21a00] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] Processing st: 0, edit list 0 - media time: 0, duration: 2473984
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] Before avformat_find_stream_info() pos: 9015166 bytes read:34209 seeks:1 nb_streams:1
[h264 @ 0x69e4800] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x69e4800] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x69e4800] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x69e4800] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x69e4800] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x69e4800] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69e4800] Format yuv420p chosen by get_format().
[h264 @ 0x69e4800] Reinit context to 864x800, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x69f1d40] After avformat_find_stream_info() pos: 35499 bytes read:69660 seeks:2 frames:1
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:02:31.00, start: 0.000000, bitrate: 477 kb/s
  Stream #1:0[0x1](und), 1, 1/16384: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-1, progressive, left), 864x788 (864x800), 0/1, 477 kb/s, 1 fps, 1 tbr, 16384 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
Successfully opened the file.
[Parsed_xstack_0 @ 0x69e3040] Setting 'fill' to value '#171f29'
[Parsed_xstack_0 @ 0x69e3040] Setting 'inputs' to value '2'
[Parsed_xstack_0 @ 0x69e3040] Setting 'layout' to value '4_2|2986_1838'
Parsing a group of options: output url /video/16/Untitled_sans_text.mp4.
Applying option map (set input stream mapping) with argument [s0].
Successfully parsed a group of options.
Opening an output file: /video/16/Untitled_sans_text.mp4.
[file @ 0x69d1900] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 6 logical cores
[h264 @ 0x69f5040] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x69f5040] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x71b8740] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x71b8740] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
  Stream #0:0 (h264) -> xstack
  Stream #1:0 (h264) -> xstack
  xstack:default -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69f5040] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69f5040] Format yuv420p chosen by get_format().
[h264 @ 0x69f5040] Reinit context to 864x800, pix_fmt: yuv420p
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x70e7a80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x71b8740] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x71b8740] Format yuv420p chosen by get_format().
[h264 @ 0x71b8740] Reinit context to 864x800, pix_fmt: yuv420p
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x76c0b80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[Parsed_xstack_0 @ 0x7ad45c0] Setting 'fill' to value '#171f29'
[Parsed_xstack_0 @ 0x7ad45c0] Setting 'inputs' to value '2'
[Parsed_xstack_0 @ 0x7ad45c0] Setting 'layout' to value '4_2|2986_1838'
[graph 0 input from stream 0:0 @ 0x7ad5800] Setting 'video_size' to value '864x788'
[graph 0 input from stream 0:0 @ 0x7ad5800] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x7ad5800] Setting 'time_base' to value '1/16384'
[graph 0 input from stream 0:0 @ 0x7ad5800] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x7ad5800] Setting 'frame_rate' to value '1/1'
[graph 0 input from stream 0:0 @ 0x7ad5800] w:864 h:788 pixfmt:yuv420p tb:1/16384 fr:1/1 sar:0/1
[graph 0 input from stream 1:0 @ 0x7ad6580] Setting 'video_size' to value '864x788'
[graph 0 input from stream 1:0 @ 0x7ad6580] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 1:0 @ 0x7ad6580] Setting 'time_base' to value '1/16384'
[graph 0 input from stream 1:0 @ 0x7ad6580] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 1:0 @ 0x7ad6580] Setting 'frame_rate' to value '1/1'
[graph 0 input from stream 1:0 @ 0x7ad6580] w:864 h:788 pixfmt:yuv420p tb:1/16384 fr:1/1 sar:0/1
[format @ 0x7ad7600] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
[AVFilterGraph @ 0x7ad34c0] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
[Parsed_xstack_0 @ 0x7ad45c0] [framesync @ 0x7ad4798] Selected 1/16384 time base
[Parsed_xstack_0 @ 0x7ad45c0] [framesync @ 0x7ad4798] Sync level 1
[libx264 @ 0x69f3b40] using mv_range_thread = 136
[libx264 @ 0x69f3b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x69f3b40] profile High, level 6.0, 4:2:0, 8-bit
[libx264 @ 0x69f3b40] 264 - core 164 r3081 19856cc - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/video/16/Untitled_sans_text.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Stream #0:0, 0, 1/16384: Video: h264, 1 reference frame (avc1 / 0x31637661), yuv420p(progressive), 3850x2626 (0x0), 0/1, q=2-31, 1 fps, 16384 tbn
    Metadata:
      encoder         : Lavc59.18.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Clipping frame in rate conversion by 0.000008
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x70e7a80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x76c0b80] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x70e7a80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x76c0b80] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x70e7a80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x76c0b80] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x76c0b80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x70e7a80] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
...
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   0 QP=3.66 NAL=3 Slice:I Poc:0   I:39765 P:0    SKIP:0    size=204347 bytes
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   1 QP=7.68 NAL=2 Slice:P Poc:8   I:1201 P:4090 SKIP:34474 size=196520 bytes
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   2 QP=9.03 NAL=2 Slice:B Poc:4   I:0    P:219  SKIP:39546 size=611 bytes
[h264 @ 0x76c0b80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x70e7a80] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   3 QP=16.00 NAL=0 Slice:B Poc:2   I:0    P:1    SKIP:39764 size=289 bytes
[h264 @ 0x69f5040] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x71b8740] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   4 QP=16.00 NAL=0 Slice:B Poc:6   I:0    P:31   SKIP:39734 size=300 bytes
[h264 @ 0x69d7380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x72b3cc0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   5 QP=9.36 NAL=2 Slice:P Poc:16  I:0    P:702  SKIP:39063 size=5286 bytes
[h264 @ 0x6a04240] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7383240] nal_unit_type: 5(IDR), nal_ref_idc: 3.00 bitrate= 699.2kbits/s speed=1.08x    
[libx264 @ 0x69f3b40] frame=   6 QP=8.61 NAL=2 Slice:B Poc:12  I:0    P:454  SKIP:39311 size=611 bytes
[h264 @ 0x6a18680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x74528c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   7 QP=16.00 NAL=0 Slice:B Poc:10  I:0    P:384  SKIP:39381 size=514 bytes
[h264 @ 0x6bc7d00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7521f00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[libx264 @ 0x69f3b40] frame=   8 QP=16.00 NAL=0 Slice:B Poc:14  I:0    P:36   SKIP:39729 size=306 bytes
[h264 @ 0x6bdc140] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x75f1540] nal_unit_type: 5(IDR), nal_ref_idc: 3
2022-04-06 22:37:08,458 /app/movie_services/make_movie.py:118 ERROR COMBINED VIDEO FAILED
2022-04-06 22:37:08,461 /app/movie_services/make_movie.py:119 ERROR ffmpeg error (see stderr output for detail)```

仅供参考,您的过滤器工作 error-free 使用测试源:

from ffmpegio import ffmpeg

ffmpeg(["-y", 
        "-f", "lavfi", "-i", "smptebars=s=864x800",
        "-f", "lavfi", "-i", "pal100bars=s=864x800",
        "-filter_complex", "[0][1]xstack=fill=#171f29:inputs=2:layout=4_2|2986_1838[s0]",
        "-map", "[s0]",
        "-vframes", "1",
        "sandbox/OutputFile.png"])

使用输出文件配置:

Output #0, image2, to 'sandbox/OutputFile.png':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0: Video: png, rgb24(pc, gbr/unknown/unknown, progressive), 3850x2638 [SAR 1:1 DAR 1925:1319], q=2-31, 200 kb/s, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc59.18.100 png

所以,我怀疑您的输入文件有问题,特别是重复出现的消息:

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

指向罪魁祸首IMO。您可以尝试在 xstack 之后(或两个输入之前)添加 setpts=N/TB 以查看是否可以解决问题。