update readme

pull/133/head
winlin 11 years ago
parent bf18a3ac96
commit 18028ad4cb

@ -36,7 +36,8 @@ FMS URL: rtmp://127.0.0.1:1935/live
Stream: livestream
For example, use ffmpeg to publish:
for((;;)); do \
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv -vcodec copy -acodec copy \
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv \
-vcodec copy -acodec copy \
-f flv -y rtmp://127.0.0.1:1935/live/livestream; \
sleep 1; \
done

@ -109,6 +109,7 @@ int SrsFFMPEG::initialize(std::string vhost, std::string port, std::string app,
if (output.length() > input.length()) {
tail = output.substr(input.length());
}
// TODO: better dead loop check.
// if input also endwiths the tail, loop detected.
if (!tail.empty() && input.rfind(tail) == input.length() - tail.length()) {
ret = ERROR_ENCODER_LOOP;

@ -77,6 +77,8 @@ int SrsForwarder::on_publish(std::string vhost, std::string _app, std::string st
server = forward_server;
port = 1935;
// TODO: dead loop check.
size_t pos = forward_server.find(":");
if (pos != std::string::npos) {
port = ::atoi(forward_server.substr(pos + 1).c_str());

Loading…
Cancel
Save