【问题标题】:Gstreamer multiple sinks not workingGstreamer 多个接收器不起作用
【发布时间】:2017-09-06 01:22:19
【问题描述】:

我正在尝试从网络摄像头获取流,然后使用 tee 获取两个接收器(filesink 和 autovideosink),这样我就可以在窗口中可视化视频,同时将其保存到文件夹中。当我运行这个命令时,我在窗口中只得到一个冻结的图像,而不是一个视频流。它适用于两个自动视频接收器(我得到两个带有两个视频流的窗口)所以我猜问题出在文件接收器部分。文件接收器可以单独工作。

gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
    t. ! queue ! videoscale ! video/x-raw,framerate=30/1,width=320,height=240 ! \
    videoconvert ! autovideosink \
    t. ! queue ! video/x-raw,framerate=30/1,width=320,height=240 ! \
    x264enc ! mpegtsmux ! filesink location=~/Videos/test1.mp4

【问题讨论】:

标签: gstreamer tee


【解决方案1】:

尝试将async=0 属性添加到文件接收器。

    gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
    t. ! queue ! videoscale ! video/x-raw,framerate=30/1,width=320,height=240 ! \
    videoconvert ! autovideosink \
    t. ! queue ! video/x-raw,framerate=30/1,width=320,height=240 ! \
    x264enc ! mpegtsmux ! filesink **async=0** location=~/Videos/test1.mp4

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-14
    • 1970-01-01
    • 1970-01-01
    • 2018-02-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多