如何在 Rust 中指定 Gstreamer 的上限?
当我这样做时:
gst-launch-1.0 v4l2src ! videoconvert ! waylandink
我从 gst-device-monitor-1.0
获得视频流,我可以说它是 video/x-raw
当我这样做时:
gst-launch-1.0 v4l2src ! video/x-h264 ! avdec_h264 ! videoconvert ! waylandink
我得到编码流而不是原始的。
我的问题是:如何在 Rust 中为我的源元素指定上限 video/x-h264
? 我可以使用 set-property
方法更改宽度、高度或帧速率,但我找不到如何从 raw 更改为 h264
When I do:
gst-launch-1.0 v4l2src ! videoconvert ! waylandink
I get a video stream and from gst-device-monitor-1.0
I can say it's video/x-raw
When I do:
gst-launch-1.0 v4l2src ! video/x-h264 ! avdec_h264 ! videoconvert ! waylandink
I get the encoded stream instead of the raw one.
My question is: how can I specify the caps video/x-h264
for my source element in Rust?
I can use the set-property
method to change the width, height, or framerate but I can't find how to change from raw to h264
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
gst-launch
中的语法会自动创建 capsfilter 元件。
在 Rust 代码中,您将显式创建
capsfilter
元素。The syntax
in
gst-launch
automatically creates a capsfilter element.In your Rust code, you would create the
capsfilter
element explicitly.