Ffmpeg logs optional (#2345)

* make ffmpeg logs configurable via web

* fix Info
This commit is contained in:
Pliable Pixels 2018-12-14 08:01:23 -05:00 committed by Isaac Connor
parent 3a08178500
commit ebaafef607
2 changed files with 18 additions and 1 deletions

View File

@ -1202,6 +1202,20 @@ our @options = (
category => 'logging',
},
{
name => 'ZM_LOG_FFMPEG',
default => 'yes',
description => 'Log FFMPEG messages',
help => q`
When enabled (default is on), this option will log FFMPEG messages.
FFMPEG messages can be useful when debugging streaming issues. However,
depending on your distro and FFMPEG version, this may also result in
more logs than you'd typically like to see. If all your streams are working
well, you may choose to turn this off.
`,
type => $types{boolean},
category => 'logging',
},
{
name => 'ZM_LOG_DEBUG',
default => 'no',
description => 'Switch debugging on',

View File

@ -73,7 +73,10 @@ void FFMPEGInit() {
av_log_set_level( AV_LOG_DEBUG );
else
av_log_set_level( AV_LOG_QUIET );
av_log_set_callback(log_libav_callback);
if ( config.log_ffmpeg )
av_log_set_callback(log_libav_callback);
else
Info("Not enabling ffmpeg logs, as LOG_FFMPEG is disabled in options");
av_register_all();
avformat_network_init();
bInit = true;