[SRS流媒體]RTMP/HLS 直播伺服器simple-rtmp-server安裝

meetrice發表於2016-04-24

一個採用MIT協議授權的國產的簡單的RTMP/HLS 直播伺服器,其核心的價值理念在於簡單高效。

使用方法:

tep 1: build srs

tar xf simple-rtmp-server-*.*.tar.gz
cd simple-rtmp-server-*.*/trunk
./configure --with-ssl --with-hls
make

step 2: start srs

./objs/simple_rtmp_server -c conf/srs.conf

step 3(optional): start nginx for HLS

sudo ./objs/nginx/sbin/nginx

step 4: publish live stream

FMS URL: rtmp://127.0.0.1:1935/live
Stream: livestream
For example, use ffmpeg to publish:
ffmpeg -re -i source.flv -vcodec copy -acodec copy \
-f flv -y rtmp://127.0.0.1:1935/live/livestream

step 5: play live stream

rtmp url: rtmp://127.0.0.1:1935/live/livestream
m3u8 url: http://127.0.0.1:80/live/livestream.m3u8
 

相關文章