1

I created the pipeline gst_parse_launch("rtspsrc location=rtsp://192.168.0.77:554/user=admin_password_=tlJwpbo6_channel=1_stream=0.sdp?real_stream ! queue !rtph264depay ! h264parse ! splitmuxsink muxer=\"mp4mux name=muxer\" max-size-bytes=20000000 location=/storage/emulated/0/DVR/CameraX/the_file_%d.mp4",NULL); and it works fine with Gstreamer version 1.9.1. I want to use newer versions for some other reasons but with above versions 1.10.X and 1.11.X pipeline stops after working for some indeterminate time between seconds to minutes. Logcat output is here:

gstqtmux.c:3391:gst_qt_mux_add_buffer: error: Buffer has no PTS.

W/GStreamer+basesrc: 0:01:06.383504349 0xb9380000 gstbasesrc.c:2950:gst_base_src_loop: error: Internal data stream error.

W/GStreamer+basesrc: 0:01:06.383623672 0xb9380000 gstbasesrc.c:2950:gst_base_src_loop: error: streaming stopped, reason error (-5)

I tried for different camera models. I removed splitmuxsink and tried with mp4mux but result did not change. I changed "presentation-time" property of mp4mux but nothing changes.

Community
  • 1
  • 1
erolmuhammet.cs
  • 111
  • 3
  • 8
  • I posted a detailed answer and workaround to the Buffer has No PTS issue here, which removes the mp4mux responsibility from GStreamer, and utilizes GPac for that operation. It may be a viable workaround for you. The gist is to remove the `mp4mux` stages from your pipeline, and complete those operations in Gpac's MP4box. Works fine for static files, may not be as promising for your streaming application https://stackoverflow.com/questions/45455279/split-mpeg-ts-into-mp4-files-with-gstreamer-1-12-2/49769275#49769275 – Kelton Temby Apr 11 '18 at 07:56

1 Answers1

2

I stumbled upon your issue, which seems to be due to the source having issue (no PTS) and gstreamer not working around them (this relates to gstreamer bug #659489).

If you don't have B-frames in your stream, you can try BaseParse.set_pts_interpolation(h264parse, true) and the issue may go away as the PTS is computed.

PS: Tiny DVR using this workaround here

cJ Zougloub
  • 1,484
  • 10
  • 19