Gstreamer - Buffer has no PTS issue in TX2

Hi,

We try to recording video with 3x camera and live view on the display. But execution the command something occur the error message as below:

ERROR: from element /GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQTMux:qtmux0: Could not multiplex stream.
Additional debug info:
gstqtmux.c(4561): gst_qt_mux_add_buffer (): /GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQTMux:qtmux0:
Buffer has no PTS.
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
ERROR: from element /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0:
streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data stream error.
Additional debug info:
gstqueue.c(988): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0:
streaming stopped, reason error (-5)

The Gstreamer command:

echo camera1_Recording
gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=(string)YUY2, framerate=30/1" ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! tee name=t ! queue ! nvv4l2h264enc maxperf-enable=1 profile=0 preset-level=0 bitrate=8000000 ! 'video/x-h264' ! h264parse ! queue ! splitmuxsink name=mux muxer=qtmux max-size-time=300000000000 max-files=34 location="video0_"%d.mp4 \
-e t.! nvegltransform ! nveglglessink window-x=640 window-y=0 window-width=640 window-height=360 -e \
interleave name=i ! audioconvert ! avenc_aac ! aacparse ! mux.audio_0 -e \
alsasrc device=hw:tegrasndt186ref,5 name=ch1 ! audio/x-raw,format=S16LE,rate=44100,channels=4 ! \
audioconvert ! audio/x-raw,channels=1 ! queue ! i.sink_0 \
alsasrc device=hw:tegrasndt186ref,6 name=ch2 ! audio/x-raw,format=S16LE,rate=44100,channels=4 ! \
audioconvert ! audio/x-raw,channels=1 ! queue ! i.sink_1 &

echo camera2_Recording
gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=(string)YUY2, framerate=30/1" ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! tee name=t ! queue ! nvv4l2h264enc maxperf-enable=1 profile=0 preset-level=0 bitrate=8000000 ! 'video/x-h264' ! h264parse ! queue ! splitmuxsink name=mux muxer=qtmux max-size-time=300000000000 max-files=34 location="video1_"%d.mp4 \
-e t.! nvegltransform ! nveglglessink window-x=640 window-y=0 window-width=640 window-height=360 -e \
interleave name=i ! audioconvert ! avenc_aac ! aacparse ! mux.audio_0 -e \
alsasrc device=hw:tegrasndt186ref,7 name=ch1 ! audio/x-raw,format=S16LE,rate=44100,channels=4 ! \
audioconvert ! audio/x-raw,channels=1 ! queue ! i.sink_0 \
alsasrc device=hw:tegrasndt186ref,2 name=ch2 ! audio/x-raw,format=S16LE,rate=44100,channels=4 ! \
audioconvert ! audio/x-raw,channels=1 ! queue ! i.sink_1 &


echo camera3_Recording	
gst-launch-1.0 nvv4l2camerasrc device=/dev/video2 ! "video/x-raw(memory:NVMM),width=1920,height=1080,format=(string)YUY2, framerate=30/1" ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! tee name=t ! queue ! nvv4l2h264enc maxperf-enable=1 profile=0 preset-level=0 bitrate=8000000 ! 'video/x-h264' ! h264parse ! queue ! splitmuxsink name=mux muxer=qtmux max-size-time=300000000000 max-files=34 location="video2_"%d.mp4 \
-e t.! nvegltransform ! nveglglessink window-x=640 window-y=0 window-width=640 window-height=360 -e \
interleave name=i ! audioconvert ! avenc_aac ! aacparse ! mux.audio_0 -e \
alsasrc device=hw:tegrasndt186ref,4 name=ch1 ! audio/x-raw,format=S16LE,rate=44100,channels=4 ! \
audioconvert ! audio/x-raw,channels=1 ! queue ! i.sink_0 \
alsasrc device=hw:tegrasndt186ref,3 name=ch2 ! audio/x-raw,format=S16LE,rate=44100,channels=4 ! \
audioconvert ! audio/x-raw,channels=1 ! queue ! i.sink_1 &

Please help to check and provide the solution.
Thanks.

Hi,
The PTS is assigned to gstbuffer in gstreamer frameworks. If the source generates frames continually, it should work fine. It seems like the source is not stable in the condition. Since nvv4l2camerasrc is open source, please add some prints and rebuild/replace the plugin. To check if you are able to get frames in the call:

ioctl(pool->video_fd, VIDIOC_DQBUF, nv_mem->nvcam_buf->buffer)

Hi,
Thanks for your suggestion. I will try to add print log to debug.

Frank Cheng