tv icon indicating copy to clipboard operation
tv copied to clipboard

chore: add stream key support

Open ssddOnTop opened this issue 1 year ago â€ĸ 4 comments

I'd like to set a password (aka stream key), to avoid access to bad actors.

Suggestion:

  1. allow us to set a custom password
  2. autogenerate password and add a button to generate a new password

ssddOnTop avatar May 26 '24 06:05 ssddOnTop

Thanks for the suggestion!

Let's split up Stream URL into RTMP URL + Stream key and add reset & copy buttons

RTMP URL without a path is likely invalid so we probably also need to append an arbitrary path like /live (so the RTMP URL becomes rtmp://tv.algora.io:9006/live)

Let's also make sure the change is backward compatible such that someone without a stream key inputted into OBS can continue streaming. That'll involve updating the Algora.Pipeline.MessageValidator.validate_connect logic

To reset the key we can use the existing Algora.Accounts.gen_stream_key function

/bounty $75

zcesur avatar Aug 16 '24 13:08 zcesur

~~## 💎 $75 bounty â€ĸ Algora~~

~~### Steps to solve:~~ ~~1. Start working: Comment /attempt #41 with your implementation plan~~ ~~2. Submit work: Create a pull request including /claim #41 in the PR body to claim the bounty~~ ~~3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts~~

~~### ❗ Important guidelines:~~ ~~- To claim a bounty, you need to provide a short demo video of your changes in your pull request~~ ~~- If anything is unclear, ask for clarification before starting as this will help avoid potential rework~~ ~~- For assistance or questions, join our Discord~~

~~Thank you for contributing to algora-io/tv!~~

~~Add a bounty â€ĸ Share on socials~~

Attempt Started (GMT+0) Solution
đŸŸĸ @onyedikachi-david Aug 16, 2024, 2:55:29 PM WIP
đŸŸĸ @lastcanal Sep 17, 2024, 3:51:09 PM #98

algora-pbc[bot] avatar Aug 16 '24 13:08 algora-pbc[bot]

/attempt #41

Algora profile Completed bounties Tech Active attempts Options
@onyedikachi-david 5 bounties from 2 projects
JavaScript, Shell
īšŸ61
Cancel attempt

onyedikachi-david avatar Aug 16 '24 14:08 onyedikachi-david

It looks like the Connect validator message has the app parameter with the url based stream key, while the ReleaseStream message has the real stream_key parameter. In order to support both we will need to coordinate stream key acceptance in the Pipeline. This will prevent double initializing forwarded RTMP connections, etc. and allow the graceful shutdown of the Pipeline on invalid stream keys.

My plan is to move all the setup logic from the Validator into the Pipeline and GenServer call into the pipeline from the validator on both the Connect and ReleaseStream message. I am hoping to delay calling Library.init_livestream! until after the stream is validated, preventing any DB writes before authentication. Also, in order to implement #73 we will need to connect a user to the pipeline before a new video is created or any HLS outputs are connected. This can be accomplished by switching to Tee.Parallel and delaying the creation of the HLS child until the stream is validated, all while removing the need to pass video_id to the validator.

/attempt #41

Algora profile Completed bounties Tech Active attempts Options
@lastcanal 1 algora bounty
Elixir, C++,
JavaScript & more
Cancel attempt

lastcanal avatar Sep 17 '24 15:09 lastcanal

Sounds great, LFG!

zcesur avatar Sep 17 '24 16:09 zcesur

💡 @lastcanal submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar Sep 18 '24 03:09 algora-pbc[bot]

🎉🎈 @lastcanal has been awarded $100! 🎈🎊

algora-pbc[bot] avatar Sep 19 '24 12:09 algora-pbc[bot]