我找遍了所有的地方,没有发现任何人使用gstreamer的videomixer函数和raspberry pi的raspivid。
我正在尝试复制raspivid输出并将它们并排合并,然后最终通过tcp发送一个流。但现在,我只是在寻找一些帮助,让视频合成工作。
对于我的特定应用程序,生成的视频应该是1280x568,我并不关心视频之间是否有任何角度来创建"3d效果“,因为这对于我正在制作的特定应用程序并不是必需的。
我使用的是gstreamer 1.2,所以函数调用是gst-launch-1.0,我不能使用ffmpeg b/c,我相信它已经失效了,所以我假设我会使用videoconvert来达到同样的效果。
我不确定我是否应该使用h264parse而不是decodebin。到目前为止,我得到的是:gst-launch-1.0 fdsrc | raspivid -t 0 -h 568 -w 640 -fps 25 -hf -b 2000000 -o - ! decodebin ! queue ! videoconvert ! videobox border-alpha=0 right=-640 ! videomixer name=mix ! videoconvert ! autovideosink fdsrc | raspivid -t 0 -h 568 -w 640 -fps 25 -hf -b 2000000 -o - ! decodebin ! queue ! videoconvert ! videobox border-alpha=0 left=-640 ! mix.
我尝试基于这两个源对此进行建模(第一个链接中的raspivid命令对我有效):http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-camera/streaming-video-using-gstreamer http://www.technomancy.org/gstreamer/playing-two-videos-side-by-side/
我知道我可能离得太远了,但我很难找到如何做到这一点的示例,特别是使用raspivid函数。如果有任何帮助,我将不胜感激。谢谢。
发布于 2014-07-25 05:49:50
你可以找到一个例子,解释如何使用videomixer using videomixer
发布于 2021-03-31 14:45:48
使用videomixer组合3个视频的示例
注意:本例中使用的是UNIX路径
gst-launch-1.0 -e \
videomixer name=mix background=0 \
sink_1::xpos=0 sink_1::ypos=0 \
sink_2::xpos=200 sink_2::ypos=0 \
sink_3::xpos=100 sink_3::ypos=100 \
! autovideosink \
uridecodebin uri='file:///data/big_buck_bunny_trailer-360p.mp4' \
! videoscale \
! video/x-raw,width=200,height=100 \
! mix.sink_1 \
uridecodebin uri='file:///data/sintel_trailer-480p.webm' \
! videoscale \
! video/x-raw,width=200,height=100 \
! mix.sink_2 \
uridecodebin uri='file:///data/the_daily_dweebs-720p.mp4' \
! videoscale \
! video/x-raw,width=200,height=100 \
! mix.sink_3https://stackoverflow.com/questions/24879493
复制相似问题