I have a pipeline to stream audio/video to youtube. With VAAPI, the pipeline works nicely on Ubuntu 18.04(gstreamer 1.14.5). But with VA-API, the audio is choppy on Ubuntu 22.04(GStreamer: 1.22.5) while video seems OK. Audio part in the pipeline is exactly the same. Video part uses vaapipostproc/vaapih264enc with VAAPI and vapostproc/vah264enc with VA-API.
Streaming audio/video to LAN with VAAPI/VA-API works fine. Computer is same in both cases(VAAPI and VA-API).
made some comparison and noticed
vaapipostproc uses format 2=I420 <==set
vapostproc uses format=NV12 <==auto set
I tried to add caps to vapostproc with
video/x-raw, width=1920, height=1080, framerate=25/1, pixel-aspect-ratio=1/1, format=I420
then vapostproc and vah264enc do not link anymore. Why?
the stream format of the va encoder is byte-stream
/GstPipeline:pipeline0/GstVaH264Enc:vah264enc0.GstPad:src: caps =
video/x-h264, profile=(string)high, level=(string)4, width=(int)1920,
height=(int)1080, alignment=(string)au, stream-format=(string)byte-stream,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-
mode=(string)progressive, colorimetry=(string)bt709, chroma-
site=(string)mpeg2
the stream format of the vaapi encoder is avc
/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)25/1,
codec_data=(buffer)01640028ffe1002967640028acd301e0089797ff00010001100000030010000003032e0000030112a80000337f86f7bdca01000468ee3cb0,
interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-
site=(string)mpeg2
tried to set caps with stream-format=avc to GstVaH264Enc and the pipeline will not work.
avc is packet-oriented streaming. Is it not supported in vah264enc anymore?
the same audio mixer works fine with vaapipostproc and vaapih264enc. The only changes I made are to replace vaapipostproc with vapostproc and vaapih264enc with vah264enc. Also similar VA encoding code is applied for streaming to LAN and Wi-Fi without any problem. Gstreamer version is 1.22.5.