diff --git a/CHANGELOG.md b/CHANGELOG.md index ffbb836..c7f0454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added +* Support for ReStream, and by extension, platforms that ReStream supports, such as LinkedIn. + ### Changed * Bumped jinja2 from 2.11.2 to 2.11.3 -* Updated `apk` to use the `latest-stable` rather than `edge` as `edge` appears to not be updatd. +* Updated `apk` to use the `latest-stable` rather than `edge` as `edge` appears to not be updated. ## [0.4.1] ### Changed diff --git a/README.md b/README.md index da1deb3..9e0cf0a 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,18 @@ Here is an example of the JSON configuration file: } }, "rebroadcastList": [ + { + "name": "linkedin-via-restream", + "platform": "restream", + "streamKey": "whatever", + "transcode": { + "pixels": "1920x1080", + "videoBitRate": "3500k", + "videoKeyFrameSecs": 2, + "audioBitRate": "160k", + "audioSampleRate": 44100 + } + }, { "name": "youtube", "platform": "youtube", diff --git a/multistreaming-server/rtmp-conf-generator.py b/multistreaming-server/rtmp-conf-generator.py index 398de46..0d52832 100755 --- a/multistreaming-server/rtmp-conf-generator.py +++ b/multistreaming-server/rtmp-conf-generator.py @@ -27,6 +27,8 @@ '-c:a libfdk_aac -b:a %%AUDIO_BIT_RATE%% -ar %%AUDIO_SAMPLE_RATE%%' ) +# https://support.restream.io/en/articles/73108-best-settings +PUSH_URL_RESTREAM = 'rtmp://live.restream.io/live/%%STREAM_KEY%%' # Restream let's you stream to LinkedIn Live PUSH_URL_YOUTUBE = 'rtmp://a.rtmp.youtube.com/live2/%%STREAM_KEY%%' PUSH_URL_FACEBOOK = 'rtmp://127.0.0.1:19350/rtmp/%%STREAM_KEY%%' PUSH_URL_TWITCH = 'rtmp://live-cdg.twitch.tv/app/%%STREAM_KEY%%' @@ -60,7 +62,10 @@ def generatePlatormPushURL(block_config): print('ERROR - Application block is missing platform element.', file=sys.stderr) exit(1) push_url = 'push-it-real-good' - if block_config['platform'] == 'youtube': + + if block_config['platform'] == 'restream': + push_url = PUSH_URL_RESTREAM.replace('%%STREAM_KEY%%', block_config['streamKey']) + elif block_config['platform'] == 'youtube': push_url = PUSH_URL_YOUTUBE.replace('%%STREAM_KEY%%', block_config['streamKey']) elif block_config['platform'] == 'facebook': # must push through stunnel. Push through Facebook stunnel port.