确定RTSP流是否包含PPS和SPS信息
我正在使用GSTREAMER摄入各种安全摄像机RTSP流。在大多数情况下,我使用的管道类似于此
gst-launch-1.0 rtspsrc location=rtsp://<username:password@$RTSPURL> protocols=4 name=rtspsrc0 rtspsrc0. ! rtph264depay ! tee name=t t.! queue ! hlssink2 name=ingest2 playlist-length=5 max-files=10 target-duration=2 playlist-location=stream.m3u8 location=segment_%d.ts
,但是轴摄像机似乎根本没有发送SPS ANSD PPS Nalus。为了解决此问题,我必须使用H264Parse config-Interval = -1
,以便插入SPS和PPS。
我想确定哪些流具有SPS PPS信息,并相应地添加H264Parse。
GSTREAMER,FFMPEG/FFPROBE是否可以识别PPS,SPS是否在数据包中发送,然后动态添加H264Parse
元素?
I am ingesting different kinds of security camera RTSP streams with gstreamer. In most of the cases I use a pipeline similar to this
gst-launch-1.0 rtspsrc location=rtsp://<username:password@$RTSPURL> protocols=4 name=rtspsrc0 rtspsrc0. ! rtph264depay ! tee name=t t.! queue ! hlssink2 name=ingest2 playlist-length=5 max-files=10 target-duration=2 playlist-location=stream.m3u8 location=segment_%d.ts
However the Axis cameras do not seem to send SPS ansd PPS NALUs at all. In order to work around this problem I am having to use h264parse config-interval=-1
so that the SPS and PPS is inserted.
I would like to identify which streams have the SPS PPS information and the add the H264parse accordingly.
Is there a way in gstreamer, ffmpeg/ffprobe to identify if PPS, SPS is sent in the packets and then add the h264parse
element dynamically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以运行
ffmpeg -i输入-AN -C复制-t 10 -bsf:v trace_headers -f null -2&gt;&amp; 1 | GREP参数
这将检查10秒的视频流数据并记录所有NALU数据。如果存在PS,您会看到表单的行
确实检查PS部分上方的线路(如果
忽略)。这可以是带外传输,例如从SDP中。
You can run
ffmpeg -i INPUT -an -c copy -t 10 -bsf:v trace_headers -f null - 2>&1 | grep Parameter
This will examine 10 seconds of video stream data and log all NALU data. If PS are present, you will see lines of the form
Do check the line immediately above the PS section, if it says
ignore it. That can be out-of-band transmission, like from the SDP.