Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream keys are immediately burned #339

Open
marktheminer opened this issue Jun 4, 2023 · 3 comments
Open

stream keys are immediately burned #339

marktheminer opened this issue Jun 4, 2023 · 3 comments

Comments

@marktheminer
Copy link

Issue

Short description

I just setup the open source red5 server, and if I stream to it from OBS and then stop and try to start again, the key seems invalid and it forces me to choose a new one.

Ideally, I'd like to either have persistent keys or else persistent streams with no keys at all.

So either

stream: /live
keys: one, two, three, four, etc.

or:
stream 1: /one
key 1: empty/null

stream 2: /two
key 2: empty/null

etc.

If I have to burn keys like this, then I can't test the stream, stop and restart at X time as the key will be burned from the test stream.

Environment

[] Operating system and version: Ubuntu 22.04 LTS
[] Java version: Amazon Corretto 11
[] Red5 version: 1.3.19

Expected behavior

Keys should remain valid beyond one time of use.

Actual behavior

Keys are burned after first use.

Steps to reproduce

  1. Begin streaming to /live with stream key one
  2. Stop streaming
  3. Start streaming again, observe error

Logs

Place logs on pastebin or elsewhere and put links here

@mondain
Copy link
Member

mondain commented Jun 5, 2023

In OBS your stream key is synonymous with stream name in Red5. With Red5 there are what we call scopes which could be understood as rooms or contexts; maybe some terms aren't clear or you're not waiting long enough between attempts, but know that stream names are not "burned" once used. When I use OBS, not often, I reuse stream1 over and over on live without issue. We have a short guide at Red5 Pro that might help https://www.red5pro.com/docs/protocols/third-party-publishers/obs/

@marktheminer
Copy link
Author

Thanks, I had run across that guide.

Here's what I see in /var/log/syslog when I try to reuse a key shortly after ending a successful stream:

Jun 11 14:58:17 ingest-2 red5.sh[547]: [WARN] [RTMPRecv@D30RIWLL24Z9X] org.red5.server.net.rtmp.RTMPHandler - Scope not found
Jun 11 14:58:17 ingest-2 red5.sh[547]: org.red5.server.exception.ScopeNotFoundException: Scope not found: LiveApp in null
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at org.red5.server.scope.ScopeResolver.resolveScope(ScopeResolver.java:101)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at org.red5.server.Context.resolveScope(Context.java:147)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at org.red5.server.net.rtmp.RTMPHandler.onCommand(RTMPHandler.java:331)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:123)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at org.red5.server.net.rtmp.RTMPConnection.lambda$handleMessageReceived$3(RTMPConnection.java:1518)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Jun 11 14:58:17 ingest-2 red5.sh[547]: #011at java.base/java.lang.Thread.run(Thread.java:829)
Jun 11 14:58:17 ingest-2 red5.sh[547]: [INFO] [RTMPRecv@D30RIWLL24Z9X] org.red5.server.net.rtmp.RTMPHandler - Scope LiveApp not found on {my ip hidden for this reply}

@marktheminer
Copy link
Author

Even 40 minutes later it won't let me restart with similar log lines to the above plus one new one

Jun 11 15:38:36 ingest-2 red5.sh[547]: [ERROR] [RTMPRecv@FHFXOFTQCRIQV] org.red5.server.stream.StreamService - Bad name stream1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants