Hello Team,
I am encountering an issue in my current application where I need to capture 30 seconds of synchronized audio and video data and save it as an MKV file. While I can successfully stream the synchronized audio and video when requested by a client, the saved MKV file only contains the video data and lacks the audio stream.
For your review and a better understanding of the problem, I have included my current pipeline configuration and debug logs below.
I would greatly appreciate any insights or guidance the team can offer to resolve this issue.
Thank you for your time and assistance.
Pipeline
gst_rtsp_media_factory_set_launch(factory,
"( "
"v4l2src ! video/x-raw,format=NV12,width=960,height=720,framerate=30/1 ! "
"mpph265enc name=mpph265enc0 ! h265parse name=parsed ! tee name=vt "
"vt. ! queue ! rtph265pay pt=96 name=pay0 config-interval=1 "
"vt. ! queue ! valve name=recordvalve drop=true ! queue ! mux. "
"alsasrc device=hw:0 ! audio/x-raw,format=S16LE,channels=2,rate=44100 ! "
"audioconvert ! audioresample ! voaacenc bitrate=128000 ! tee name=at "
"at. ! queue ! rtpmp4gpay pt=97 name=pay1 "
"at. ! queue ! valve name=recordaudiovalve drop=true ! queue ! mux. "
"splitmuxsink name=mux muxer=matroskamux location=" RECORDING_FILE " max-size-time=30000000000 async-finalize=true "
")"
);
DEBUG LOGS
GST_DEBUG=3 ./mkv
[INFO] RTSP Stream available at rtsp://<RK3576_IP>:8554/stream
[INFO] NNG Server Listening on ipc:///tmp/pipeline-control
(mkv:10165): GStreamer-CRITICAL **: 09:06:53.886: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
0:00:01.651104710 10165 0x55731a5860 WARN mpp gstmpp.c:121:gst_mpp_use_rga: RGA enabled
0:00:01.674132509 10165 0x55731a5860 ERROR GST_PIPELINE gst/parse/grammar.y:1088:gst_parse_perform_link: could not link queue5 to mux
0:00:01.674202221 10165 0x55731a5860 WARN rtspmediafactory rtsp-media-factory.c:1806:default_create_element: recoverable parsing error: could not link queue5 to mux
Error: Failed to find splitmuxsink or valve in pipeline
Using mplane plugin for capture
0:00:01.760556695 10165 0x7f58016700 WARN v4l2src gstv4l2src.c:1027:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated !
0:00:01.760873170 10165 0x7f58016700 WARN aggregator gstaggregator.c:2159:gst_aggregator_query_latency_unlocked:<muxer> Latency query failed
0:00:01.765242650 10165 0x7f580165e0 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal:<alsasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:01.768574534 10165 0x7f580164c0 WARN v4l2 gstv4l2object.c:4800:gst_v4l2_object_probe_caps:<v4l2src0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument
0:00:01.774541683 10165 0x7f580164c0 WARN v4l2 gstv4l2object.c:4593:gst_v4l2_object_get_crop_rect:<v4l2src0:src> Failed to get default crop rectangle with VIDIOC_G_SELECTION: Invalid argument
0:00:01.774710858 10165 0x7f580164c0 WARN v4l2 gstv4l2object.c:3343:gst_v4l2_object_reset_compose_region:<v4l2src0:src> Failed to get default compose rectangle with VIDIOC_G_SELECTION: Invalid argument
0:00:01.794209637 10165 0x7f580165e0 WARN alsa pcm_hw.c:1366:snd_pcm_hw_get_chmap: alsalib error: Cannot read Channel Map ctl
: No such file or directory
0:00:01.841633223 10165 0x7f580166a0 WARN rtpsession gstrtpsession.c:2441:gst_rtp_session_chain_send_rtp_common:<rtpsession1> Can't determine running time for this packet without knowing configured latency
0:00:01.977934832 10165 0x7f580164c0 WARN v4l2bufferpool gstv4l2bufferpool.c:1334:gst_v4l2_buffer_pool_dqbuf:<v4l2src0:pool0:src> Driver should never set v4l2_buffer.field to ANY
0:00:01.988042282 10165 0x7f58016640 WARN rtpsession gstrtpsession.c:2441:gst_rtp_session_chain_send_rtp_common:<rtpsession0> Can't determine running time for this packet without knowing configured latency
0:00:01.988670274 10165 0x55731a5860 FIXME rtspmedia rtsp-media.c:4624:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:00:01.991683058 10165 0x55731a5aa0 WARN udpsrc gstudpsrc.c:1638:gst_udpsrc_open:<udpsrc0> warning: Could not create a buffer of requested 524288 bytes (Operation not permitted). Need net.admin privilege?
0:00:01.991753353 10165 0x55731a5aa0 WARN udpsrc gstudpsrc.c:1648:gst_udpsrc_open:<udpsrc0> have udp buffer of 212992 bytes while 524288 were requested
0:00:01.993068256 10165 0x55731a5860 FIXME rtspmedia rtsp-media.c:4624:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:00:01.993107924 10165 0x55731a5860 WARN rtspmedia rtsp-media.c:4663:gst_rtsp_media_suspend: media 0x7f580ab1f0 was not prepared
0:00:01.998221986 10165 0x55731a5aa0 WARN udpsrc gstudpsrc.c:1638:gst_udpsrc_open:<udpsrc2> warning: Could not create a buffer of requested 524288 bytes (Operation not permitted). Need net.admin privilege?
0:00:01.998293448 10165 0x55731a5aa0 WARN udpsrc gstudpsrc.c:1648:gst_udpsrc_open:<udpsrc2> have udp buffer of 212992 bytes while 524288 were requested
0:00:01.999116575 10165 0x55731a5aa0 WARN udpsrc gstudpsrc.c:1638:gst_udpsrc_open:<udpsrc3> warning: Could not create a buffer of requested 524288 bytes (Operation not permitted). Need net.admin privilege?
0:00:01.999180453 10165 0x55731a5aa0 WARN udpsrc gstudpsrc.c:1648:gst_udpsrc_open:<udpsrc3> have udp buffer of 212992 bytes while 524288 were requested
0:00:02.004797291 10165 0x7f70013e40 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal:<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:02.004815751 10165 0x7f70013de0 FIXME default gstutils.c:4036:gst_pad_create_stream_id_internal:<fakesrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:02.009478122 10165 0x55731a5860 FIXME rtspmedia rtsp-media.c:2902:gst_rtsp_media_seek_trickmode:<GstRTSPMedia@0x7f580ab1f0> Handle going back to 0 for none live not seekable streams.
0:00:02.014116616 10165 0x7f34008520 FIXME rtpjitterbuffer gstrtpjitterbuffer.c:1664:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer0> Unsupported media clock
0:00:02.015239592 10165 0x7f340085e0 FIXME rtpjitterbuffer gstrtpjitterbuffer.c:1664:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer1> Unsupported media clock
0:00:02.016431405 10165 0x7f340085e0 WARN basesrc gstbasesrc.c:3132:gst_base_src_loop:<udpsrc3> error: Internal data stream error.
Best Regards,