GStreamer RTMP audio issue

I am writing frame by frame to the VideoWriter Object using the appsrc of gstreamer to stream to the rtmp link alongwith the audio. But I am unable to receive the audio at the rtmp endpoint only video is streaming

cv2.VideoWriter (filesrc location="C:/Users/gmura/Downloads/audio_2024-05-14 12_49_20.wav" ! mpegaudioparse ! avdec_mp3 ! audioconvert ! audioresample ! queue ! mux. filesrc location="C:/Users/gmura/Downloads/video_2024-05-15 18_26_17.mp4"  ! qtdemux !  queue ! avdec_h264 ! videoconvert ! x264enc tune=zerolatency ! queue max-size-buffers=1 leaky=downstream ! mux. flvmux name=mux streamable=true ! rtmpsink location="rtmp://122.166.44.132:1935/yolo/live live=true" sync=false, cv2.CAP_GSTREAMER, cv2.VideoWriter_fourcc(*'H264'), fps,(frame_w, frame_h ))

OpenCV doesn’t support Audio.

Well it does, kinda, but that was some GSoC project and they had to work around the existing APIs, which means the existing API is video-only.

if you have an issue with gstreamer pipelines, that’s a gstreamer issue. reproduce without OpenCV, just with gstreamer on the command line.

The gstreamer pipeline works well, it doesn’t work when we integrate with the opencv VideoWriter Object