-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
v1_EN_SampleRTMP
RTMP部署的步骤。
Suppose the server ip is 192.168.1.170
Step 1, get SRS. For detail, read GIT
git clone https://github.com/winlinvip/simple-rtmp-server
cd simple-rtmp-server/trunk
Or update the exists code:
git pull
Step 2, build SRS. For detail, read Build
./configure --disable-all --with-ssl && make
第三步,编写SRS配置文件。 For detail, read RTMP
将以下内容保存为文件,譬如conf/rtmp.conf
,服务器启动时指定该配置文件(srs的conf文件夹有该文件)。
# conf/rtmp.conf
listen 1935;
max_connections 1000;
vhost __defaultVhost__ {
}
第三步,启动SRS。 For detail, read RTMP
./objs/srs -c conf/rtmp.conf
第四步,启动推流编码器。 For detail, read RTMP
使用FFMPEG命令推流:
for((;;)); do \
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
-vcodec copy -acodec copy \
-f flv -y rtmp://192.168.1.170/live/livestream; \
sleep 1; \
done
或使用FMLE推流:
FMS URL: rtmp://192.168.1.170/live
Stream: livestream
第五步,观看RTMP流。 For detail, read RTMP
RTMP url is: rtmp://192.168.1.170:1935/live/livestream
User can use vlc to play the RTMP stream.
Or, use online SRS player: http://winlinvip.github.io/srs.release/trunk/research/players/srs_player.html?vhost=defaultVhost&autostart=true&server=192.168.1.170&app=live&stream=livestream&port=1935
Note: Please replace all ip 192.168.1.170 to your server ip.
Winlin 2014.3
Welcome to SRS wiki!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: