硬件和软件: Raspberry Pi 4,IP摄像头,Raspbian Buster,Gstreamer 1.14.1 (来自存储库)。树莓和照相机都在本地网络上。
我试图使用以下管道运行RTSP视频流:
gst-launch-1.0 rtspsrc location='rtsp://web_camera_ip' ! rtph264depay ! h264parse ! v4l2h264dec ! autovideosink在一分钟内,播放停止.
日志:
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--这一行出现在停止的时刻:
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我所做的(这无助于解决问题)
如果将解码器替换为fakesink,则不会出现错误:
gst-launch-1.0 rtspsrc location='rtsp://web_camera_ip' ! rtph264depay ! h264parse ! fakesink附加信息:
谢谢你的回答!
发布于 2019-09-16 18:48:29
问题出在我的本地网络里。来自任何设备的RTSP流被周期性地中断一秒钟。当使用VLC播放器时,它是不可见的,因为它会立即重新启动广播。在本例中,Gstreamer中断流并生成错误消息。
我已经把我的IP摄像头通过以太网直接连接到Raspberry,一切都很好。因特网上的广播也是稳定的。
发布于 2020-07-22 02:54:21
我也有同样的问题。幸运的是,GStreamer1.16.2修复了它。我在https://github.com/PietroAvolio/Building-Gstreamer-Raspberry-Pi-With-SRT-Support/blob/master/gstreamer-build.sh上使用脚本的一个变体构建
使用1.16.2,它只是继续前进,不挂。
https://stackoverflow.com/questions/57946999
复制相似问题