JonasVautherin
JonasVautherin

Reputation: 8033

x264 [error]: baseline profile doesn't support 4:2:2

I can play the video stream from my UVC camera using the following:

gst-launch-1.0 v4l2src device=/dev/video4 ! decodebin ! autovideosink

Now, I would like to convert the stream to h264, in order to pipe it further (i.e. not necessarily to autovideosink). But when I do the following:

gst-launch-1.0 v4l2src device=/dev/video4 ! videoconvert ! x264enc ! decodebin ! autovideosink

I get the error:

x264 [error]: baseline profile doesn't support 4:2:2

What am I missing?

Upvotes: 1

Views: 4033

Answers (1)

JonasVautherin
JonasVautherin

Reputation: 8033

You can force the use of 4:2:0 by setting caps between videoconvert and x264enc, like so:

gst-launch-1.0 v4l2src device=/dev/video4 ! videoconvert ! videoconvert ! video/x-raw,format=I420 ! x264enc ! decodebin ! autovideosink

Note: "4:2:2" specifies the "chroma subsampling", and there are nice comparisons here.

Definition:

Chroma subsampling is a type of compression that reduces the color information in a signal in favor of luminance data. This reduces bandwidth without significantly affecting picture quality.

Upvotes: 2

Related Questions