Reduce ffmpeg latency
This commit is contained in:
parent
4fb1031508
commit
92cb7fb214
1 changed files with 2 additions and 2 deletions
|
@ -460,7 +460,7 @@ namespace Mist{
|
||||||
std::string samplerate;
|
std::string samplerate;
|
||||||
if (sample_rate){samplerate = "-ar " + JSON::Value(sample_rate).asString();}
|
if (sample_rate){samplerate = "-ar " + JSON::Value(sample_rate).asString();}
|
||||||
snprintf(ffcmd, 10240,
|
snprintf(ffcmd, 10240,
|
||||||
"ffmpeg -hide_banner -loglevel warning -i - -acodec %s %s -strict -2 -ac 2 %s %s -f "
|
"ffmpeg -fflags nobuffer -hide_banner -loglevel warning -i - -acodec %s %s -strict -2 -ac 2 %s %s -f "
|
||||||
"matroska -live 1 -cluster_time_limit 100 - ",
|
"matroska -live 1 -cluster_time_limit 100 - ",
|
||||||
codec.c_str(), samplerate.c_str(), getBitrateSetting().c_str(), flags.c_str());
|
codec.c_str(), samplerate.c_str(), getBitrateSetting().c_str(), flags.c_str());
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ namespace Mist{
|
||||||
|
|
||||||
if (!preset.empty()){options.append(" -preset " + preset);}
|
if (!preset.empty()){options.append(" -preset " + preset);}
|
||||||
|
|
||||||
snprintf(ffcmd, 10240, "ffmpeg -hide_banner -loglevel warning -f lavfi -i color=c=black:s=%dx%d %s %s -c:v %s %s %s %s -an -force_key_frames source -f matroska - ",
|
snprintf(ffcmd, 10240, "ffmpeg-fflags nobuffer -hide_banner -loglevel warning -f lavfi -i color=c=black:s=%dx%d %s %s -c:v %s %s %s %s -an -force_key_frames source -f matroska - ",
|
||||||
res_x, res_y, s_input.c_str(), s_overlay.c_str(), codec.c_str(), options.c_str(),
|
res_x, res_y, s_input.c_str(), s_overlay.c_str(), codec.c_str(), options.c_str(),
|
||||||
getBitrateSetting().c_str(), flags.c_str());
|
getBitrateSetting().c_str(), flags.c_str());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue