From ccf6cf5bd5bdbb57f1eda960c363f0b0e2028d7d Mon Sep 17 00:00:00 2001 From: Michael Kamprath Date: Sun, 22 Nov 2020 21:05:00 -0800 Subject: [PATCH] fix handling of integer values in string replace. Closes #29 --- CHANGELOG.md | 12 +++++++++++- multistreaming-server/rtmp-conf-generator.py | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fca589d..3098dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,17 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed +* Corrected bug that occurred when audio bit rated was configured in JSON using an integer + +## [0.4.0] ### Added * Support for Mixcloud and DLive. +* Added support for specifying transcode profiles that can be used across multiple destination configurations. +* Add kubernetes manifests, fix nginx logging, streamline the dockerfile + +### Changed +* Refactored how processes are managed within the Docker container. Migrated to `jinja2`, use `pipfile` and `supervisord`. ### Fixed * Corrected a spelling error in the file path that the Docker image looks for the JSON configuration. @@ -51,7 +60,8 @@ All notable changes to this project will be documented in this file. * First verison! -[Unreleased]: https://github.com/michaelkamprath/multi-service-rtmp-broadcaster/compare/v0.3.1...HEAD +[Unreleased]: https://github.com/michaelkamprath/multi-service-rtmp-broadcaster/compare/v0.4.0...HEAD +[0.4.0]: https://github.com/michaelkamprath/multi-service-rtmp-broadcaster/compare/v0.3.1...v0.4.0 [0.3.1]: https://github.com/michaelkamprath/multi-service-rtmp-broadcaster/compare/v0.3.0...v0.3.1 [0.3.0]: https://github.com/michaelkamprath/multi-service-rtmp-broadcaster/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/michaelkamprath/multi-service-rtmp-broadcaster/compare/v0.1.2...v0.2.0 diff --git a/multistreaming-server/rtmp-conf-generator.py b/multistreaming-server/rtmp-conf-generator.py index 66248cb..df2da45 100755 --- a/multistreaming-server/rtmp-conf-generator.py +++ b/multistreaming-server/rtmp-conf-generator.py @@ -130,14 +130,14 @@ def generateTranscodeConfig(transcode_config_name, block_config, config): ): transcode_config['audioOpts'] = RTMP_TRANSCODE_AUDIO_OPTS_CUSTOM.replace( '%%AUDIO_BIT_RATE%%', - transcode_config_block.get( + str(transcode_config_block.get( 'audioBitRate', DEFAULT_AUDIO_OPTS['audioBitRate'] - ), + )), ).replace( '%%AUDIO_SAMPLE_RATE%%', - transcode_config_block.get( + str(transcode_config_block.get( 'audioSampleRate', DEFAULT_AUDIO_OPTS['audioSampleRate'] - ), + )), ) return transcode_config