Gstreamer hw-accelertor encoding does work under ubuntu 20.04 but not under ubuntu 22.04

Hi,

I am using gstreamer under docker image.
following is my docker image packages:

FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get --no-install-recommends install -y  \
    build-essential \
    gdb \
    gstreamer1.0-plugins-base \
    gstreamer1.0-plugins-good \
    gstreamer1.0-vaapi \
    gstreamer1.0-x \
    intel-gpu-tools \
    intel-media-va-driver-non-free \
    libavcodec-dev \
    libavformat-dev \
    libcairo2-dev \
    libcurl4-openssl-dev \
    libgirepository1.0-dev \
    libgstreamer1.0-0 \
    libgstreamermm-1.0-dev \
    gstreamer1.0-tools \
    libgtk2.0-dev \
    liblz4-dev \
    libmfx-tools \
    libmfx1 \
    libpython3-dev \
    libsasl2-dev \
    libssl-dev \
    libswscale-dev \
    libtool \
    libtool-bin \
    libva-drm2 \
    libva-x11-2 \
    libzstd-dev \
    pkg-config \
    python-gi-dev \
    python3-gi \
    rapidjson-dev \
    vainfo \
    zlib1g-dev

When using ubuntu 20.04, the following cmd flow is working as expected:

gst-launch-1.0 -v videotestsrc  ! 'video/x-raw,width=3840,height=2160,framerate=30000/1001' ! vaapipostproc ! 'video/x-raw(memory:VASurface),width=1920,height=1080' ! queue ! vaapih264enc ! splitmuxsink location=file%003d.mp4 max-size-time=500000000

Migrating to ubuntu 22.04:
FROM ubuntu:22.04

The gstreamer command does not work, not sure if it the ‘vaapih264enc’ or the ‘splitmuxsink’ that fails.

Is it known issue?
How can I check it?
Thanks

How does it “not work”?

Could you post the output?

run
gst-inspect-1.0 vaapipostproc
to see if vaapipostproc exists.

VAAPI is replacing VA-API
try to replace
vaapipostproc with vapostproc
and
vaapih264enc with vah264enc

Thanks tpm & Joe.
@tpm & @Joe “not work” means I do not see any mp4 files created. I was expecting to see
some mp4 files according splitmuxsink element config.

I will add some output prints
First output of the working command (UBUNTU 20)

