Missing vaapih265enc for gstreamer-vaapi plugin using libgstvaapi.so

2.5k views Asked by At

In my Ubuntu 20.04 machine I have installed gstreamer following the official docs at https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c

Then I have installed the following:

$ sudo apt install va-driver-all gstreamer1.0-vaapi

But when I tried to use the vaapih265enc, the pipeline fails:

$ export GST_VAAPI_ALL_DRIVERS=1
$ gst-launch-1.0 filesrc location=output.mp4 ! h264parse ! vaapih264dec ! vaapih265enc rate-control=cbr bitrate=5000 ! video/x-h265,profile=main ! h265parse ! filesink location=output2.mp4
WARNING: erroneous pipeline: no element "vaapih265enc"

If I inspect the plugin, the output shows as:

$ gst-inspect-1.0 vaapi
Plugin Details:
  Name                     vaapi
  Description              VA-API based elements
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
  Version                  1.16.2
  License                  LGPL
  Source module            gstreamer-vaapi
  Source release date      2019-12-03
  Binary package           gstreamer-vaapi
  Origin URL               http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer

  vaapijpegdec: VA-API JPEG decoder
  vaapimpeg2dec: VA-API MPEG2 decoder
  vaapih264dec: VA-API H264 decoder
  vaapivp8dec: VA-API VP8 decoder
  vaapivp9dec: VA-API VP9 decoder
  vaapih265dec: VA-API H265 decoder
  vaapipostproc: VA-API video postprocessing
  vaapidecodebin: VA-API Decode Bin
  vaapisink: VA-API sink
  vaapijpegenc: VA-API JPEG encoder
  vaapih264enc: VA-API H264 encoder

  11 features:
  +-- 11 elements

When I grep for h265 lines in the library, I found the encoder:

$ strings /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so | grep h265
gst_h265_parser_free
gst_h265_slice_hdr_free
gst_h265_parser_parse_vps
gst_h265_parser_parse_sps
gst_h265_parser_parse_pps
gst_h265_parser_parse_sei
gst_h265_parser_identify_nalu_hevc
gst_h265_parser_new
gst_h265_parser_parse_slice_hdr
gst_h265_parser_identify_nalu_unchecked
gst_h265_quant_matrix_4x4_get_raster_from_uprightdiagonal
gst_h265_quant_matrix_8x8_get_raster_from_uprightdiagonal
vaapih265enc
video/x-h265
video/mpeg, mpegversion=2, systemstream=(boolean)false; video/mpeg, mpegversion=4; video/x-divx; video/x-xvid; video/x-h263; video/x-h264; video/x-h265; video/x-wmv; video/x-vp8; video/x-vp9; 
video/mpeg, mpegversion=2, systemstream=(boolean)false; video/mpeg, mpegversion=4; video/x-divx; video/x-xvid; video/x-h263; video/x-h264; video/x-h265; video/x-wmv; video/x-vp8; video/x-vp9; 
video/x-h265, stream-format = (string) { hvc1, byte-stream }, alignment = (string) au
../../../gst/vaapi/gstvaapiencode_h265.c
gst_vaapiencode_h265_set_config
_h265_byte_stream_next_nal
_h265_convert_byte_stream_to_hvc
gst_vaapiencode_h265_alloc_buffer
video/x-h265, stream-format = (string) { hvc1, byte-stream }, alignment = (string) au, profile = (string) { main, main-10 }
../../../../gst-libs/gst/vaapi/gstvaapiutils_h265.c
gst_vaapi_utils_h265_get_chroma_format_idc
gst_vaapi_utils_h265_get_chroma_type
gst_vaapi_utils_h265_get_level
gst_vaapi_utils_h265_get_profile_idc
gst_vaapi_utils_h265_get_profile
../../../../gst-libs/gst/vaapi/gstvaapidecoder_h265.c
gst_vaapi_decoder_h265_set_alignment
gst_vaapi_decoder_h265_parse
gst_vaapi_decoder_h265_decode_codec_data
gst_vaapi_encoder_h265_get_profile_tier_level
gst_vaapi_encoder_h265_set_max_profile
gst_vaapi_encoder_h265_reconfigure
gst_vaapi_encoder_h265_reordering
gst_vaapi_encoder_h265_encode
gst_vaapi_encoder_h265_get_codec_data
gst_vaapi_encoder_h265_get_pending_reordered
../../../../gst-libs/gst/vaapi/gstvaapiencoder_h265.c

What can I do to make it available for gstreamer?

0

There are 0 answers