18143453325 在线咨询 在线咨询
18143453325 在线咨询
所在位置: 首页 > 营销资讯 > 行业动态 > # 设定接收器的值

# 设定接收器的值

时间:2022-03-17 11:09:01 | 来源:行业动态

时间:2022-03-17 11:09:01 来源:行业动态

sink.set_property('host', '224.224.255.255')

sink.set_property('port', updsink_port_num)

sink.set_property('async', False)

sink.set_property('sync', 1)

接下去就是按照file-source - h264-parser - nvh264-decoder - nvinfer - nvvidconv - nvosd - nvvidconv_postosd - caps - encoder - rtppay - udpsink 顺序,将元件依序进行连接。

以上部分的操作逻辑与先前所说的都是一致的,最后只剩一个部分,就是在代码第276~286行,需要调用Gstreamer的gst-rtsp-server库的GstRtspServer对象,细节请自行参考https://github.com/GStreamer/gst-rtsp-server

# Start streaming

rtsp_port_num = 8554 # 设定端口值



server = GstRtspServer.RTSPServer.new()

server.props.service = "%d" % rtsp_port_num

server.attach(None)



factory = GstRtspServer.RTSPMediaFactory.new()

factory.set_launch( "( udpsrc name=pay0 port=%d buffer-size=524288 caps=/"application/x-rtp, media=video, clock-rate=90000, encoding-name=(string)%s, payload=96 /" )" % (updsink_port_num, codec))

factory.set_shared(True)

server.get_mount_points().add_factory("

关键词:接收

74
73
25
news
  • 网站
  • 营销
  • 设计
  • 运营
  • 优化
  • 效率
  • 专注
  • 电商
  • 方案
  • 推广
为了最佳展示效果,本站不支持IE9及以下版本的浏览器,建议您使用谷歌Chrome浏览器。 点击下载Chrome浏览器
关闭