Code Monkey home page Code Monkey logo

Comments (14)

enginebai avatar enginebai commented on September 4, 2024 1

@app24hk You can go to the youtube creator console and check the streaming status. Make sure that status is good so that you can call transition api successfully.

from yt-watchme.

JohnLeekk avatar JohnLeekk commented on September 4, 2024

@iulukaya hi. I'm having trouble with the problem [forbidden 403, stream is inactive].
Everytime I try to start streaming, this error comes up and cannot stream any longer. I wish you could help me with the problem

from yt-watchme.

enginebai avatar enginebai commented on September 4, 2024

Recently, the broadcast received the streaming normally, and I call the code

Transition transitionRequest = youtube.liveBroadcasts().transition(
                "live", broadcastId, "status");
transitionRequest.execute();

and I always get this error response:

{
  "code": 403,
  "errors": [
    {
      "domain": "youtube.liveBroadcast",
      "message": "Invalid transition",
      "reason": "invalidTransition",
      "extendedHelp": "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/transition#params"
    }
  ],
  "message": "Invalid transition"
}

Is something wrong??

from yt-watchme.

JohnLeekk avatar JohnLeekk commented on September 4, 2024

@enginebai Oh! How did you solved out the problem [stream is inactive]? I'm still having problem...
please tell me how you did it!!

from yt-watchme.

enginebai avatar enginebai commented on September 4, 2024

@JohnLeekk Have you uploaded your stream to youtube successfully?? I solved this problem after uploading the stream successfully.

But I encountered another problem when trying to start the broadcast, the transition API response always returns Invalid transition status, my streaming status is good, I don't know what the problem is.

from yt-watchme.

JohnLeekk avatar JohnLeekk commented on September 4, 2024

@enginebai Yes. I uploaded stream successfully. I can not find any Exceptions during creating Broadcast. However when I try to change status to "Live", [stream is inactive] error occurs. Also I have same problem [Invalid transition] when I change status to "complete". I could not figure out what is wrong......

from yt-watchme.

enginebai avatar enginebai commented on September 4, 2024

1111

@JohnLeekk Have you seen this screen? Is your streaming status good? If not, you should fix the problem first.

from yt-watchme.

JohnLeekk avatar JohnLeekk commented on September 4, 2024

@enginebai Yeah! I've checked the stream status and it's good. So your app normally streams video from smartphone?
A week ago changing API key on Developer Console made me stream well. try it!

from yt-watchme.

app24hk avatar app24hk commented on September 4, 2024

{
"code": 403,
"errors": [
{
"domain": "youtube.liveBroadcast",
"message": "Stream is inactive",
"reason": "errorStreamInactive",
"extendedHelp": "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/transition"
}
],
"message": "Stream is inactive"
}

getting error, how to resolve this??

from yt-watchme.

abram456 avatar abram456 commented on September 4, 2024

@enginebai, I'm not able to find streaming status option in creator studio. Can you help me out in detail?

from yt-watchme.

mcxycross avatar mcxycross commented on September 4, 2024

Here's my solution.
If you guys are using Youtube WatchMe sample, in YoutubeAPI > startEvent method, set the Thread.sleep() a little bit longer. The default value is 10000 in ms, I set mine to 20000.

...
public static void startEvent(YouTube youtube, String broadcastID) throws IOException{
        try {
            Thread.sleep(20000);
        } catch (InterruptedException e) {
            Log.e(MainActivity.APP_NAME, "", e);
        }
        YouTube.LiveBroadcasts.Transition transitionRequest = youtube.liveBroadcasts()
                .transition("live", broadcastID, "status");
        transitionRequest.execute();
}
...

Well, I guess the idea is to wait until StreamingActivity loaded and Ffmpeg starts tramitting data to YouTube so that the stream status changed to 'good' or 'ok' as long as not 'no data', and then we can do the transition request.
Hope it helps :)

from yt-watchme.

enginebai avatar enginebai commented on September 4, 2024

Yeap, @mcxycross provides a work-around solution. It works at all, I think that the problem is thread issue.

from yt-watchme.

nphausg avatar nphausg commented on September 4, 2024

To live stream on mobile, your channel will need to have at least 1,000 subscribers. Note that this eligibility threshold does not apply to other live streaming tools. Creators who have less than 1,000 subscribers can still live stream through a computer and webcam.
https://support.google.com/youtube/answer/2853834?hl=en

from yt-watchme.

imran855 avatar imran855 commented on September 4, 2024

Problem:
"message": "Stream is inactive" means, you call the below code before connecting the RTMP server.

Transition transitionRequest = youtube.liveBroadcasts().transition("live", broadcastId, "status"); transitionRequest.execute();

Solution:
You have to call the above code after connecting the stream server. Another way you can do it is by enabling autostart when creating a broadcast event. When you enable auto-start, you do not need to call the above code. Here is the sample code for enabling auto-start.

LiveBroadcastContentDetails contentDetails = new LiveBroadcastContentDetails(); contentDetails.set("enableAutoStart", true);

from yt-watchme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.