1

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

Yuutsuna
  • 192
  • 2
  • 13

1 Answers1

1

The syntax

! caps !

in gst-launch automatically creates a capsfilter element.

In your Rust code, you would create the capsfilter element explicitly.

jpa
  • 10,351
  • 1
  • 28
  • 45
  • I read the documentation and found that the element has the property "caps" and by setting it to "video/x-h264" it works. Thanks for your answer I was not aware it was an element but it makes sense. – Yuutsuna Mar 10 '22 at 14:38