Hardware & Software: Raspberry Pi 4, IP camera, Raspbian Buster, Gstreamer 1.14.1 (from repository). Raspberry and camera are on the local network.
I'm trying to run the RTSP video stream with the following pipeline:
gst-launch-1.0 rtspsrc location='rtsp://web_camera_ip' ! rtph264depay ! h264parse ! v4l2h264dec ! autovideosink
Within one minute, the playback stops.
Log:
0:00:00.681624278 1491 0xb4810980 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal:<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress of execution: (request) Sent PLAY request
0:00:01.155264612 1491 0xb1507fb0 WARN v4l2 gstv4l2object.c:4186:gst_v4l2_object_probe_caps:<v4l2h264dec0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: An inadmissible argument
0:00:01.166871436 1491 0xb1507fb0 WARN v4l2 gstv4l2object.c:4186:gst_v4l2_object_probe_caps:<v4l2h264dec0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: An inadmissible argument
0:00:01.170107746 1491 0xb1507fb0 FIXME basesink gstbasesink.c:3145:gst_base_sink_default_event:<autovideosink0-actual-sink-xvimage> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
0:00:01.174576265 1491 0xb1507fb0 WARN v4l2videodec gstv4l2videodec.c:808:gst_v4l2_video_dec_decide_allocation:<v4l2h264dec0> Duration invalid, not setting latency
0:00:01.211967620 1491 0xb48105b0 WARN v4l2bufferpool gstv4l2bufferpool.c:1189:gst_v4l2_buffer_pool_dqbuf:<v4l2h264dec0:pool:src> Driver should never set v4l2_buffer.field to ANY
This line appears at the moment of stopping:
0:00:13.102438914 1491 0xb48105b0 WARN v4l2allocator gstv4l2allocator.c:1349:gst_v4l2_allocator_dqbuf:<v4l2h264dec0:pool:src:allocator> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
What I tried (it didn't help solve the problem):
- Replacing autovideosink with fakesink
- Replacing v4l2h264dec with avdec_h264_mmal
- Various rtspsrc parameters
- Playback with playbin
Error does not appear if decoder is replaced with fakesink:
gst-launch-1.0 rtspsrc location='rtsp://web_camera_ip' ! rtph264depay ! h264parse ! fakesink
Additional information:
My camera displays the time (hours, minutes, seconds) above the image. Playback is always stopped at a certain value of seconds. When the camera restarts, this value changes randomly - 17, 32, 55... Changing the time in the camera does not solve the problem.
VLC player on Raspberry plays stream from this camera without any problems
Gstreamer plays local h264 files without any problems
Gstreamer plays RSTP TV channel broadcasting from the Internet without any problems.
I also tried to play substream (low resolution) from IP camera and RTSP stream from smartphone (IP Webcam application). The same problem appears.
When running this project (on SD card) on Raspberry 3 , the problem remains.
On Raspberry 3 with Raspbian Stretch and Gstreamer 1.10 from repository there was no problem.
Thank you for the answers!