summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/encavcodec.c16
-rw-r--r--libhb/encavcodecaudio.c16
2 files changed, 32 insertions, 0 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index 278dc926e..a5acadaa4 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -753,6 +753,22 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
free(filename);
}
+ if( 3 <= global_verbosity_level ) {
+ // Allow user to see av_opts in log file and see ffmpeg verbosity
+ int av_log_level = av_log_get_level();
+ char * av_opts_string = NULL;
+ hb_log( "encavcodec: verbosity enabled: %d", global_verbosity_level);
+ if( 0 <= av_dict_get_string(av_opts, &av_opts_string, '=', ',') && NULL != av_opts_string ) {
+ hb_log( "encavcodec: avcodec_open options: %s", av_opts_string);
+ free(av_opts_string);
+ } else {
+ hb_log( "encavcodec: Error gathering avcodec_open options");
+ }
+ if( AV_LOG_VERBOSE > av_log_level ) {
+ av_log_set_level(AV_LOG_VERBOSE);
+ }
+ }
+
if (hb_avcodec_open(context, codec, &av_opts, HB_FFMPEG_THREADS_AUTO))
{
hb_log( "encavcodecInit: avcodec_open failed" );
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index 52fc4565d..839b1b66c 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -203,6 +203,22 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
// packet instead.
context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ if( 3 <= global_verbosity_level ) {
+ // Allow user to see av_opts in log file and see ffmpeg verbosity
+ int av_log_level = av_log_get_level();
+ char * av_opts_string = NULL;
+ hb_log( "encavcodeca: verbosity enabled: %d", global_verbosity_level);
+ if( 0 <= av_dict_get_string(av_opts, &av_opts_string, '=', ',') && NULL != av_opts_string ) {
+ hb_log( "encavcodeca: avcodec_open options: %s", av_opts_string);
+ free(av_opts_string);
+ } else {
+ hb_log( "encavcodeca: Error gathering avcodec_open options");
+ }
+ if( AV_LOG_VERBOSE > av_log_level ) {
+ av_log_set_level(AV_LOG_VERBOSE);
+ }
+ }
+
if (hb_avcodec_open(context, codec, &av_opts, 0))
{
hb_error("encavcodecaInit: hb_avcodec_open() failed");