root@ng-devBeta2:/opt/rv/bin#
root@ng-devBeta2:/opt/rv/bin# export GST_DEBUG="*:3"
root@ng-devBeta2:/opt/rv/bin#
root@ng-devBeta2:/opt/rv/bin#
root@ng-devBeta2:/opt/rv/bin#
root@ng-devBeta2:/opt/rv/bin# gst-launch-1.0 -v videotestsrc  ! video/x-raw,width=3840,height=2160,framerate=30000/1001 ! vaapipostproc ! video/x-raw,width=1920,height=1080 ! queue ! vaapih264enc ! splitmuxsink location=file%003d.mp4 max-size-time=500000000
0:00:00.108606892   263 0x5558f4fc7d50 WARN                   vaapi gstvaapiutils.c:77:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
0:00:00.200011972   262 0x5648d8a7cef0 WARN                   vaapi gstvaapiutils.c:77:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Setting pipeline to PAUSED ...
0:00:00.208507154   262 0x5648d8a7cef0 WARN                   vaapi gstvaapiutils.c:77:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: async = false
0:00:00.215897615   262 0x5648d8afdc00 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Got context from element 'vaapiencodeh264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1";
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0.GstGhostPad:video.GstProxyPad:proxypad0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0.GstGhostPad:video: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer.GstQTMuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer.GstQTMuxPad:video_0: caps = NULL
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: location = file000.mp4
Pipeline is PREROLLED ...
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer.GstQTMuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, codec_data=(buffer)01640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c30, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 6
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 7
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 8
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 9
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 10
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 11
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 12
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 13
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 14
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 15
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 16
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 17
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 18
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 19
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 20
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 21
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 22
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 23
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 24
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 25
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 26
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 27
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 28
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 29
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 31
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue1: max-size-buffers = 31
0:00:00.510082655   262 0x5648d8afdaa0 FIXME               basesink gstbasesink.c:3246:gst_base_sink_default_event:<sink> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer.GstPad:src: caps = video/quicktime, variant=(string)iso
0:00:00.510144394   262 0x5648d8afdaa0 WARN                   qtmux gstqtmux.c:2981:gst_qt_mux_start_file:<muxer> Robust muxing requires reserved-moov-update-period to be set
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink.GstPad:sink: caps = video/quicktime, variant=(string)iso
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMP4Mux:muxer.GstPad:src: caps = video/quicktime, variant=(string)iso, streamheader=(buffer)< 000003f46d6f6f760000006c6d76686400000000e17631e6e17631e600000bb500000bb80001000001000000000000000000000000010000000000000000000000000000000100000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000003437472616b0000005c746b686400000007e17631e6e17631e6000000010000000000000bb800000000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000040000000078000000438000000000024656474730000001c656c7374000000000000000100000bb80000000000010000000002536d646961000000206d64686400000000e17631e6e17631e600000bb500000bb855c400000000002d68646c72000000000000000076696465000000000000000000000000566964656f48616e646c657200000001fe6d696e6600000014766d68640000000100000000000000000000002464696e660000001c6472656600000000000000010000000c75726c2000000001000001be7374626c000000ce737473640000000000000001000000be6176633100000000000000010000000000000000000000000000000007800438004800000048000000000000000100000000000000000000000000000000000000000000000000000000000000000018ffff000000316176634301640028ffe1001a67640028ac5680780225e5ffc00040004400000fa40003a9825001000468ce3c300000001462747274000000000000000001031b1300000013636f6c726e

Following output of the NOT working command (UBUNTU 22)

root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins# export GST_DEBUG="*:3"
root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins# gst-launch-1.0 -v videotestsrc  ! video/x-raw,width=3840,height=2160,framerate=30000/1001 ! vaapipostproc ! video/x-raw,width=1920,height=1080 ! queue ! vaapih264enc ! splitmuxsink location=file%003d.mp4 max-size-time=500000000
0:00:00.006048118  1355 0x55feffe6b320 WARN                   vaapi gstvaapiutils.c:78:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Setting pipeline to PAUSED ...
0:00:00.017255339  1355 0x55feffe6b320 WARN                   vaapi gstvaapiutils.c:78:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
0:00:00.019611279  1355 0x55ff000ba000 WARN              aggregator gstaggregator.c:2099:gst_aggregator_query_latency_unlocked:<muxer> Latency query failed
Pipeline is PREROLLING ...
0:00:00.022857631  1355 0x55feffffe360 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: async = false
Got context from element 'vaapiencodeh264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1", gst.vaapi.Display.GObject=(GstObject)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1";
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)Y412_LE, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)Y412_LE, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:sink: caps = video/x-raw, format=(string)Y412_LE, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)Y412_LE, width=(int)3840, height=(int)2160, framerate=(fraction)30000/1001, multiview-mode=(string)mono, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1
0:00:00.200734342  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:3235:gst_pad_query_accept_caps_default:<muxer:video_0> caps: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono were not compatible with: EMPTY
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
0:00:00.200760378  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:5757:pre_eventfunc_check:<splitmuxsink0:video> caps video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono not accepted
0:00:00.200775985  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:3235:gst_pad_query_accept_caps_default:<muxer:video_0> caps: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono were not compatible with: EMPTY
0:00:00.200786431  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:5757:pre_eventfunc_check:<splitmuxsink0:video> caps video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono not accepted
0:00:00.200792338  1355 0x7fae30597520 WARN                GST_PADS gstpad.c:4351:gst_pad_peer_query:<vaapiencodeh264-0:src> could not send sticky events
0:00:00.200871990  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:3235:gst_pad_query_accept_caps_default:<muxer:video_0> caps: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono were not compatible with: EMPTY
0:00:00.200882634  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:5757:pre_eventfunc_check:<splitmuxsink0:video> caps video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono not accepted
0:00:00.200900571  1355 0x7fae30597520 WARN                GST_CAPS gstpad.c:3235:gst_pad_query_accept_caps_default:<muxer:video_0> caps: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono were not compatible with: EMPTY

Hi @Joe, Thanks for reply
As you can see in the Dokcer file I added, I installed (hopefully) all the necessary packages needed for the gpu use:

intel-gpu-tools \
intel-media-va-driver-non-free \
libva-drm2 \
libva-x11-2 \
vainfo

anyway as I noted, it works under ubuntu 20.04

I added the the prints of gst-inspect-1.0 vaapipostproc below the following issue:

You wrote to replace with vapostproc & vah264enc. I cant see them.
According the Dokcer file & Gstreamer site, version 1.0 is the one to use.
What should I do in order to install the ones you noted. Researching showed me they are version 1.20. But how can I set or what packages should I add to the Docker file in order to have them?
My current Docker file use this version:

libgstreamer1.0-0 \
libgstreamermm-1.0-dev \

OUTPUT of gst-inspect-1.0 vapostproc:

root@ng-devBeta2:/opt/rv/bins# 
root@ng-devBeta2:/opt/rv/bins# gst-inspect-1.0 vapostproc  
No such element or plugin 'vapostproc'
root@ng-devBeta2:/opt/rv/bins# 
root@ng-devBeta2:/opt/rv/bins# 

OUTPUT of gst-inspect-1.0 vaapipostproc:


root@ng-devBeta2:/opt/rv/bins# 
root@ng-devBeta2:/opt/rv/bins# gst-inspect-1.0 vaapipostproc
0:00:00.006714299  1362 0x55ff8c120630 WARN                   vaapi gstvaapiutils.c:78:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Factory Details:
  Rank                     none (0)
  Long-name                VA-API video postprocessing
  Klass                    Filter/Converter/Effect/Video/Scaler/Deinterlace/Hardware
  Description              A VA-API video postprocessing filter
  Author                   Gwenole Beauchesne <gwenole.beauchesne@intel.com>

Plugin Details:
  Name                     vaapi
  Description              VA-API based elements
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
  Version                  1.20.1
  License                  LGPL
  Source module            gstreamer-vaapi
  Source release date      2022-03-14
  Binary package           gstreamer-vaapi
  Origin URL               https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseTransform
                         +----GstVaapiPostproc

