适用于Android缓冲区的Gstreamer没有PTS [英] Gstreamer for Android Buffer has no PTS

查看:98
本文介绍了适用于Android缓冲区的Gstreamer没有PTS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了管道 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); 并在Gstreamer上正常工作版本1.9.1.由于某些其他原因,我想使用较新的版本,但以上版本1.10.X和1.11.X在经过数秒至数分钟的不确定时间后停止运行.Logcat的输出在这里:

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:错误:缓冲区没有PTS.

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:错误:内部数据流错误.

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:错误:流停止,原因错误(-5)

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

我尝试了不同的相机型号.我删除了splitmuxsink并尝试使用mp4mux,但结果没有改变.我将演示时间"更改为mp4mux的属性,但没有任何变化.

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.

推荐答案

我偶然发现了您的问题,这似乎是由于来源存在问题(无PTS)和gstreamer无法解决(这与 gstreamer错误#659489 ).

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).

如果流中没有B帧,则可以尝试 BaseParse.set_pts_interpolation(h264parse,true),随着计算PTS,问题可能会消失.

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:使用此替代方法的小型DVR 此处

PS: Tiny DVR using this workaround here

这篇关于适用于Android缓冲区的Gstreamer没有PTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