Issues in audio and video recording to files

If x264enc and videoconvert with audio encoder(rtpg722depay+avdec_g722) are applied in audio/video recording, no issues.

However, when x264env and videoconvert are replaced with vapostproc + vah264enc(hardware acceleration), video is ok, but the audio is very choppy. Any replacements for rtpg722depay+avdec_g722 in va-api? Does audio encoding need hardware acceleration at the same time?

How to sync audio and video recording when video encoding is accelerated with va-api?