Implemented Interfaces:
  GstColorBalance

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:VASurface)
                 format: { (string)ENCODED, (string)NV12, (string)YV12, (string)I420, (string)YUY2, (string)UYVY, (string)Y444, (string)GRAY8, (string)P010_10LE, (string)P012_LE, (string)VUYA, (string)Y210, (string)Y410, (string)Y212_LE, (string)Y412_LE, (string)ARGB, (string)xRGB, (string)RGBA, (string)RGBx, (string)ABGR, (string)xBGR, (string)BGRA, (string)BGRx, (string)RGB16, (string)RGB, (string)BGR10A2_LE }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
         interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }
      video/x-raw
                 format: { (string)ENCODED, (string)NV12, (string)YV12, (string)I420, (string)YUY2, (string)UYVY, (string)Y444, (string)GRAY8, (string)P010_10LE, (string)P012_LE, (string)VUYA, (string)Y210, (string)Y410, (string)Y212_LE, (string)Y412_LE, (string)ARGB, (string)xRGB, (string)RGBA, (string)RGBx, (string)ABGR, (string)xBGR, (string)BGRA, (string)BGRx, (string)RGB16, (string)RGB, (string)BGR10A2_LE }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
         interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }
  
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:VASurface)
                 format: { (string)ENCODED, (string)NV12, (string)YV12, (string)I420, (string)YUY2, (string)UYVY, (string)Y444, (string)GRAY8, (string)P010_10LE, (string)P012_LE, (string)VUYA, (string)Y210, (string)Y410, (string)Y212_LE, (string)Y412_LE, (string)ARGB, (string)xRGB, (string)RGBA, (string)RGBx, (string)ABGR, (string)xBGR, (string)BGRA, (string)BGRx, (string)RGB16, (string)RGB, (string)BGR10A2_LE }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
         interlace-mode: progressive
      video/x-raw(meta:GstVideoGLTextureUploadMeta)
                 format: { (string)RGBA, (string)BGRA }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { (string)ENCODED, (string)NV12, (string)YV12, (string)I420, (string)YUY2, (string)UYVY, (string)Y444, (string)GRAY8, (string)P010_10LE, (string)P012_LE, (string)VUYA, (string)Y210, (string)Y410, (string)Y212_LE, (string)Y412_LE, (string)ARGB, (string)xRGB, (string)RGBA, (string)RGBx, (string)ABGR, (string)xBGR, (string)BGRA, (string)BGRx, (string)RGB16, (string)RGB, (string)BGR10A2_LE }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
         interlace-mode: { (string)progressive, (string)interleaved, (string)mixed }

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  brightness          : The color brightness value
                        flags: readable, writable
                        Float. Range:              -1 -               1 Default:               0 
  contrast            : The color contrast value
                        flags: readable, writable
                        Float. Range:               0 -               2 Default:               1 
  crop-bottom         : Pixels to crop at bottom
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
  crop-left           : Pixels to crop at left
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
  crop-right          : Pixels to crop at right
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
  crop-top            : Pixels to crop at top
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
  deinterlace-method  : Deinterlace method to use
                        flags: readable, writable
                        Enum "GstVaapiDeinterlaceMethod" Default: 1, "bob"
                           (0): none             - Disable deinterlacing
                           (1): bob              - Bob deinterlacing
                           (2): weave            - Weave deinterlacing
                           (3): motion-adaptive  - Motion adaptive deinterlacing
                           (4): motion-compensated - Motion compensated deinterlacing
  deinterlace-mode    : Deinterlace mode to use
                        flags: readable, writable
                        Enum "GstVaapiDeinterlaceMode" Default: 0, "auto"
                           (0): auto             - Auto detection
                           (1): interlaced       - Force deinterlacing
                           (2): disabled         - Never deinterlace
  denoise             : The level of denoising to apply
                        flags: readable, writable
                        Float. Range:               0 -               1 Default:               0 
  force-aspect-ratio  : When enabled, scaling will respect original aspect ratio
                        flags: readable, writable
                        Boolean. Default: true
  format              : The forced output pixel format
                        flags: readable, writable
                        Enum "GstVideoFormat" Default: 1, "encoded"
                           (0): unknown          - GST_VIDEO_FORMAT_UNKNOWN
                           (1): encoded          - GST_VIDEO_FORMAT_ENCODED
                           (2): i420             - GST_VIDEO_FORMAT_I420
                           (3): yv12             - GST_VIDEO_FORMAT_YV12
                           (4): yuy2             - GST_VIDEO_FORMAT_YUY2
                           (5): uyvy             - GST_VIDEO_FORMAT_UYVY
                           (6): ayuv             - GST_VIDEO_FORMAT_AYUV
                           (7): rgbx             - GST_VIDEO_FORMAT_RGBx
                           (8): bgrx             - GST_VIDEO_FORMAT_BGRx
                           (9): xrgb             - GST_VIDEO_FORMAT_xRGB
                           (10): xbgr             - GST_VIDEO_FORMAT_xBGR
                           (11): rgba             - GST_VIDEO_FORMAT_RGBA
                           (12): bgra             - GST_VIDEO_FORMAT_BGRA
                           (13): argb             - GST_VIDEO_FORMAT_ARGB
                           (14): abgr             - GST_VIDEO_FORMAT_ABGR
                           (15): rgb              - GST_VIDEO_FORMAT_RGB
                           (16): bgr              - GST_VIDEO_FORMAT_BGR
                           (17): y41b             - GST_VIDEO_FORMAT_Y41B
                           (18): y42b             - GST_VIDEO_FORMAT_Y42B
                           (19): yvyu             - GST_VIDEO_FORMAT_YVYU
                           (20): y444             - GST_VIDEO_FORMAT_Y444
                           (21): v210             - GST_VIDEO_FORMAT_v210
                           (22): v216             - GST_VIDEO_FORMAT_v216
                           (23): nv12             - GST_VIDEO_FORMAT_NV12
                           (24): nv21             - GST_VIDEO_FORMAT_NV21
                           (25): gray8            - GST_VIDEO_FORMAT_GRAY8
                           (26): gray16-be        - GST_VIDEO_FORMAT_GRAY16_BE
                           (27): gray16-le        - GST_VIDEO_FORMAT_GRAY16_LE
                           (28): v308             - GST_VIDEO_FORMAT_v308
                           (29): rgb16            - GST_VIDEO_FORMAT_RGB16
                           (30): bgr16            - GST_VIDEO_FORMAT_BGR16
                           (31): rgb15            - GST_VIDEO_FORMAT_RGB15
                           (32): bgr15            - GST_VIDEO_FORMAT_BGR15
                           (33): uyvp             - GST_VIDEO_FORMAT_UYVP
                           (34): a420             - GST_VIDEO_FORMAT_A420
                           (35): rgb8p            - GST_VIDEO_FORMAT_RGB8P
                           (36): yuv9             - GST_VIDEO_FORMAT_YUV9
                           (37): yvu9             - GST_VIDEO_FORMAT_YVU9
                           (38): iyu1             - GST_VIDEO_FORMAT_IYU1
                           (39): argb64           - GST_VIDEO_FORMAT_ARGB64
                           (40): ayuv64           - GST_VIDEO_FORMAT_AYUV64
                           (41): r210             - GST_VIDEO_FORMAT_r210
                           (42): i420-10be        - GST_VIDEO_FORMAT_I420_10BE
                           (43): i420-10le        - GST_VIDEO_FORMAT_I420_10LE
                           (44): i422-10be        - GST_VIDEO_FORMAT_I422_10BE
                           (45): i422-10le        - GST_VIDEO_FORMAT_I422_10LE
                           (46): y444-10be        - GST_VIDEO_FORMAT_Y444_10BE
                           (47): y444-10le        - GST_VIDEO_FORMAT_Y444_10LE
                           (48): gbr              - GST_VIDEO_FORMAT_GBR
                           (49): gbr-10be         - GST_VIDEO_FORMAT_GBR_10BE
                           (50): gbr-10le         - GST_VIDEO_FORMAT_GBR_10LE
                           (51): nv16             - GST_VIDEO_FORMAT_NV16
                           (52): nv24             - GST_VIDEO_FORMAT_NV24
                           (53): nv12-64z32       - GST_VIDEO_FORMAT_NV12_64Z32
                           (54): a420-10be        - GST_VIDEO_FORMAT_A420_10BE
                           (55): a420-10le        - GST_VIDEO_FORMAT_A420_10LE
                           (56): a422-10be        - GST_VIDEO_FORMAT_A422_10BE
                           (57): a422-10le        - GST_VIDEO_FORMAT_A422_10LE
                           (58): a444-10be        - GST_VIDEO_FORMAT_A444_10BE
                           (59): a444-10le        - GST_VIDEO_FORMAT_A444_10LE
                           (60): nv61             - GST_VIDEO_FORMAT_NV61
                           (61): p010-10be        - GST_VIDEO_FORMAT_P010_10BE
                           (62): p010-10le        - GST_VIDEO_FORMAT_P010_10LE
                           (63): iyu2             - GST_VIDEO_FORMAT_IYU2
                           (64): vyuy             - GST_VIDEO_FORMAT_VYUY
                           (65): gbra             - GST_VIDEO_FORMAT_GBRA
                           (66): gbra-10be        - GST_VIDEO_FORMAT_GBRA_10BE
                           (67): gbra-10le        - GST_VIDEO_FORMAT_GBRA_10LE
                           (68): gbr-12be         - GST_VIDEO_FORMAT_GBR_12BE
                           (69): gbr-12le         - GST_VIDEO_FORMAT_GBR_12LE
                           (70): gbra-12be        - GST_VIDEO_FORMAT_GBRA_12BE
                           (71): gbra-12le        - GST_VIDEO_FORMAT_GBRA_12LE
                           (72): i420-12be        - GST_VIDEO_FORMAT_I420_12BE
                           (73): i420-12le        - GST_VIDEO_FORMAT_I420_12LE
                           (74): i422-12be        - GST_VIDEO_FORMAT_I422_12BE
                           (75): i422-12le        - GST_VIDEO_FORMAT_I422_12LE
                           (76): y444-12be        - GST_VIDEO_FORMAT_Y444_12BE
                           (77): y444-12le        - GST_VIDEO_FORMAT_Y444_12LE
                           (78): gray10-le32      - GST_VIDEO_FORMAT_GRAY10_LE32
                           (79): nv12-10le32      - GST_VIDEO_FORMAT_NV12_10LE32
                           (80): nv16-10le32      - GST_VIDEO_FORMAT_NV16_10LE32
                           (81): nv12-10le40      - GST_VIDEO_FORMAT_NV12_10LE40
                           (82): y210             - GST_VIDEO_FORMAT_Y210
                           (83): y410             - GST_VIDEO_FORMAT_Y410
                           (84): vuya             - GST_VIDEO_FORMAT_VUYA
                           (85): bgr10a2-le       - GST_VIDEO_FORMAT_BGR10A2_LE
                           (86): rgb10a2-le       - GST_VIDEO_FORMAT_RGB10A2_LE
                           (87): y444-16be        - GST_VIDEO_FORMAT_Y444_16BE
                           (88): y444-16le        - GST_VIDEO_FORMAT_Y444_16LE
                           (89): p016-be          - GST_VIDEO_FORMAT_P016_BE
                           (90): p016-le          - GST_VIDEO_FORMAT_P016_LE
                           (91): p012-be          - GST_VIDEO_FORMAT_P012_BE
                           (92): p012-le          - GST_VIDEO_FORMAT_P012_LE
                           (93): y212-be          - GST_VIDEO_FORMAT_Y212_BE
                           (94): y212-le          - GST_VIDEO_FORMAT_Y212_LE
                           (95): y412-be          - GST_VIDEO_FORMAT_Y412_BE
                           (96): y412-le          - GST_VIDEO_FORMAT_Y412_LE
                           (97): nv12-4l4         - GST_VIDEO_FORMAT_NV12_4L4
                           (98): nv12-32l32       - GST_VIDEO_FORMAT_NV12_32L32
                           (99): rgbp             - GST_VIDEO_FORMAT_RGBP
                           (100): bgrp             - GST_VIDEO_FORMAT_BGRP
                           (101): av12             - GST_VIDEO_FORMAT_AV12
                           (102): argb64-le        - GST_VIDEO_FORMAT_ARGB64_LE
                           (103): argb64-be        - GST_VIDEO_FORMAT_ARGB64_BE
                           (104): rgba64-le        - GST_VIDEO_FORMAT_RGBA64_LE
                           (105): rgba64-be        - GST_VIDEO_FORMAT_RGBA64_BE
                           (106): bgra64-le        - GST_VIDEO_FORMAT_BGRA64_LE
                           (107): bgra64-be        - GST_VIDEO_FORMAT_BGRA64_BE
                           (108): abgr64-le        - GST_VIDEO_FORMAT_ABGR64_LE
                           (109): abgr64-be        - GST_VIDEO_FORMAT_ABGR64_BE
  hdr-tone-map        : Apply HDR tone mapping algorithm
                        flags: readable, writable
                        Enum "GstVaapiHDRToneMap" Default: 0, "auto"
                           (0): auto             - Auto detection
                           (1): disabled         - Disable HDR tone mapping
  height              : Forced output height
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
  hue                 : The color hue value
                        flags: readable, writable
                        Float. Range:            -180 -             180 Default:               0 
  name                : The name of the object
                        flags: readable, writable, 0x2000
                        String. Default: "vaapipostproc0"
  parent              : The parent of the object
                        flags: readable, writable, 0x2000
                        Object of type "GstObject"
  qos                 : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: false
  saturation          : The color saturation value
                        flags: readable, writable
                        Float. Range:               0 -               2 Default:               1 
  scale-method        : Scaling method to use
                        flags: readable, writable
                        Enum "GstVaapiScaleMethod" Default: 0, "default"
                           (0): default          - Default scaling mode
                           (1): fast             - Fast scaling mode
                           (2): hq               - High quality scaling mode
  sharpen             : The level of sharpening/blurring to apply
                        flags: readable, writable
                        Float. Range:              -1 -               1 Default:               0 
  skin-tone-enhancement: Apply the skin tone enhancement algorithm
                        flags: readable, writable
                        Boolean. Default: false
  skin-tone-enhancement-level: Apply the skin tone enhancement algorithm with specified level
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 9 Default: 3 
  video-direction     : Video direction: rotation and flipping
                        flags: readable, writable
                        Enum "GstVideoOrientationMethod" Default: 0, "identity"
                           (0): identity         - GST_VIDEO_ORIENTATION_IDENTITY
                           (1): 90r              - GST_VIDEO_ORIENTATION_90R
                           (2): 180              - GST_VIDEO_ORIENTATION_180
                           (3): 90l              - GST_VIDEO_ORIENTATION_90L
                           (4): horiz            - GST_VIDEO_ORIENTATION_HORIZ
                           (5): vert             - GST_VIDEO_ORIENTATION_VERT
                           (6): ul-lr            - GST_VIDEO_ORIENTATION_UL_LR
                           (7): ur-ll            - GST_VIDEO_ORIENTATION_UR_LL
                           (8): auto             - GST_VIDEO_ORIENTATION_AUTO
                           (9): custom           - GST_VIDEO_ORIENTATION_CUSTOM
  width               : Forced output width
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 2147483647 Default: 0 
root@ng-devBeta2:/opt/rv/bins# 

