Skip to content

Commit

Permalink
added Restream platform support
Browse files Browse the repository at this point in the history
* Add restream let's you stream to LinkedIn Live

* linkedin live via restream

* updated CHANGELOG

Co-authored-by: Michael Kamprath <[email protected]>
  • Loading branch information
lvnilesh and michaelkamprath authored May 17, 2021
1 parent c558a69 commit 2b48698
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion multistreaming-server/rtmp-conf-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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%%'
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2b48698

Please sign in to comment.