Skip to content

Commit

Permalink
ffmpeg srt latency
Browse files Browse the repository at this point in the history
  • Loading branch information
amukhsimov committed Mar 17, 2021
1 parent c0a0841 commit b3ed9b0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,13 @@ void *begin_rtmp(void *opinfo) {
char command[1000];
snprintf(command, 1000,
"ffmpeg -fflags +genpts -listen 1 -re -i rtmp://0.0.0.0:%s/rtmp/rtmp2srt "
"-acodec copy -vcodec copy -strict -2 -y -f mpegts srt://127.0.0.1:%s?pkt_size=1316",
"-acodec copy -vcodec copy -strict -2 -y -f mpegts srt://127.0.0.1:%s?pkt_size=1316&latency=2000000",
service_rtmp.c_str(), service_rcv.c_str());

cout << "Invoke cmd" << endl;
system(command);
while (true) {
cout << "Start ffmpeg" << endl;
system(command);
}

return 0;
}
Expand Down

0 comments on commit b3ed9b0

Please sign in to comment.