Do you have an Intel Video card?

Hi @Joe
my HW is CPU with GPU. actually my board have also nVidia chip in it.
I will add some hw info prints of my system:

also noting that I installed intel_gpu_top (intel tools)
and I see (at least in ubuntu OS 20.04) that GPU is working.

intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card0 - 1193/1311 MHz;  48% RC6;     1095 irqs/s

         ENGINES     BUSY                                                                                                                                                                   MI_SEMA MI_WAIT
       Render/3D   37.05% |███████████████████████████████████████████████████████████                                                                                                    |     20%      0%
         Blitter    0.00% |                                                                                                                                                               |      0%      0%
           Video    5.02% |████████                                                                                                                                                       |      0%      0%
    VideoEnhance   23.09% |████████████████████████████████████▊                                                                                                                          |      0%      0%

hwinfo --display:

root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins# hwinfo --display
17: PCI 100.0: 0300 VGA compatible controller (VGA)
  [Created at pci.386]
  Unique ID: VCu0.e5WDEPoE8d1
  Parent ID: vSkL.yezs_gTn2Q7
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "nVidia VGA compatible controller"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x24fa
  SubVendor: pci 0x144a "Adlink Technology"
  SubDevice: pci 0x4640
  Revision: 0xa1
  Driver: "nvidia"
  Driver Modules: "nvidia"
  Memory Range: 0x81000000-0x81ffffff (rw,non-prefetchable)
  Memory Range: 0x6000000000-0x61ffffffff (ro,non-prefetchable)
  Memory Range: 0x6200000000-0x6201ffffff (ro,non-prefetchable)
  I/O Ports: 0x3000-0x3fff (rw)
  Memory Range: 0x82000000-0x8207ffff (ro,non-prefetchable,disabled)
  IRQ: 180 (914094 events)
  Module Alias: "pci:v000010DEd000024FAsv0000144Asd00004640bc03sc00i00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #15 (PCI bridge)

28: PCI 02.0: 0300 VGA compatible controller (VGA)
  [Created at pci.386]
  Unique ID: _Znp.2LTWaDmpS01
  SysFS ID: /devices/pci0000:00/0000:00:02.0
  SysFS BusID: 0000:00:02.0
  Hardware Class: graphics card
  Device Name: "Onboard - Video"
  Model: "Intel VGA compatible controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x9a60
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x2212
  Revision: 0x01
  Driver: "i915"
  Driver Modules: "i915"
  Memory Range: 0x6202000000-0x6202ffffff (rw,non-prefetchable)
  Memory Range: 0x4000000000-0x400fffffff (ro,non-prefetchable)
  I/O Ports: 0x4000-0x403f (rw)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 178 (94609214 events)
  Module Alias: "pci:v00008086d00009A60sv00008086sd00002212bc03sc00i00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

Primary display adapter: #17
root@ng-devBeta2:/opt/rv/bins#

lscpu

root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins# lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               GenuineIntel
  Model name:            11th Gen Intel(R) Core(TM) i7-11850HE @ 2.60GHz
    CPU family:          6
    Model:               141
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            1
    CPU max MHz:         4700.0000
    CPU min MHz:         800.0000
    BogoMIPS:            5222.40
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon
                         pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x
                         2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 invpcid_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shado
                         w vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni
                          avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi
                         2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities
Virtualization features:
  Virtualization:        VT-x
Caches (sum of all):
  L1d:                   384 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    10 MiB (8 instances)
  L3:                    24 MiB (1 instance)
NUMA:
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-15
Vulnerabilities:
  Gather data sampling:  Mitigation; Microcode
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
  Srbds:                 Not affected
  Tsx async abort:       Not affected
root@ng-devBeta2:/opt/rv/bins#

lshw -class display

root@ng-devBeta2:/opt/rv/bins#
root@ng-devBeta2:/opt/rv/bins# lshw -class display
  *-display
       description: VGA compatible controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: /dev/fb0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=nvidia latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
       resources: iomemory:600-5ff iomemory:620-61f irq:180 memory:81000000-81ffffff memory:6000000000-61ffffffff memory:6200000000-6201ffffff ioport:3000(size=128) memory:82000000-8207ffff
  *-display
       description: VGA compatible controller
       product: TigerLake-H GT1 [UHD Graphics]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
       resources: iomemory:620-61f iomemory:400-3ff irq:178 memory:6202000000-6202ffffff memory:4000000000-400fffffff ioport:4000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
root@ng-devBeta2:/opt/rv/bins#

lspci:

root@ng-devBeta2:~$ lspci | grep ' VGA '
00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 24fa (rev a1)
root@ng-devBeta2:~$

