mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
update readme
This commit is contained in:
parent
bf18a3ac96
commit
18028ad4cb
3 changed files with 934 additions and 930 deletions
|
@ -36,7 +36,8 @@ FMS URL: rtmp://127.0.0.1:1935/live
|
||||||
Stream: livestream
|
Stream: livestream
|
||||||
For example, use ffmpeg to publish:
|
For example, use ffmpeg to publish:
|
||||||
for((;;)); do \
|
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; \
|
-f flv -y rtmp://127.0.0.1:1935/live/livestream; \
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
done
|
done
|
||||||
|
|
1
trunk/src/core/srs_core_encoder.cpp
Normal file → Executable file
1
trunk/src/core/srs_core_encoder.cpp
Normal file → Executable file
|
@ -109,6 +109,7 @@ int SrsFFMPEG::initialize(std::string vhost, std::string port, std::string app,
|
||||||
if (output.length() > input.length()) {
|
if (output.length() > input.length()) {
|
||||||
tail = output.substr(input.length());
|
tail = output.substr(input.length());
|
||||||
}
|
}
|
||||||
|
// TODO: better dead loop check.
|
||||||
// if input also endwiths the tail, loop detected.
|
// if input also endwiths the tail, loop detected.
|
||||||
if (!tail.empty() && input.rfind(tail) == input.length() - tail.length()) {
|
if (!tail.empty() && input.rfind(tail) == input.length() - tail.length()) {
|
||||||
ret = ERROR_ENCODER_LOOP;
|
ret = ERROR_ENCODER_LOOP;
|
||||||
|
|
2
trunk/src/core/srs_core_forward.cpp
Normal file → Executable file
2
trunk/src/core/srs_core_forward.cpp
Normal file → Executable file
|
@ -77,6 +77,8 @@ int SrsForwarder::on_publish(std::string vhost, std::string _app, std::string st
|
||||||
server = forward_server;
|
server = forward_server;
|
||||||
port = 1935;
|
port = 1935;
|
||||||
|
|
||||||
|
// TODO: dead loop check.
|
||||||
|
|
||||||
size_t pos = forward_server.find(":");
|
size_t pos = forward_server.find(":");
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
port = ::atoi(forward_server.substr(pos + 1).c_str());
|
port = ::atoi(forward_server.substr(pos + 1).c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue