简体   繁体   English

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

[英]ffmpeg: How to chain vstack with other options in _filter_complex

I am using an RTSP input stream and divide it in two identical.我正在使用 RTSP 输入 stream 并将其分成两个相同的部分。 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:所以两个流 [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]" \

No I am trying to create a stream from [a] and [b] called [c] to stack both together:不,我正在尝试从 [a] 和 [b] 中创建一个名为 [c] 的 stream 以将两者堆叠在一起:

-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 第三个 stream 处理它

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

@kesh: Thanks! @kesh:谢谢!

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]" ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM