I am able to record video and audio together using below gstreamer command.
gst-launch-1.0 -e qtiqmmfsrc camera=1 name=qmmf ! video/x-raw,format=NV12,width=1920,height=1080,framerate=20/1 ! qtic2venc ! h264parse ! queue ! mux. alsasrc device=hw:0,0 buffer-time=50000 ! queue ! audioconvert ! audioresample ! avenc_aac ! aacparse ! queue ! mpegtsmux name=mux ! filesink location=/data/Pratik/test.mp4
Muxer will be used to combined video and audio data together and store it in file. But how to convert command logic in c gstreamer code? Can you please provide me one sample c code which can record audio and video together in one file?