YouTube Live Streaming API Snippet.scheduledStartTime not Working while Creating Live Broadcast
I am creating YouTube live broadcast using API explorer everything is working fine but Snippet.scheduledStartTime is not working fine. My time zone is +05:00 and country is Pakistan. I want to schedule event at 2019-01-18 04:50 PM . I have set the Snippet.scheduledStartTime to 2019-01-18T11:50:00.000Z but on event page it shows Starts January 18, 2019 at 3:50 AM (PST) when I click edit it shows wrong country and time zone like that United States (GMT -08:00) Pacific I want to use javascript or php client libraries. Please let me know how I can fix it? Here is my php code
$broadcastSnippet = new Google_Service_YouTube_LiveBroadcastSnippet(); $broadcastSnippet->setTitle('New Test Broadcast'); $broadcastSnippet->setScheduledStartTime('2019-01-18T11:50:00.000Z');
- google-api
- google-api-php-client
- google-apis-explorer
- youtube-livestreaming-api
Saved searches
Use saved searches to filter your results more quickly
Cancel Create saved search
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
youtube / yt-watchme Public archive
Stream is always inactive #25
enginebai opened this issue Jul 10, 2015 · 14 comments
Stream is always inactive #25
enginebai opened this issue Jul 10, 2015 · 14 comments
Comments
enginebai commented Jul 10, 2015
After creating a broadcast and start the streaming, I always get ths error caused by calling YouTubeApi.startEvent() .
Transition transitionRequest = youtube.liveBroadcasts().transition( "live", broadcastId, "status"); transitionRequest.execute();
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden < "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" > at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469) at com.google.android.apps.watchme.util.YouTubeApi.startEvent(YouTubeApi.java:187) at com.google.android.apps.watchme.MainActivity$StartEventTask.doInBackground(MainActivity.java:389) at com.google.android.apps.watchme.MainActivity$StartEventTask.doInBackground(MainActivity.java:374) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
How can I fix this problem??
The text was updated successfully, but these errors were encountered:
Broadcast Creation Error Youtube API Error
I am new to OBS today but looked everywhere online for an answer to this problem.
When I try to set up a managed broadcast I get this error? Broadcast Creation Error YouTube API Error
Can you help me with this problem please. I don’t know if it is YouTube or obs.
I did it 3 times I thought maybe I was putting to much info so the last time I did it I just put a shot title and short description.
If you can point me in the right direction I would appreciate it.
I couldn’t find a place to put a stream key I figure because I am logged in to my channel.
Screen Shot https://prnt.sc/25xheg2
Attachments
Log File.txt
12.2 KB · Views: 667
Gcattleman
New Member
Ok I fixed it was the logining in when I disconnected my account and put in the key it works plus I didn’t have to use the manage broadcast
How to livestream to Youtube using the Youtube Live Streaming API
Note that in production there are more steps you need to consider to make this application more user friendly. For example you need to also create a step to end the broadcast on Youtube. To do this follow the documentation and transition the broadcastStatus to complete.
You might be wondering about step 5. Well that is pretty complicated. There are probably multiple ways to do this, but the way I did it is setting up a node js server with FFmpeg to encode the video and then relay the encoded video to Youtube. You can find the code for that HERE.
If you’re curious you can check out my open source project that allows users to stream to platforms like Youtube and Twitch at the same time. Here’s the code and here’s the link to take the product for a spin. Enjoy and feel free to reach out to me if you have any questions about working with the live streaming api.