0

我到处搜索,没有找到任何人使用 gstreamer 的 videomixer 功能和树莓派的 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 函数。我将不胜感激任何帮助。谢谢你。

4

2 回答 2

0

You can find a exemple, with some explaination how to use videomixer using videomixer

于 2014-07-24T21:49:50.070 回答
0

使用 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_3
于 2021-03-31T06:45:48.403 回答