smart_rtmpd

smart rtmpd 简介

smart_rtpmd 是一款用于直播,录播性能卓越的服务器。如果您不理解,可以理解为和 nginx-rtmp, srs ,并与此功能类似,特点是性能卓越,跨平台,无依赖,部署和维护十分方便,解压既能运行。
smart rtmpd is a streaming media server. It can run on multiple systems ubuntu, centos, freebsd, windows & arm64. It is small, independent, easy to deploy, and has high performance.

performance battle

nginx-rtmp, srs, zlm, smart_rtmpd
https://www.cnblogs.com/superconvert/p/18421322

smart web

smart web 属于 smart rtmpd 的姊妹版本,是 smart rtmpd 带上 web 管理功能的版本,功能更加强大,性能更加强劲,有进程守护功能,支持 H264(HEVC) 推流和拉流,支持远程配置,日志查看,转发配置,等诸多功能。
支持的操作系统有 windows10, centos8.5, ubuntu22.04, arm64 等系统。

smart web 属于收费版本,目前暂且定价人民币:400 元。

预览版本敬请访问 http://dt4.8tupian.net/2/32453a2b500.pg3

whip/whep 进行 webrtc 的 OBS 推流,H5 拉流

whip_whep.md

说明

特点

支持哪些 OS

益处

最大的益处就是极大的节约您的运营成本,维护成本,迁移成本,

smart rtmpd 下载地址

|站点 |地址 | |—|—| |official |http://www.qiyicc.com/download/rtmpd.zip | |github |https://github.com/superconvert/smart_rtmpd | |gitee |https://gitee.com/superconvert/smart_rtmpd |

smart rtmpd 支持哪些音视频编码

support media codec

video codec audio codec
h264, h265 aac
h264, h265 pcmu/pcma
vp8 ( webrtc ) opus ( webrtc )
h264 ( webrtc ) pcmu/pcma ( webrtc )

support protocol

| client | server | protocol | |—|—|—| |srt |smart_rtmpd |rtmp[s], http[s]-flv, ws(s)-flv, http[s]-hls, https[s]-dash, rtsp[s], webrtc, srt| |rtmp[s] |smart_rtmpd |rtmp[s], http[s]-flv, ws(s)-flv, http[s]-hls, https[s]-dash, rtsp[s], webrtc, srt| |rtsp[s] |smart_rtmpd |rtmp[s], http[s]-flv, ws(s)-flv, http[s]-hls, https[s]-dash, rtsp[s], webrtc, srt|

input & output detail

input video audio output rtmp rtsp( udp/tcp ) flv( http/websocket ) hls dash srt webrtc( video baseline level 3.1 )  
rtmp h264 pcma/pcmu   yes yes yes only video onlyvideo only video h264/vp8, pcma/pcmu  
rtmp h264 aac   yes yes yes yes yes yes h264/vp8, aac - opus  
rtmp hevc pcma/pcmu   yes yes yes only video only video only video only audio = pcma/pcmu
rtmp hevc aac   yes yes yes yes yes yes only audio = aac - opus  
rtsp h264 pcma/pcmu   yes yes yes only video only video only video h264/vp8, pcma/pcmu  
rtsp h264 aac   yes yes yes yes yes yes h264/vp8, aac - opus  
rtsp hevc pcma/pcmu   yes yes yes only video only video only video only audio = pcma/pcmu  
rtsp hevc aac   yes yes yes yes yes yes only audio = aac - opus  
srt h264 aac   yes yes yes yes yes yes h264/vp8, aac - opus  
srt hevc aac   yes yes yes yes yes yes only audio = aac - opus  

URL description

|URL |description |isok | |—|—|—| |rtmp://192.168.1.1:1935/live/stream |live stream|yes | |rtmp://192.168.1.1:1935/rec/stream |record stream|yes | |rmtp://192.168.1.1:1935/sky/camera |bad format|no | |rtsp://192.168.1.105:9554/live/music |live stream|yes | |rtsp://192.168.1.105:9554/rec/music |live stream|yes | |rtsp://192.168.1.105:9554/class/music |bad format|no | |srt://192.168.1.105:9000/live/space |record stream|yes | |srt://192.168.1.105:9000/rec/space |record stream|yes | |srt://192.168.1.105:9000/record/space |bad format|no |

only support “live” or “rec” app tag, but no support “sky”, “class” or “record” other app tag !!!

