1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

update readme

This commit is contained in:
winlin 2013-12-01 13:04:09 +08:00
parent bf18a3ac96
commit 18028ad4cb
3 changed files with 934 additions and 930 deletions

View file

@ -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

1
trunk/src/core/srs_core_encoder.cpp Normal file → Executable file
View file

@ -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;

2
trunk/src/core/srs_core_forward.cpp Normal file → Executable file
View file

@ -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());