nginx-rtmp 拉流时的live选项说明

对nginx-rtmp中拉流的一个选项一直不明白,今天被指点,记录之: nginx

nginx-rtmp拉流是的live选项的含义:

pull rtmp:// 103.249.128.5:1935/live/avatar  live=1 name=avatar static;

live=1:
 rtmp的play包,有几个参数:
-2:猜这个流类型,先试live,而后vod。
-1:live类型,若这个流是点播,就失败。
0:vod类型,若这个流是直播,就失败。
有些服务器要求有这个。

由于rtmp播放时,例如: rtmp://xx/app/stream ,没法判断该rtmp流是直播仍是点播,因此须要加这个选项进行区分。

static:
默认状况下,nginx-rtmp切hls的时候是要求用户访问才会切片,加static后,只有有流接入就会切片


nginx-rtmp做者的答复:

If you pull from another nginx-rtmp-module you may just omit this.
When the option is active rtmp client send a special "live" flag. Certain servers make use of this flag but nginx-rtmp-module does not.
It may have sense for stream disambiguation between live and vod streams on those servers.
服务器

相关文章
相关标签/搜索