So, from HW perspective, I think I am Ok.

Check which driver is used in 20.04. For example, Intel may use i965 there(not sure). But in 22.04 iHD is the default one. And you may need to check if your hardware is too old.

Hi @Joe & @tpm and others.
Thank you both for your replies.

I found a solution that helped me and I would like to share it with whom it may useful to.
I just added another element h264parser after the encoding element vaapih264enc.

so instead of:

gst-launch-1.0 -v videotestsrc  ! 'video/x-raw,width=3840,height=2160,framerate=30000/1001' ! vaapipostproc ! 'video/x-raw(memory:VASurface),width=1920,height=1080' ! queue ! vaapih264enc ! splitmuxsink location=file%003d.mp4 max-size-time=500000000

can use the:

gst-launch-1.0 -v videotestsrc  ! video/x-raw,width=3840,height=2160,framerate=30000/1001 ! vaapipostproc ! video/x-raw,width=1920,height=1080 ! queue ! vaapih264enc ! h264parse ! splitmuxsink location=file%003d.mp4 max-size-time=20000000000

I don’t really know how it actually solved the problem, and I will be glad to hear from anyone who has any explanation how it works.

Hope it will be helpful.

Encoder vaapih264enc has specific format.

The primary role of a parser is to understand the structure and encoding of a raw multimedia stream, extract relevant information, and provide the necessary metadata for downstream elements.

Without parser, the downstream elements do not know what vaapih264enc is doing.