1

我正在尝试为 ffmpeg 找到一个工作示例来组合分辨率不同的 4 个视频(2x2 堆栈)和 9 个视频(3x3 堆栈)。

对于 2x2 示例,我目前正在使用文档示例,但它仅适用于所有视频的分辨率相同的情况。见命令

ffmpeg -i top_l.mp4 -i top_r.mp4 -i bottom_l.mp4 -i bottom_r.mp4 -i audio.mp4 \ -filter_complex "[0:v][1:v]hstack[t];[2:v][3:v]hstack[b];[t][b]vstack[v]" \ -map "[v]" -an -sn -shortest -f flv rtmp://server/stream

这不适用于我的视频输入,并出现以下错误。

[Parsed_vstack_2 @ 0000000003245cc0] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 0000000003245cc0] Failed to configure output pad on Parsed_vstack_2 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while decoding stream #3:0: Invalid argument [Parsed_vstack_2 @ 00000000033fec20] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 00000000033fec20] Failed to configure output pad on Parsed_vstack_2 Error reinitializing filters! Error while filtering: Invalid argument [Parsed_vstack_2 @ 00000000033feb40] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 00000000033feb40] Failed to configure output pad on Parsed_vstack_2 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while decoding stream #0:0: Invalid argument [Parsed_vstack_2 @ 00000000033fec20] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 00000000033fec20] Failed to configure output pad on Parsed_vstack_2 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while decoding stream #1:0: Invalid argument [Parsed_vstack_2 @ 00000000033fece0] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 00000000033fece0] Failed to configure output pad on Parsed_vstack_2 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while decoding stream #2:0: Invalid argument [Parsed_vstack_2 @ 00000000033ff1c0] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 00000000033ff1c0] Failed to configure output pad on Parsed_vstack_2 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while decoding stream #3:0: Invalid argument Finishing stream 0:0 without any data written to it. [Parsed_vstack_2 @ 00000000033fec20] Input 1 width 1440 does not match input 0 width 1264. [Parsed_vstack_2 @ 00000000033fec20] Failed to configure output pad on Parsed_vstack_2 Error configuring filter graph Conversion failed!

另外,如果有人知道如何进行 3x3 堆栈,请随时发表评论。

4

0 回答 0