Discussion:
x264 [error]: baseline profile doesn't support 4:2:2
Dengke Du
2018-12-06 07:11:53 UTC
Permalink
Hi all

Gstreamer version: 1.14.2

My problem:

test-launch program from gst-rtsp-server-1.14.2

$ GST_DEBUG=2 ./test-launch "( v4l2src !
video/x-raw,format=YUY2,width=640,height=480 ! videoconvert ! x264enc !
rtph264pay name=pay0 pt=96 )"

stream ready at rtsp://127.0.0.1:8554/test
x264 [error]: baseline profile doesn't support 4:2:2
0:00:04.580719380 782721 0x7f2e3801a0f0 WARN x264enc
gstx264enc.c:1807:gst_x264_enc_init_encoder:<x264enc0> Bad downstream
profile name: baseline
0:00:05.359546191 782721 0x7f2e3801a0f0 WARN v4l2src
gstv4l2src.c:976:gst_v4l2src_create:<v4l2src0> lost frames detected:
count = 1 - ts: 0:00:00.776213683
0:00:07.479041838 782721       0x6d0590 WARN rtspmedia
rtsp-media.c:3861:gst_rtsp_media_suspend: media 0x7f2e4003c2d0 was not
prepared
0:00:20.580574293 782721       0x6d0590 WARN rtspmedia
rtsp-media.c:4143:gst_rtsp_media_set_state: media 0x7f2e4003c2d0 was not
prepared

My device:

$ v4l2-ctl --list-formats

ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUYV 4:2:2

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : Motion-JPEG

-----------------------------------------------------------------------

I searched in gst-plugins-ugly-1.14.2:  ext/x264/gstx264enc.c:

https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/tree/ext/x264/gstx264enc.c?h=1.14#n2282

The encoder's peer_profile was set as 'baseline' according to |[
GstVideoCodecState * state ] from the previous element.|

|and in x264 source code:|

|https://github.com/mirror/x264/blob/master/common/base.c#L721|

|The x264 compare the profile and i_csp, found missing pair, so give the
"x264 [error]: baseline profile doesn't support 4:2:2"
|

|I was strange if the device give the missing pair from v4l2src element?
|
Gst
2018-12-06 09:52:19 UTC
Permalink
Hi dengke,

Use caps filter "video/x-raw,format=i420" between video convert and x264enc.
This should resolve the format issue.

If u want 264 main porofile then use caps filter
"video/x-h264,profile=main" this would give 4 2 2 video




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/

Loading...