ffmpeg:如何将 vstack 与 _filter_complex 中的其他选项链接起来

发布于 2025-01-14 07:42:19 字数 667 浏览 3 评论 0原文

我正在使用 RTSP 输入流并将其分成两个相同的。在第一个上我只做了缩放,在第二个上我也做了缩放和特写。因此,两个流 [a] 和 [b] 具有相同的尺寸:

-filter_complex "[0:v]split=2[in1][in2];[in1]scale=800:600[a];[in2]crop=640:360:700:500,scale=800:600[b]" \

不,我正在尝试从 [a] 和 [b] 创建一个名为 [c] 的流,将两者堆叠在一起:

-filter_complex "[0:v]split=2[in1][in2];[in1]scale=800:600[a];[in2]crop=640:360:700:500,scale=800:600[b];[a][b]vstack=inputs=2[c]" \

当第一个有效时,我得到第二个错误消息如下:

Output with label 'a' does not exist in any defined filter graph, or was already used elsewhere.

如何将操作链接到我可以映射第三个流并使用它进行处理

-map "[a]"
-map "[b]"
-map "[c]"

I am using an RTSP input stream and divide it in two identical. On the first one I just do a scaling, on the second one I do a scaling and a close up as well. So both streams [a] and [b] have the same dimensions aferwards:

-filter_complex "[0:v]split=2[in1][in2];[in1]scale=800:600[a];[in2]crop=640:360:700:500,scale=800:600[b]" \

No I am trying to create a stream from [a] and [b] called [c] to stack both together:

-filter_complex "[0:v]split=2[in1][in2];[in1]scale=800:600[a];[in2]crop=640:360:700:500,scale=800:600[b];[a][b]vstack=inputs=2[c]" \

While the first one works, I get the following error message for the second one:

Output with label 'a' does not exist in any defined filter graph, or was already used elsewhere.

How can I chain the operations to that I can map a third stream an process it with

-map "[a]"
-map "[b]"
-map "[c]"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心不设防 2025-01-21 07:42:19

@kesh:谢谢!

我这样修改它并且有效:

-filter_complex "[0:v]split=2[in1][in2];[in1]scale=800:600[a];\ 
 [in2]crop=640:360:700:500,scale=800:600[b];\
 [a]split=2[a1][a2];[b]split=2[b1][b2];[a1][b1]vstack=inputs=2[c]" \

-map "[a2]" ...
-map "[b2]" ...
-map "[c]" ...

@kesh: Thanks!

I modified it like this and it works:

-filter_complex "[0:v]split=2[in1][in2];[in1]scale=800:600[a];\ 
 [in2]crop=640:360:700:500,scale=800:600[b];\
 [a]split=2[a1][a2];[b]split=2[b1][b2];[a1][b1]vstack=inputs=2[c]" \

-map "[a2]" ...
-map "[b2]" ...
-map "[c]" ...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文