LiveStreams: list empty result - youtube-livestreaming-api

I'm testing YouTube live streaming API using Java client libraries.
I have a simple project which is basically the copy of ListStreams example taken from here:
https://developers.google.com/youtube/v3/live/code_samples/java#retrieve_a_channel_s_live_video_streams.
I have my application registered in Google developers console. I have created a test public live stream and a test broadcast.
Everything works fine, I can broadcast video from my phone to this live stream.
But when I try to get a list of live streams from my channel I always get an empty result.
The funny thing is that I can successfully retrieve my channel's broadcasts using the LiveBroadcasts.java example.
But no matter what I do the list of streams is always empty.
Did anyone have similar problems ?
Cheers, Dmitry.

Related

"Invalid state transition" response when switching from test to live

I have a problem with the YouTube Livestreaming API, and it is only causing a problem on one single account.
The CMS I support has a live to YouTube function that automatically schedules and delivers a livestream from our studios to YouTube as a parallel channel to our website. We support multiple teams who all authenticate their accounts against our application to do this.
About 6 weeks ago we had a single group report that they are no longer seeing their content streaming live to YouTube. All the other accounts, as well as our test channels, are working fine.
With the account in question we can see the livestream get created, the broadcast is created, and they are bound together. Once the encoders are started we are able to successfully transition the stream to "TESTING" without problem approximately 10 minutes prior to the scheduled start time. Where we are seeing the problem is in the final step where we transition the stream from "TESTING" to "LIVE" at the starting time of the broadcast. We get a response with "(#100) Status transition not allowed" when we attempt to transition to live. Prior to this step we retrieve the lifeCycleStatus value, and it shows as "TESTING".
If a user logs into YouTube Studio at this point, they are able to manually transition the stream to live.
The fact that this is working with multiple other accounts, and all are using a common code base and app, I am concerned that there is something about the account itself that is causing this issue. I have not been able to see any significant differences in the account settings when comparing with our test account.
Is there any way I can get further information about why the transition is failing, or something I should be specifically looking for as a potential problem?

Youtube API. Get public live chat messages on different channel

I have a trouble with getting live broadcast data (live chat messages) on a different channel. I found a few questions like that, they've been asked a couple of years ago and no solution found yet.
Is there an "official" way of getting public live chat messages via Youtube API without using such dirty ways like "loading page with help of Selenium and loading data into DOM"? In browser we can see them without logining as owner of the channel, I think there should be a way

Can not find live

I have a text to speech robot that I use for my livestreams on youtube. The robot has been functioning fine for months.
It is giving me the error "Can not find live" despite having a livestream running.
My stream did particularly well yesterday, which may be related to why the API is behaving differently for me today?
It looks like my channel has been shadowbanned from appearing in search results for live videos. The youtube-live-chat node api that I uses relies on a search to get the chat id. Since I am shadowbanned from search results I must use the livebroadcasts list command instead.

How to connect to Cumulocity services in order to add multiple devices data

I'm currently building a dotnet core project that receives data from multiple devices and has to send them over to Cumulocity.
So the flow of the app would be something similar to:
dotnet core app receives new data
connects to cumulocity account
creates device with name according to data received
sends data
repeat for multiple devices
I've been doing this for the past week using this code.
It works fine but then i noticed that calling the client.CreateDevice(...) was not creating new ones when presented with different data, it always hit the same one.
This tells me that i'm probably doing this wrong, that this library is to be used only within devices and not this way.
So my question is, to handle/send multiple devices data to the platform which library should i be using (if any)?
Thank you.
I figured it out, when connecting to Cumulocity the ClientId value will identify the device, to create new ones i just map that property to my devices ID.
Problem solved.

Youtube Live-streaming API returns an empty list of streams

I'm trying to make an electron app that will work together with OBS. For this I need the Stream Name from youtube among other things.
But this stream name has proven hard to get from the API.
I'm currently testing it with the python examples on the documentation page.
This is the example that i use.
Before I started, I created a event with all the settings - and I'm able to see the Stream Name/Key on the website.
When I use the API, it just returns an empty list. I'm sure that I do have a stream, and that it's working as I created it myself, and I am streaming to the example view.
However I never get anything from that service. The other services work, like the list broadcasts one, it returns all planned events.
List Broadcasts:
$ python .\list_broadcasts.py
Broadcasts with status 'all':
Test Begivenhed (ib08ZcLQgZA)
List Streams:
$ python .\list_streams.py
Live streams:
The code for the examples can also be found here: https://github.com/youtube/api-samples/tree/master/python
Turns out that when you create a "Broadcast" a random stream is attached. It's impossible to get the key from this stream.
Instead you need to create a new "Stream/Customised Ingestion", this will make it all work, just make sure that your broadcast is attached with the steam.
You can reuse this stream, and that's a good thing for me, as I don't need to change the streaming key all the time.
You can create a new Stream/Customised Ingestion preset in the UI or via the API.