七牛实时转码推流

七牛实时转码推流是服务服务,具体价格需要和商务进行沟通。一般不建议使用这个功能,因为会产生额外的转码费用。操作流程为,先开启实时转码功能,再推流,接着可拉多路实时转码的流。

开启实时转码

需要先开启实时转码的功能。参考直播流实时转码控制,调用 api 开启实时转码功能。这里我用的是七牛的直播python sdk

stream = hub.get(stream_title1)
print "before update converts:", stream.refresh()
stream.update_converts(["480p", "720p"])
print "after update converts:", stream.refresh()

操作命令

  1. 推流
  2. 拉流
    1. 原始流
      • ffplay rtmp://pili-live-rtmp.ever.iamlj.com/test-ever/stream27250492086_1
    2. 480p
      • ffplay rtmp://pili-live-rtmp.ever.iamlj.com/test-ever/stream27250492086_1@480p
    3. 720p
      • ffplay rtmp://pili-live-rtmp.ever.iamlj.com/test-ever/stream27250492086_1@720p

推拉流操作

  1. 推流信息

  2. 720p 播放

  3. 480p 播放

参考

posted @ 2019-03-05 11:54  刘靖  阅读(579)  评论(0编辑  收藏  举报