怎么使用 smart rtmpd

最快部署

  1. 下载软件包,解压 rtmpd.zip, 解压后得到 windows 的 smart_rtmpd 服务器
  2. 运行 smart_rtmpd.exe 如下图,既表示成功 image
  3. 推流验证,运行 ffmpeg.exe ( Windows下的 ffmpeg.exe 下载地址:https://github.com/BtbN/FFmpeg-Builds/releases ) image
  4. 播流验证 image image

例子 ( example )

|说明 |链接 | |—|—| |推拉流 ( pull/pull stream ) |https://github.com/superconvert/smart_rtmpd/tree/master/example| |web接口 ( web interface ) |https://github.com/superconvert/smart_rtmpd/blob/master/web_dev.md | |auth接口 ( web authentication ) |https://github.com/superconvert/smart_rtmpd/blob/master/web_auth.md | |集群 |待续 … | |webrtc |https://github.com/superconvert/smart_rtmpd/blob/master/webrtc.md | |webrtc im |https://github.com/superconvert/smart_rtmpd/blob/master/webrtc_im.md | |录像 ( recording ) |https://blog.csdn.net/freeabc/article/details/103360588 | |nat模式 ( nat mode ) |https://blog.csdn.net/freeabc/article/details/113446129 | |重写 ( rewrite ) |待续 … | |vod配置 ( vod config)|待续 … |

推拉流

https://blog.csdn.net/freeabc/article/details/117403471?spm=1001.2014.3001.5501

build ffmpeg support rtmps, see this link:

https://www.iiwnz.com/compile-ffmpeg-with-rtmps-for-facebook/
you can play rtmps with vlc player.

smart rtmpd recorder stream

https://github.com/superconvert/smart_rtmpd/blob/master/recording.md

smart rtmpd 商业支持

联系方式

| name |description| |—|—| |QQ |99766553 | |QQ 群 |190583317, 300474021, 271191746 | |WebChat(微信) |99766553 | |微信群 |由于微信限制,首先加我微信,邀请进群 | |E-mail(邮箱) |cwf12345@sina.com |

1号交流群(已经满): image
2号交流群(可以加): image
3号交流群(近乎满): image
嘻嘻1号流群(可加): image

download file or vod mode :

  1. you can put a video file into /vod directory, for example: test.mkv
  2. use player ffplay http://192.168.1.1:8080/vod/test.mkv
  3. you can make a sub directory in the /vod, for example: /vod/discovery
  4. put a video file into /vod/discovery directory, for example: space.mkv
  5. use player play it, ffplay http://192.168.1.1:8080/vod/discovery/space.mkv

nat map mode :

image

outer user can push stream rtmp://61.180.166.16/live/stream, inner user can play with rtmp://192.168.1.1/live/stream

build cluster or cdn distribution :

  if you have two server
  server A (intranet ip: 192.168.1.1, domain: www.qiyicc.com) 
  server B (intranet ip: 192.168.1.2, domain: www.qiyicc.com)
 
  you can modify policy.xml file in server A:
  ... ...
  <vhosts>
      <vhost name="rtmp://www.qiyicc.com/live">
      <forward rewrite="">192.168.1.2</forward>			
  </vhost>
  </vhosts>

 if you push stream rtmp://www.qiyicc.com/live/stream to server A, the server A will forward this stream to server B, 
 if you push stream rtmp://www.qiyicc.com/live/sport to server A, it is also forard this stream to server B.
 user can pull url rtmp://www.qiyicc.com/live/stream or rtmp://www.qiyicc.com/live/sport from server B, 
 for many server repeat this proccess or each other forward.
 this is call app forward!

image

forward thirtparty :

 if you have rmtp url rtmp://www.qiyicc.com/live/sport, you cank distribution this stream to other service.
 for example : rtmp://www.espn.com/live/sport, thirtypart server address : 54.230.173.30
 
 you can modify policy.xml file
 ... ...
 ... ...
 <urls>			
     <url name="rtmp://www.qiyicc.com/live/sport">	    
    <forward rewrite="rtmp://www.espn.com/live/sport">54.230.173.30:1935</forward>			
    <forward rewrite="rtmps://www.espn.com/live/sport">54.230.173.32:1935</forward>
    <forward></forward>
 </url>
 </urls>

thirtpart user can play this stream.
this is call url forward!   
good luck.  ![image](images/url%20forward.png)