0

这是在视频盒中播放的 2 个 mp4 视频的代码。

gst-launch-1.0 文件rc location=1.mp4 !解码器!队列 !视频转换!视频框边框-alpha=0 右=-100 !视频混合器名称=混合!视频转换!autovideosink 文件rc location=2.mp4 !解码器!队列 !视频转换!视频框边框-alpha=0 左=-100 !混合。

我尝试使用此代码播放 3 个视频

gst-launch-1.0 filesrc 位置=下载/1.mp4 !解码器!队列 !视频转换!视频框边框-alpha=0 右=-100 !视频混合器名称=混合!

视频转换!autovideosink filesrc location=Downloads/2.mp4 !解码器!队列 !视频转换!视频框边框-alpha=0 左=-100 !混合 !

视频转换!autovideosink filesrc location=Downloads/3.mp4 !解码器!队列 !视频转换!视频框边框-alpha=0 左=-200 !混合。

我收到语法错误:(

4

2 回答 2

1

与 videomixer 类似的东西

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:54:28.670 回答
0

一旦你用一个名字(例如 )实例化一个元素videomixer name=mix,你以后可以用 . (例如。mix.)。之后您无需重复autovideosink3 次。

gst-launch-1.0 filesrc location=Downloads/1.mp4 ! decodebin ! queue ! videoconvert ! videobox border-alpha=0 right=-100 ! videomixer name=mix ! videoconvert ! autovideosink 

               filesrc location=Downloads/2.mp4 ! decodebin ! queue ! videoconvert ! videobox border-alpha=0 left=-100 ! mix. 

               filesrc location=Downloads/3.mp4 ! decodebin ! queue ! videoconvert ! videobox border-alpha=0 left=-200 ! mix.

在这里,我们初始化了 3 个管道,并将其中的三个与mixelement 合并。

于 2018-10-17T10:53:37.290 回答