Skip to content

SampleRTMP

winlin edited this page Mar 10, 2014 · 23 revisions

RTMP部署实例

RTMP部署的步骤。

假设服务器的IP是:192.168.1.170

第一步,获取SRS。详细参考GIT获取代码

git clone https://github.com/winlinvip/simple-rtmp-server
cd simple-rtmp-server/trunk

或者使用git更新已有代码:

git pull

第二步,编译SRS。详细参考Build

./configure && make

第三步,编写SRS配置文件。详细参考RTMP分发

# conf/rtmp.conf
listen              1935;
vhost __defaultVhost__ {
}

第三步,启动SRS。详细参考RTMP分发

./objs/srs -c conf/rtmp.conf

第四步,启动推流编码器。详细参考RTMP分发

    for((;;)); do \
        ./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
        -vcodec copy -acodec copy \
        -f flv -y rtmp://127.0.0.1/live/livestream; \
        sleep 1; \
    done

或使用FMLE推流:

FMS URL: rtmp://127.0.0.1/live
Stream: livestream

Winlin 2014.3

Welcome to SRS wiki!

SRS 5.0 wiki

Please select your language:

SRS 4.0 wiki

Please select your language:

SRS 3.0 wiki

Please select your language:

SRS 2.0 wiki

Please select your language:

SRS 1.0 wiki

Please select your language:

Clone this wiki locally