diff --git a/slideshow_CONTROLLER.py b/slideshow_CONTROLLER.py index ab5318a..f0960ff 100644 --- a/slideshow_CONTROLLER.py +++ b/slideshow_CONTROLLER.py @@ -342,7 +342,7 @@ def audio_standardize_and_import_file(audio_filename, headroom_db, ignore_error_ stats = r'-stats' benchmark = r'-benchmark' else: - loglevel = 'info' + loglevel = 'warning' stats = r'-nostats' benchmark = stats # a hack to workaround ffmpeg rejecting zero length string'' @@ -354,7 +354,7 @@ def audio_standardize_and_import_file(audio_filename, headroom_db, ignore_error_ '-threads', str(UTIL.NUM_THREADS_FOR_FFMPEG_DECODER), '-i', audio_filename, '-vn', - '-af', f'ebur128=peak=true:target={headroom_db}:dualmono=true', # this normalizes audio using industry standard ebur128; ffmpeg takes a while and it may not even work + '-af', f'ebur128=peak=true:target={headroom_db}:dualmono=true:framelog=quiet', # this normalizes audio using industry standard ebur128; ffmpeg takes a while and it may not even work '-acodec', temporary_background_audio_codec, '-threads', str(UTIL.NUM_THREADS_FOR_FFMPEG_ENCODER), '-ac', str(target_background_audio_channels), diff --git a/slideshow_LOAD_SETTINGS.py b/slideshow_LOAD_SETTINGS.py index 9128a6a..aca842d 100644 --- a/slideshow_LOAD_SETTINGS.py +++ b/slideshow_LOAD_SETTINGS.py @@ -561,20 +561,26 @@ def load_settings(): TARGET_RESOLUTION = list(valid_TARGET_RESOLUTION.keys())[0] # the first key in that dict TARGET_WIDTH = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['WIDTH'] TARGET_HEIGHT = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['HEIGHT'] - TARGET_VIDEO_BITRATE = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['BITRATE'] TARGET_FPSNUM = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['FRAMERATE_NUMERATOR'] TARGET_FPSDEN = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['FRAMERATE_DENOMINATOR'] + TARGET_VIDEO_BITRATE = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['BITRATE'] + print(f'load_settings: WARNING: TARGET_RESOLUTION "{final_settings_dict["TARGET_RESOLUTION"]}" not one of {valid_TARGET_RESOLUTION}, resetting to "{TARGET_RESOLUTION}"',flush=True,file=sys.stderr) final_settings_dict['TARGET_RESOLUTION'] = TARGET_RESOLUTION + TARGET_RESOLUTION = final_settings_dict['TARGET_RESOLUTION'] # grab the specified TARGET_RESOLUTION TARGET_WIDTH = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['WIDTH'] # based on specified TARGET_RESOLUTION TARGET_HEIGHT = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['HEIGHT'] # based on specified TARGET_RESOLUTION - TARGET_VIDEO_BITRATE = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['BITRATE'] # based on specified TARGET_RESOLUTION + TARGET_FPSNUM = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['FRAMERATE_NUMERATOR'] + TARGET_FPSDEN = valid_TARGET_RESOLUTION[TARGET_RESOLUTION]['FRAMERATE_DENOMINATOR'] + TARGET_VIDEO_BITRATE = final_settings_dict['TARGET_VIDEO_BITRATE'] # based on specified TARGET_RESOLUTION, allow user to change it + + final_settings_dict['TARGET_RESOLUTION'] = TARGET_RESOLUTION final_settings_dict['TARGET_WIDTH'] = TARGET_WIDTH # poke back the right value based on specified TARGET_RESOLUTION final_settings_dict['TARGET_HEIGHT'] = TARGET_HEIGHT # poke back the right value based on specified TARGET_RESOLUTION - final_settings_dict['TARGET_VIDEO_BITRATE'] = TARGET_VIDEO_BITRATE # poke back the right value based on specified TARGET_RESOLUTION final_settings_dict['TARGET_FPSNUM'] = TARGET_FPSNUM # poke back the right value based on specified TARGET_RESOLUTION final_settings_dict['TARGET_FPSDEN'] = TARGET_FPSDEN # poke back the right value based on specified TARGET_RESOLUTION + final_settings_dict['TARGET_VIDEO_BITRATE'] = TARGET_VIDEO_BITRATE # poke back the right value based on specified TARGET_RESOLUTION if final_settings_dict['SORT_TYPE'].lower() not in valid_SORT_TYPES: print(f'load_settings: WARNING: SORT_TYPE "{final_settings_dict["SORT_TYPE"]}" not one of {valid_SORT_TYPES}, defaulting to "{SORT_TYPE}"',flush=True,file=sys.stderr)