Generating A New Youtube Live Streaming Key
Your application must have authorization credentials to be able to use the YouTube Live Streaming API. This document describes the different types of authorization credentials that the Google API Console supports. It also explains how to find or create authorization credentials for your project.
But recently I discovered that every time I do a live stream, I have to start updating the embeded code on my site each time with the one that will be generated from my live channel. This is because it keeps regenerating a different code.
YouTube Live Streaming embed code keeps changing. Ask Question Asked 3 years, 7 months ago. Active 3 years, 7 months ago. Viewed 19k times 8. I do live streaming with YouTube and I can watch it on my site by coping the embed code into my site. Its looks like this below. Community and Moderator guidelines for escalating issues via new. Youtube's streaming feature is an afterthought on their part. It can never even hope to compare to services that are dedicated to streaming live feeds. Take my advice: don't even remotely consider using Youtube as a streaming service, because it ISN'T a streaming service. It's a place to upload videos of cats. Author: Richard more than 6 years ago. The key identifies your project and provides API access, quota, and reports. Note that all of the methods for the YouTube Live Streaming API require OAuth 2.0 authorization. For that reason, you need to follow the instructions above for generating OAuth 2.0 credentials.
Create your project and select API services
Create a channel trailer or teaser video to promote the event. Share your streaming link at least 48 hours before you go live. Connect your social media accounts to your channel for easy sharing.; Create a custom post for your subscribers and social media sites. The message will post, including the event link, when the Public event goes live. Youtube's streaming feature is an afterthought on their part. It can never even hope to compare to services that are dedicated to streaming live feeds. Take my advice: don't even remotely consider using Youtube as a streaming service, because it ISN'T a streaming service. It's a place to upload videos of cats. Author: Richard more than 6 years ago.
- Open the Credentials page in the API Console.
- The page allows you to create two different types of credentials. However, all of the methods for the YouTube Live Streaming API require OAuth 2.0 authorization. Follow the instructions below to generate OAuth 2.0 credentials.
OAuth 2.0: Whenever your application requests private user data, it must send an OAuth 2.0 token along with the request. Your application first sends a client ID and, possibly, a client secret to obtain a token. You can generate OAuth 2.0 credentials for web applications, service accounts, or installed applications.
For more information, see the OAuth 2.0 documentation.
API keys: You have the option of including an API key with a request. The key identifies your project and provides API access, quota, and reports.
Note that all of the methods for the YouTube Live Streaming API require OAuth 2.0 authorization. For that reason, you need to follow the instructions above for generating OAuth 2.0 credentials. If you want, you can also send an API key, but that's not necessary.
The API supports several types of restrictions on API keys. If the API key that you need doesn't already exist, then create an API key in the Console by clicking Create credentials > API key. You can restrict the key before using it in production by clicking Restrict key and selecting one of the Restrictions.
To keep your API keys secure, follow the best practices forsecurely using API keys.
Let me start by saying it has been an amazing year and a half live streaming on YouTube. Ever since I started using the platform I have been blown away by how “Dummy Proof” YouTube has made live streaming. YouTube has done an amazing job improving their live streaming platform over the best 18 months and along the way we have been 99% satisfied. In my honest opinion, the platform satisfies 95% of the wants, needs and desires from the live stream community and my hat is off to the YouTube Live team for implementing 4K (still in BETA) before the end of 2016.
Yes, YouTube has made “going live” dummy proof but the platform still contains some minor errors which I highlight in this guide to provide troubleshooting expertise. I hope that identifying these YouTube Live errors will lead to an eventual fix and prepare you for an unexpected error before the all important live event. The first time I saw some of these errors I was annoyed and perplexed (even forcing me to cancel a live show). The CDN (Content Delivery Network) is usually the last piece of the puzzle when it comes to live streaming an event and it’s also the most important. Without it no one is going to see our beautiful video production that we spent so much time preparing.
I hope this guide will help YouTube Live users feel more confident when they go live..
Common Error #1 - The Stream Key Error
There are two ways to live stream on YouTube. First, you can stream using your “Stream Now” panel in the creator studio which is essentially your channels live to the world page. The URL for this live stream is always the same, making it easy to direct your user base to (it looks something like youtube.com/c/YourChannel/live. This stream option is used by new stations and 24/7 broadcasting users because the statistics are attributed to the channel itself. If you want to show up in the “live” YouTube channel which has over 2 million subscribers this is the way to do so.
I have never had an issue live streaming to my channel stream key and we did over 2 months of 24/7 live streaming on our channel (Learn how to set up a 24/7 livestream here). YouTube says the “Stream Now” is still in “BETA” but I have found it to be more stable than pre-scheduled events.
The second way to live stream on YouTube is the ability to schedule a live event. This is my preferred method for a couple of reasons:
- YouTube creates a nice “scheduled live show” playlist you can display on your channel homepage for all your pre-scheduled events. I love this because the playlist is automated and I don't have to manually add each event.
- Once scheduled YouTube gives you an event page you can display with a thumbnail. This page is just like a normal YouTube video and you can embed the event on your webpage.
- Scheduled Events are the only way to use YouTube’s “Multiple Camera” feature allowing you to send up to 6 different cameras to the same event. I rarely use this feature for our live show but I love the concept of allowing users to choose which camera they want to view.
- Finally, unlike “live now” all of the views during your live show are attributed to your on-demand recording (live now attributes the views to your channel, which is only important if you plan to use that regularly)
So, as you can see from my list above there are quite a few benefits to pre-scheduled YouTube Live events. BUT, there is a FFMPEG error I am continually running into with pre-scheduled streams that have been in the system for roughly 3 weeks or more. Basically, when you schedule a live stream YouTube assigns a unique stream key to that event. It usually works just fine, but I have found after a few weeks, for no explainable reasons the stream key will no longer initiate a secure stream to YouTube’s server.
How to troubleshoot YouTube Live stream key / FFMPEG Exited error?
When you find this error it’s quite annoying because you are likely just about to start your live show. So, first of all you need to initiate your live stream at least 30-45 minutes before your scheduled time. If your stream initiates properly you have nothing to worry about. But, I have found repeatedly that events scheduled over 1 month in advance usually have to deleted and republished with a new stream key. Therefore it’s a best practice to test the live stream early, before you send out any emails or social media posts linking to your live show. Only send out a link to your pre-scheduled event once you know that your live stream has been established properly.
Common Error #2 - Editing video over 1 hour - Removing the pre-show on your recording
This is actually a known issue on YouTube that effects live streamers significantly. Most live shows are at least 20-30 minutes and if you start your live stream with a pre-show the total recorded video is usually over one hour. Until this week, I have been starting my live show 30 minutes early and then conducting my 20 minute live show with a 20 minute Q&A. The total recorded time on YouTube ends up being roughly one hour and 10 minutes. Once the recording has posted I simply using the “enhancements” tool to “trim” off the pre-show from the recorded video.
I have to say this is an amazing free platform. Having the ability to stream an unlimited amount of video, store an unlimited amount of video and edit it all in the cloud… Seriously… It’s all free too? So I really, can’t complain, except for the fact that I have edited over 100 live shows this way, and it only stopped working this week!
How to troubleshoot YouTube Live Error #2?
Well, you can avoid the issue by keeping your entire live stream recording under 1 hour. This is obviously not ideal and impossible for certain live events. I imagine this issue will be fixed by the YouTube team fairly quickly.
Common Error #3 - Copyright Violations - Guilt until proven innocent?
For this one, I have to say that YouTube is probably just doing the right thing here but I thought it was “Innocent until proven guilty” right? If your live show includes anything with a copyright (mainly music) you will immediately be sent a copyright strike via email and your video will start to be monetized by that copyright holder. I am very careful about the music I choose and always use creative commons music or purchase the right to use that music.
So, when this happen you have to “file a dispute”. It’s usually taken care of fairly quickly but it’s an annoying process to go through over and over again for the same piece of music. So naturally, I have been avoiding music that creates copyright strikes on my content and try my best to promote creative commons content with the proper credit to the content owners.
How to troubleshoot copyright violations YouTube Live?
I am calling this an error because I have actually had my live streaming right taken away temporarily once before (although this is not normal and YouTube seems to have stopped doing this). I have read about many other people experiencing the same thing… So, it’s a work in-progress monitoring the world of live streaming and what it and isn't legal. Be careful what music you use and make sure you own the content you are using in your live stream. Many royalty-free music licenses allow you to use the music only once… Other royalty-free music licenses allow unlimited uses… If you plan to monetize your content and maintain control over your videos you will want to play close attention to music you choose. The best idea would be to have an original piece of music made specifically for you. The issue with Creative Commons music is that the author could decide to have that material monetized in the future. YouTube would then claim a copyright strike on your content that was once completely legally using the music included in your live stream… Chrome allow key generation in forms.
Improvement Suggestion #1 - Low Latency Live Streaming Skips video on the recording
OK, so here is a place where YouTube could make a really nice improvement. When you live steam on YouTube you have two options for buffering: 1. “Optimize for interaction” (Low Latency Mode) 2. “Optimize for less viewer buffering”. If you choose low latency mode, your audience will be as close to real time as possible but YouTube will actually skip parts of the video in order to catch the video up to real time. Some people use this feature because they want to real-time interactions with the audience via the chat. Personally, I would rather deal with the latency of roughly 30-60 seconds and using the optimize for buffering feature.
Here’s why:
- When you Optimize for less viewer buffering there should be no interruptions or “jumps” in the live video which look unnatural
- This will also affect your recorded video. So your recorded video will include blips and jumps in the recording cutting off sentences and breaking up the natural flow of your video
- It’s ok to have 30-60 seconds of latency in most situations. The way I run our live show, I usually don’t answer questions for the first 20 minutes. I also invite guests to be on the show view a real-time video conference. So the majority of interactions are done in real time anyway.
What would really be smart is if YouTube could allow users to select “Optimize for interaction” on the live stream and “Optimize for less viewer buffering” on the recording. That would be the best of both world’s for users who want to leverage YouTube’s platform for streaming and recording high quality files.
How to troubleshoot latency issues on YouTube Live?
If you have a mission critical live stream you will most likely be looking at a premium CDN such as UStream from IBM. But it’s nice that YouTube does offer two options to choose from. I would suggest optimizing for less viewer buffering unless your live stream requires real time interaction from your audience. You can always improve your bandwidth settings with some simple tips our guide here: http://speed.ptzoptics.com
Improvement Suggestion #2 - Starting a live show with multiple cameras
Generating A New Youtube Live Streaming Key Youtube
I’m not sure if this is a bug or a pre-cautionary feature but I think it can be better handled by a simple prompt. When you set up a live stream with multiple cameras you are essentially set up a series a linked RTMP streams which YouTube weaves into a single live event allowing the users to switch between each “camera”. If you set up your live show with multiple camera feeds and then decide that you don’t want to include one of the extra cameras you cannot initiate the entire show.
If I were YouTube, I would prompt the user saying “We are receiving feeds from cameras 1 and 2 but NOT camera 3. Would you like to start the live show without camera 3?”. But, it’s actually been improved and YouTube now allows you to go back to “ingestion settings” and delete the cameras you don’t plan to use. Then you can initiate the entire live stream.
Conclusion:
In my honest opinion, YouTube’s Live streaming platform is the most powerful options live streamers have today. Facebook comes in at a close second and I would love to do an apples to apples review of the two platforms sometime in 2017. Having hosted 100’s of live streams on YouTube I am now comfortable with the platform and it’s small bugs which certainly be ironed out moving forward.
Putting together a video production and going live can ALOT of effort. The reward is an amazing viewer experience and on-demand video content that will live on forever. It’s my hope that identifying these bugs will prepare YouTube Live users for troubleshooting and simplify the last piece of the live streaming puzzle: the CDN (Content Delivery Network). Please feel free to download our “YouTube Live Troubleshooting Guide” and tune into our next live show Fridays at 11AM PST and 2PM EST.
About the author:
Youtube Live Tv
I am a Live Streaming Expert and Chief Streaming Officer for PTZOptics. PTZOptics is an industry leader in affordable live streaming technology. We host a live show on YouTube Live & Facebook every Friday and we hope to help the world better understand live streaming and technology it takes to produce amazing video content! This show is the basis of our live streaming innovation where you can learn quite a lot of about the industry.
I offer 10+ live streaming courses available here with over 2,500 students and 30 five star reviews!
I have been working in the audio visual industry for 8+ years keeping me involved in designing, building and operating live streaming and video conferencing systems. Throughout my career continue to help others in video communication projects.
Subscribe to our YouTube Channel here & stay up to date with our latest live streaming and video production tutorials and guides.